/**
 * front/css/conditions-utilisation.css
 *
 * Présentation des CGU : hero illustré, sommaire sticky et sections en cartes.
 * Le contenu juridique reste lisible ; Bootstrap ne sert qu'au pied de page.
 */

:root {
    --forest: #2f7d32;
    --forest-light: #378c3c;
    --forest-dark: #173f1c;
    --forest-deep: #0d2611;
    --leaf: #66bb40;
    --blue: #0f52ba;
    --paper: #fffdf6;
    --paper-2: #f6efdd;
    --ink: #2e2419;
    --muted: #6f5e47;
    --line: #dfcda8;
    --gold: #c99b3f;
    --shadow: 0 18px 45px rgba(38, 31, 18, .14);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    background-color: #f4eee0;
    background-image: radial-gradient(rgba(47, 125, 50, .065) 1px, transparent 1px);
    background-size: 18px 18px;
}

::selection { background: #cfe8b0; color: var(--forest-deep); }

a { color: var(--forest-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest); }

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 0 0 10px 10px;
    background: var(--paper);
    color: var(--forest-dark);
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.skip-link:focus { top: 0; }

/* ------------------------------------------------------------------ topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    padding: 12px clamp(16px, 4vw, 48px);
    background: rgba(11, 33, 15, .9);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}
.brand:hover { color: #fff; }

.brand-name {
    font-family: 'Indie Flower', cursive;
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    line-height: 1;
    letter-spacing: .5px;
}

.brand-sub {
    color: #cfe8b0;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    align-items: center;
}

.topnav a {
    color: #e4eedd;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 2px;
}
.topnav a:hover { color: #fff; text-decoration: underline; }
.topnav a[aria-current="page"] {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--leaf);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.topnav .cta {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--leaf);
    color: #10240f;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 0 #3f8c25;
}
.topnav .cta:hover { background: #74c94f; color: #10240f; text-decoration: none; }

/* -------------------------------------------------------------------- hero */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 9vw, 116px) 20px clamp(96px, 12vw, 150px);
    text-align: center;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(8, 28, 14, .42), rgba(8, 28, 14, .88)),
        url("../img/landscape-1844227_1920.png") center 32% / cover no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, .12), transparent 55%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 90px;
    background: linear-gradient(to bottom, rgba(244, 238, 224, 0), #f4eee0);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.eyebrow {
    margin: 0 0 12px;
    color: #d5eabf;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 12px;
    font-family: 'Indie Flower', cursive;
    font-size: clamp(2.3rem, 6vw, 4.3rem);
    line-height: 1.08;
    color: #fff;
    text-shadow: 0 4px 22px rgba(0, 0, 0, .5);
}

.lead {
    margin: 0 0 22px;
    color: #f0f7e8;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 600;
}

.meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    background: rgba(10, 28, 14, .42);
    color: #e8f2df;
    font-size: .82rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}
.meta time { color: #fff; font-weight: 800; }
.meta sup { font-size: .65em; }
.meta-sep { color: #a8c98c; }

/* -------------------------------------------------------------------- page */
.page {
    position: relative;
    z-index: 2;
    max-width: 1180px;
    margin: -72px auto 0;
    padding: 0 20px 76px;
}

.layout {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* --------------------------------------------------------------------- toc */
.toc-card {
    position: sticky;
    top: 92px;
    padding: 22px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.toc-title {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
    color: var(--forest-dark);
    font-family: 'Indie Flower', cursive;
    font-size: 1.35rem;
}

.toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: sommaire;
}

.toc li { counter-increment: sommaire; }

.toc a {
    position: relative;
    display: block;
    padding: 7px 10px 7px 34px;
    border-radius: 9px;
    color: #5e4d38;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.toc a::before {
    content: counter(sommaire, decimal-leading-zero);
    position: absolute;
    left: 8px;
    top: 7px;
    color: #a3906f;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.toc a:hover { background: #f1f6e9; color: var(--forest-dark); }

.toc a.active {
    background: #e8f2dd;
    color: var(--forest-deep);
    box-shadow: inset 3px 0 0 var(--forest);
}
.toc a.active::before { color: var(--forest); }

.toc-actions {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.toc-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 11px 12px;
    border-radius: 12px;
    background: #f3f8ec;
    color: #4b5a3d;
    font-size: .78rem;
    line-height: 1.45;
}
.toc-note-icon { font-size: 1rem; line-height: 1.2; }
.toc-note p { margin: 0; }

/* ------------------------------------------------------------------- cards */
.cgu { min-width: 0; }

.card {
    position: relative;
    margin-bottom: 18px;
    padding: 28px 30px 28px 96px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 10px 28px rgba(40, 31, 14, .08);
    scroll-margin-top: 100px;
}

.card h2 {
    margin: 0 0 12px;
    color: var(--forest-dark);
    font-family: 'Indie Flower', cursive;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    line-height: 1.2;
}

.card p { margin: 0 0 12px; color: #3b3025; }
.card p:last-child { margin-bottom: 0; }

.card strong { color: var(--forest-dark); font-weight: 800; }

.card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.card li {
    position: relative;
    margin: 8px 0;
    padding-left: 24px;
    color: #3b3025;
}

.card li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: .68em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--leaf);
    transform: rotate(45deg);
    box-shadow: 0 0 0 2px rgba(102, 187, 64, .16);
}

.num {
    position: absolute;
    left: 30px;
    top: 30px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--forest-light), var(--forest-dark));
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    box-shadow: 0 5px 0 #123916, inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* Carte d'introduction */
.card.intro {
    padding-left: 30px;
    border-left: 6px solid var(--forest);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .7), rgba(246, 239, 221, .9)),
        var(--paper);
}

