/* www/assets/css/style.css */

:root {
    --schiste: #2f4a3f;
    --schiste-d: #1f332b;
    --schiste-l: #e4ebe6;
    --ocre: #b9792f;
    --ocre-d: #95601f;
    --ocre-l: #e7c48f;
    --vert-l: #8fae8b;
    --sable: #f5efe4;
    --papier: #fbf8f2;
    --ink: #1f2623;
    --muted: #59645e;
    --line: #ded6c7;
    --err: #a23b2a;
    --ok: #2f6b3f;
    --radius: 12px;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font: 17px/1.6 var(--sans);
    color: var(--ink);
    background: var(--papier);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--schiste); text-underline-offset: 3px; }
a:hover { color: var(--ocre-d); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--schiste-d); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--schiste); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 99; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- En-tête ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(251, 248, 242, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt strong { font-family: var(--serif); font-size: 1.18rem; color: var(--schiste-d); }
.brand-txt small { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 8px; font-size: .96rem; }
.nav a:hover { background: var(--schiste-l); color: var(--schiste-d); }
.nav a[aria-current="page"] { color: var(--schiste); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ocre); border-radius: 0; }
.nav a.nav-cta { background: var(--schiste); color: #fff; border-radius: 8px; margin-left: 6px; box-shadow: none; }
.nav a.nav-cta:hover { background: var(--schiste-d); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr) { display: block; width: 24px; height: 2px; background: var(--schiste-d); margin: 5px 0; transition: .2s; }

@media (max-width: 1040px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute; left: 0; right: 0; top: 72px;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--papier); border-bottom: 1px solid var(--line);
        padding: 8px 22px 18px; display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 6px; border-bottom: 1px solid var(--line); border-radius: 0; }
    .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ocre); padding-left: 12px; }
    .nav a.nav-cta { margin: 12px 0 0; text-align: center; border-bottom: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Héros ---------- */
.hero {
    position: relative; overflow: hidden;
    background: var(--schiste-d);
    color: var(--sable);
    padding: clamp(64px, 10vw, 120px) 0 clamp(70px, 10vw, 110px);
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        repeating-linear-gradient(-8deg, transparent 0 46px, rgba(231, 196, 143, .06) 46px 48px),
        radial-gradient(ellipse at 85% 20%, rgba(185, 121, 47, .28), transparent 55%);
}
.hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
    background: var(--papier);
    clip-path: polygon(0 70%, 18% 40%, 34% 62%, 52% 22%, 70% 55%, 86% 30%, 100% 50%, 100% 100%, 0 100%);
}
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero .lead { color: #e6e0d4; max-width: 58ch; font-size: 1.18rem; }
.kicker {
    display: inline-block; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ocre-l); font-weight: 600; margin-bottom: 14px;
}
.section .kicker, .page-head .kicker { color: var(--ocre-d); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.badge { font-size: .82rem; padding: 6px 12px; border: 1px solid rgba(231, 196, 143, .4); border-radius: 99px; color: var(--ocre-l); }

.page-head { padding: 64px 0 28px; border-bottom: 1px solid var(--line); background: linear-gradient(var(--sable), var(--papier)); }
.page-head .lead { max-width: 64ch; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ocre); color: #fff; border: 0; cursor: pointer;
    padding: 13px 22px; border-radius: 10px; font: 600 1rem var(--sans);
    text-decoration: none; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--ocre-d); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--sable); border: 1px solid rgba(245, 239, 228, .45); }
.btn-ghost:hover { background: rgba(245, 239, 228, .1); color: #fff; }
.btn-dark { background: var(--schiste); }
.btn-dark:hover { background: var(--schiste-d); }
.btn-small { padding: 7px 12px; font-size: .88rem; border-radius: 8px; }
.btn-line { background: transparent; color: var(--schiste); border: 1px solid var(--line); }
.btn-line:hover { background: var(--schiste-l); color: var(--schiste-d); }
.btn-danger { background: transparent; color: var(--err); border: 1px solid #e3c2bb; }
.btn-danger:hover { background: #f7e7e3; color: var(--err); }

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.section.alt { background: var(--sable); }
.section.narrow, .narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.section.narrow { padding-left: 22px; padding-right: 22px; }
.center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); }
.section-head { max-width: 680px; margin-bottom: 36px; }

.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px;
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.pillar { border-top: 4px solid var(--ocre); }
.pillar:nth-child(2) { border-top-color: var(--schiste); }
.pillar:nth-child(3) { border-top-color: var(--vert-l); }
.pillar:nth-child(4) { border-top-color: var(--ocre-l); }
.slogan { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--ocre-l); margin: -.2em 0 1em; }
.num {
    display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--schiste-l); color: var(--schiste-d); font-weight: 700; font-size: .95rem; margin-bottom: 12px;
}