.pill {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #e8f2dd;
    color: var(--forest-dark);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

/* Contact */
.card.contact {
    border-color: #c8d8ef;
    background:
        linear-gradient(135deg, rgba(15, 82, 186, .07), rgba(255, 255, 255, 0) 55%),
        var(--paper);
}
.card.contact .num { background: linear-gradient(180deg, #2f6fd0, #0f52ba); box-shadow: 0 5px 0 #0a3a82, inset 0 1px 0 rgba(255, 255, 255, .25); }
.card.contact h2 { color: #0f3f8f; }
.card.contact a { color: var(--blue); font-weight: 800; }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px !important;
}

/* ---------------------------------------------------------------- boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--forest);
    color: #fff;
    box-shadow: 0 5px 0 #1b4f20;
}
.btn-primary:hover { background: var(--forest-light); color: #fff; }

.btn-ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--forest-dark);
}
.btn-ghost:hover { background: #f4f8ee; border-color: #b9d3a9; color: var(--forest-deep); }
.btn-ghost.is-done { background: #e8f2dd; border-color: #a9cc90; }

.btn-light { background: #f8f2e2; color: var(--forest-deep); }
.btn-light:hover { background: #fff; color: var(--forest-deep); }

.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* -------------------------------------------------------------- acceptation */
.acceptance {
    margin-top: 26px;
    padding: 30px 26px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 12% 20%, rgba(102, 187, 64, .22), transparent 40%),
        radial-gradient(circle at 88% 80%, rgba(15, 82, 186, .16), transparent 42%),
        linear-gradient(135deg, var(--forest-dark), var(--forest-deep));
    color: #f2f9ec;
    text-align: center;
    box-shadow: var(--shadow);
}

.acceptance-title {
    max-width: 720px;
    margin: 0 auto 18px;
    font-family: 'Indie Flower', cursive;
    font-size: clamp(1.25rem, 2.6vw, 1.65rem);
    line-height: 1.35;
}

.acceptance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
    margin-top: 0;
    border-top: 4px solid var(--forest);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }

    .toc-card { position: static; }
    .toc ol {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 8px;
    }
}

@media (max-width: 760px) {
    .topnav a:not(.cta) { display: none; }

    .hero { padding-top: 52px; }
    .page { margin-top: -54px; padding: 0 14px 60px; }

    .card { padding: 24px 20px 24px 82px; }
    .num { left: 20px; top: 24px; width: 42px; height: 42px; }
    .card.intro { padding-left: 20px; }
}

@media (max-width: 560px) {
    .hero h1 br { display: none; }
    .meta { border-radius: 16px; }

    .toc ol { grid-template-columns: 1fr; }

    .card { padding: 22px 18px; }
    .num {
        position: static;
        display: inline-grid;
        margin-bottom: 10px;
        width: 40px;
        height: 40px;
    }

    .contact-actions .btn,
    .acceptance-actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------- print */
@media print {
    @page { margin: 16mm; }

    body {
        background: #fff !important;
        font-size: 11.5pt;
        color: #000;
    }

    .topbar,
    .toc,
    .skip-link,
    .hero::before,
    .hero::after,
    .acceptance-actions,
    .contact-actions,
    .site-footer {
        display: none !important;
    }

    .hero {
        padding: 0 0 18px;
        background: none !important;
        color: #000;
        text-align: left;
    }
    .hero h1 { color: #000; text-shadow: none; font-size: 26pt; }
    .eyebrow, .lead, .meta { color: #333; }
    .meta { border-color: #bbb; background: none; padding: 0; }

    .page { margin: 0; padding: 0; max-width: none; }
    .layout { display: block; }
    .card {
        margin: 0 0 12px;
        padding: 16px 18px 16px 54px;
        border: 1px solid #ddd;
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
    }
    .card.intro { padding-left: 18px; }
    .num {
        position: absolute;
        left: 16px;
        top: 16px;
        width: 26px;
        height: 26px;
        font-size: 8pt;
        background: #eee !important;
        color: #000 !important;
        box-shadow: none;
    }
    .acceptance {
        color: #000;
        background: none;
        border: 1px solid #bbb;
        box-shadow: none;
    }
    .acceptance-title { font-size: 14pt; }
    a { color: #000; text-decoration: none; }
}

/* --------------------------------------------------------------- formulaire */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
    margin-top: 18px;
}

.form-grid .full { grid-column: 1 / -1; }

.field label {
    display: block;
    margin-bottom: 6px;
    color: var(--forest-dark);
    font-size: .86rem;
    font-weight: 800;
}

.field label .required { color: #b3261e; }

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffdf8;
    color: var(--ink);
    font: inherit;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.field input::placeholder,
.field textarea::placeholder { color: #a19074; }

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--forest);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 125, 50, .13);
}

.field textarea { min-height: 150px; resize: vertical; }

.field .hint {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .76rem;
}

.honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    margin-top: 20px;
}

.form-note {
    margin: 0;
    max-width: 430px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.form-alert {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: .9rem;
}
.form-alert p { margin: 0 0 6px; }
.form-alert p:last-child { margin-bottom: 0; }
.form-alert ul { margin: 6px 0 0; padding-left: 20px; }
.form-alert.success { background: #e8f2dd; border-color: #b9d3a9; color: #1f4f24; }
.form-alert.error { background: #fdecea; border-color: #f0b8b3; color: #7a1c17; }
.form-alert a { color: inherit; font-weight: 800; text-decoration: underline; }

.contact-lines {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.contact-lines li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 9px 0;
    color: #3b3025;
}
.contact-lines .ico { flex: 0 0 auto; }

@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
}

@media print {
    .form-grid,
    .form-actions,
    .honeypot { display: none !important; }
}