/* Constat / réponse */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.split > div { padding: 34px; }
.split .before { background: #fff; }
.split .after { background: var(--schiste); color: var(--sable); }
.split .after h3 { color: #fff; }
.split ul { margin: 0; padding-left: 1.1em; }
.split li { margin-bottom: .4em; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Flux */
.flux { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.flux-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 18px; position: relative; }
.flux-item::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--ocre)); }
.flux-item h3 { font-size: 1.08rem; margin-bottom: .3em; }
.flux-item p { font-size: .94rem; color: var(--muted); margin: 0 0 .6em; }
.tag { display: inline-block; font-size: .76rem; padding: 3px 9px; border-radius: 99px; background: var(--schiste-l); color: var(--schiste-d); }
.flux-item.mineur { background: transparent; border-style: dashed; }

/* Parcours */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.process li { position: relative; padding: 0 18px 0 0; counter-increment: s; }
.process li::before {
    content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--ocre); color: #fff; font-weight: 700; margin-bottom: 14px; position: relative; z-index: 1;
}
.process li::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; height: 2px; background: var(--line); }
.process li:last-child::after { display: none; }
.process h3 { font-size: 1.05rem; }
.process p { font-size: .94rem; color: var(--muted); }
@media (max-width: 820px) {
    .process { grid-template-columns: 1fr; gap: 22px; }
    .process li { padding: 0 0 0 62px; }
    .process li::before { position: absolute; left: 0; top: 0; }
    .process li::after { display: none; }
}

/* Frise */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 34px 48px; }
.timeline li::before {
    content: ""; position: absolute; left: 3px; top: 5px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--papier); border: 3px solid var(--line);
}
.timeline li.done::before { background: var(--schiste); border-color: var(--schiste); }
.timeline li.now::before { background: var(--ocre); border-color: var(--ocre); box-shadow: 0 0 0 5px rgba(185, 121, 47, .2); }
.timeline .when { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ocre-d); font-weight: 600; }
.timeline h3 { margin: .2em 0 .3em; }
.timeline p { color: var(--muted); margin: 0; }
.status { font-size: .74rem; padding: 2px 8px; border-radius: 99px; margin-left: 8px; vertical-align: middle; font-family: var(--sans); font-weight: 600; }
.status.done { background: var(--schiste-l); color: var(--schiste-d); }
.status.now { background: #f4e3c8; color: var(--ocre-d); }

/* Engagements */
.engage { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.engage li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 18px 56px; position: relative; }
.engage li::before {
    content: ""; position: absolute; left: 20px; top: 21px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--schiste) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.engage strong { display: block; color: var(--schiste-d); }
.engage span { color: var(--muted); font-size: .95rem; }

.bureau { display: flex; flex-wrap: wrap; gap: 14px; }
.bureau div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; min-width: 180px; }
.bureau small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }

/* Bandeau d'appel */
.cta-band { background: var(--ocre); color: #fff; border-radius: 18px; padding: clamp(30px, 5vw, 52px); display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { margin: 0; color: #fbeedd; max-width: 56ch; }
.cta-band .btn { background: var(--schiste-d); }
.cta-band .btn:hover { background: #142019; }

.note { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--ocre-l); padding: 4px 0 4px 14px; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 6px; }
.form.card { padding: 30px; }
.form label, .form legend { font-weight: 600; font-size: .95rem; margin-top: 12px; color: var(--schiste-d); }
.form label .opt, .form legend .opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form input[type=password], .form select, .form textarea {
    width: 100%; font: inherit; padding: 11px 13px; border: 1px solid #cfc6b5; border-radius: 9px; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--schiste); outline: 2px solid rgba(47, 74, 63, .2); outline-offset: 0; }
.form textarea { min-height: 160px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form .row > div { display: grid; gap: 6px; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
.form fieldset { border: 0; padding: 0; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 8px; }
.checks label, .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; font-size: .95rem; color: var(--ink); }
.checks input, .check input { margin-top: 4px; accent-color: var(--schiste); }
.check { border: 0; padding: 0; background: none; margin-top: 14px; }
.form button { justify-self: start; margin-top: 20px; }
.counter { justify-self: end; font-size: .8rem; color: var(--muted); }
.form .help { font-size: .86rem; color: var(--muted); margin: 0; }
.field-err { color: var(--err); font-size: .86rem; margin: 0; }
.alert { padding: 14px 18px; border-radius: 10px; margin: 0 0 20px; }
.alert-err { background: #f7e7e3; color: var(--err); border: 1px solid #e8c6bf; }
.alert-ok { background: #e3efe5; color: var(--ok); border: 1px solid #c4dcc9; }
.form-aside { display: grid; gap: 18px; align-content: start; }
.contact-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- Texte long (mentions) ---------- */
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 18px; }
.prose dt { font-weight: 600; color: var(--schiste-d); }
.prose dd { margin: 0; }
@media (max-width: 620px) { .prose dl { grid-template-columns: 1fr; } .prose dd { margin-bottom: 8px; } }

/* ---------- Espace / admin ---------- */
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.docs a { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.docs a:hover { border-color: var(--schiste); }
.docs small { color: var(--muted); white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--schiste-d); border-bottom-color: var(--ocre); font-weight: 600; }
.tabs .count { font-size: .78rem; background: var(--schiste-l); color: var(--schiste-d); padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.entry { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; }
.entry header { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.entry .meta { font-size: .86rem; color: var(--muted); }
.entry .msg { white-space: pre-wrap; margin: 8px 0 12px; }
.entry dl { display: grid; grid-template-columns: 190px 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: .95rem; }
.entry dt { color: var(--muted); }
.entry dd { margin: 0; }
.entry .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.entry form { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.bar { display: grid; grid-template-columns: 1fr 44px; gap: 10px; align-items: center; margin: 8px 0; font-size: .92rem; }
.bar .track { grid-column: 1 / -1; height: 8px; background: var(--schiste-l); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--schiste); border-radius: 99px; }
.bar b { text-align: right; }
.kpi { font-family: var(--serif); font-size: 2.4rem; color: var(--schiste-d); line-height: 1; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: var(--schiste-l); padding: 2px 6px; border-radius: 5px; word-break: break-all; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--schiste-d); color: #cbd3ce; margin-top: 40px; font-size: .94rem; }
.site-footer a { color: #e6e0d4; text-decoration: none; }
.site-footer a:hover { color: var(--ocre-l); text-decoration: underline; }
.footer-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: 44px 22px 26px; }
.footer-in nav { display: flex; flex-direction: column; gap: 6px; }
.footer-brand { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin-bottom: .4em; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 22px 22px; font-size: .84rem; color: #9fb0a6; }
.footer-bottom p { margin: 0; }

@media print {
    .site-header, .site-footer, .hero-actions, .cta-band .btn { display: none; }
    .hero { background: none; color: var(--ink); padding: 0; }
    .hero h1, .hero .lead { color: var(--ink); }
}
.form .checks label, .form .check { font-weight: 400; font-size: .95rem; color: var(--ink); }

/* Dispositif photo */
.schema { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(14px, 3vw, 34px); }
.schema svg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.schema figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 12px; }
.split-link { margin: 18px 0 0; }
.split .after .split-link a { color: var(--ocre-l); font-weight: 600; }
.split .after .split-link a:hover { color: #fff; }
.nav a, .brand-txt small { white-space: nowrap; }
@media (min-width: 1041px) { .nav a { padding: 8px 9px; font-size: .93rem; } }
@media (max-width: 700px) { .schema { overflow-x: auto; } .schema svg { min-width: 640px; } }
