/* -------------------------------------------------------------------------
   Envol — design tokens (see ressources/design maquettes)
   ------------------------------------------------------------------------- */
:root {
    color-scheme: light;

    --rouge: #E2001A;
    --rouge-sombre: #B00014;
    --encre: #211D1D;
    --encre-douce: #6B6462;
    --blanc: #FFFFFF;
    --lin: #F1F0EE;
    --vert: #1E7A46;

    --font-display: 'Archivo', 'Arial Black', sans-serif;
    --font-body: 'Public Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--blanc);
    color: var(--encre);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--rouge); }
a:hover { color: var(--rouge-sombre); }

h1, h2, h3 {
    font-family: var(--font-display);
    font-stretch: 120%;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .01em;
    line-height: 1.1;
    margin: 0 0 .5rem;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.25rem; }

.mono { font-family: var(--font-mono); font-size: .9375rem; }
.muted { color: var(--encre-douce); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------
   Fil rouge : couture pointillée verticale, brodée d'une croix par étape
   ------------------------------------------------------------------------- */
.fil-rouge {
    position: relative;
    padding-left: 2rem;
}
.fil-rouge::before {
    content: '';
    position: absolute;
    left: .5rem;
    top: 0;
    bottom: 0;
    border-left: 2px dashed var(--rouge);
}
.fil-rouge .croix {
    position: absolute;
    left: .5rem;
    transform: translateX(-50%);
    width: 1.25rem;
    height: 1.25rem;
    background: var(--blanc);
    color: var(--rouge);
    font-weight: 800;
    line-height: 1.25rem;
    text-align: center;
}

/* -------------------------------------------------------------------------
   Buttons, forms, tables, flashes
   ------------------------------------------------------------------------- */
.btn {
    font: inherit;
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: 2px;
    border: 2px solid var(--rouge);
    cursor: pointer;
}
.btn-primary, .btn-primary:hover { color: var(--blanc); }
.btn-primary { background: var(--rouge); }
.btn-primary:hover { background: var(--rouge-sombre); border-color: var(--rouge-sombre); }
.btn-ghost, .btn-ghost:hover { color: var(--rouge); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--lin); }

input[type="email"], input[type="text"] {
    font: inherit;
    padding: .5rem .75rem;
    border: 1px solid transparent;
    border-radius: 2px;
    background: var(--lin);
    min-width: 18rem;
}
input:focus { outline: 2px solid var(--rouge); outline-offset: 1px; }

.inline-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table th, .table td { text-align: left; padding: .625rem .5rem; border-bottom: 1px solid var(--lin); }
.table th { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-douce); font-weight: 500; }

.flash { padding: .75rem 1rem; border-left: 3px solid var(--vert); background: var(--lin); margin: 1rem 0; }
.flash-error { border-left-color: var(--rouge); }

.empty { padding: 2rem; text-align: center; color: var(--encre-douce); background: var(--lin); }

/* -------------------------------------------------------------------------
   Sandbox
   ------------------------------------------------------------------------- */
.sandbox { max-width: 64rem; margin: 0 auto; padding: 1.5rem; }
.sandbox-header { display: flex; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--rouge); padding-bottom: .75rem; margin-bottom: 1.5rem; }
.sandbox-brand { font-family: var(--font-display); font-stretch: 120%; font-weight: 800; text-transform: uppercase; font-size: 1.25rem; text-decoration: none; color: var(--rouge); }
.sandbox-tag { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--encre-douce); }
.sandbox-nav { margin-left: auto; display: flex; gap: 1rem; }
.sandbox-actions { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }

.email { border: 1px solid var(--lin); border-top: 3px solid var(--rouge); margin: 1.5rem 0; }
.email-header { padding: 1rem 1rem .5rem; }
.email-header h2 { text-transform: none; font-family: var(--font-body); font-weight: 600; font-size: 1.125rem; }
.email-body { display: block; width: 100%; height: 28rem; border: 0; border-top: 1px solid var(--lin); background: var(--blanc); }
.email-text { margin: 0; padding: 1rem; border-top: 1px solid var(--lin); white-space: pre-wrap; font-family: var(--font-mono); font-size: .9375rem; }
.email-attachments { margin: 0; padding: .75rem 1rem; border-top: 1px solid var(--lin); list-style: none; }

/* -------------------------------------------------------------------------
   Home
   ------------------------------------------------------------------------- */
.home { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.home-card { max-width: 32rem; }
.home-card h1 { font-size: clamp(3rem, 12vw, 5rem); color: var(--rouge); }
.home-card .lead { font-size: 1.125rem; }
.home-meta { margin-top: 2rem; font-family: var(--font-mono); font-size: .8125rem; color: var(--encre-douce); }
.home-meta dt { display: inline; }
.home-meta dd { display: inline; margin: 0 0 0 .25rem; color: var(--encre); }
.home-meta div { margin-bottom: .25rem; }
.status-ok { color: var(--vert); font-weight: 600; }

/* -------------------------------------------------------------------------
   Espace secrétariat : coquille (barre latérale + contenu)
   ------------------------------------------------------------------------- */
:root { --trait: #DDD9D6; --ambre: #96660A; }

.app { display: flex; min-height: 100vh; }
.app-nav {
    width: 224px; flex: none;
    border-right: 1px solid var(--trait);
    padding: 22px 0;
    display: flex; flex-direction: column; gap: 2px;
    position: sticky; top: 0; height: 100dvh;
    font-size: 14px;
}
.marque { display: flex; align-items: center; gap: 10px; padding: 0 20px 22px; }
.croix-logo { width: 22px; height: 22px; position: relative; flex: none; }
.croix-logo::before, .croix-logo::after { content: ""; position: absolute; background: var(--rouge); }
.croix-logo::before { left: 7.5px; top: 0; width: 7px; height: 22px; }
.croix-logo::after { left: 0; top: 7.5px; width: 22px; height: 7px; }
.marque .mono { color: var(--encre-douce); line-height: 1.5; font-size: .8125rem; }
.marque .mono strong { color: var(--encre); font-weight: 500; }

.app-nav a, .app-nav .bientot { position: relative; display: block; padding: 10px 20px 10px 26px; font-weight: 600; text-decoration: none; }
.app-nav a { color: var(--encre-douce); }
.app-nav a:hover, .app-nav a.actif { color: var(--encre); }
.app-nav a.actif::before {
    content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px;
    background: repeating-linear-gradient(to bottom, var(--rouge) 0 5px, transparent 5px 9px);
}
.app-nav .bientot { color: var(--trait); cursor: default; }
.sep-nav { border: none; border-top: 1px solid var(--trait); margin: 10px 20px; }
.nav-pied { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid var(--trait); font-size: 13px; color: var(--encre-douce); display: grid; gap: 2px; }
.nav-pied b { color: var(--encre); font-weight: 600; }
.nav-pied .mono { font-size: .75rem; word-break: break-all; }
.nav-pied a { margin-top: 6px; font-weight: 600; }

.app-main { flex: 1; min-width: 0; padding: 34px 40px 60px; max-width: 1060px; }
.sous-titre { color: var(--encre-douce); margin: -0.25rem 0 1.5rem; }
.carte { border: 1px solid var(--trait); border-top: 3px solid var(--rouge); padding: 1.25rem 1.5rem; max-width: 36rem; }
.carte p { margin: 0 0 .5rem; }

@media (max-width: 860px) {
    .app { flex-direction: column; }
    .app-nav { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: none; border-bottom: 1px solid var(--trait); padding: 12px 8px; }
    .app-nav .sep-nav, .app-nav .nav-pied, .app-nav .bientot { display: none; }
    .app-nav .marque { padding: 0 12px; }
    .app-main { padding: 24px 16px 48px; }
}

/* -------------------------------------------------------------------------
   Connexion
   ------------------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.login-card { max-width: 26rem; width: 100%; }
.login-marque { font-family: var(--font-display); font-stretch: 120%; font-weight: 800; text-transform: uppercase; color: var(--rouge); font-size: 2.5rem; margin: 0; line-height: 1; }
.login-card h1 { font-size: 1.25rem; margin: .5rem 0 .75rem; }
.btn-google { display: block; text-align: center; text-decoration: none; margin-top: 1.5rem; }
.login-divider { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1rem; color: var(--encre-douce); font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; border-top: 1px solid var(--trait); }
.dev-login { display: grid; gap: .5rem; }
.dev-login label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-douce); }
.dev-login select { font: inherit; padding: .5rem .75rem; border: 1px solid var(--trait); background: var(--lin); border-radius: 2px; }

/* -------------------------------------------------------------------------
   Utilisateurs
   ------------------------------------------------------------------------- */
.bandeau-info { display: block; padding: 14px 16px; background: var(--lin); border-left: 3px solid var(--rouge); margin-bottom: 22px; max-width: 760px; line-height: 1.5; }
.bandeau-info b { display: block; margin-bottom: 4px; }
.inviter { margin: 0 0 26px; }
.inviter .btn { text-decoration: none; display: inline-block; }
.app-table .nom { font-weight: 600; }
.app-table .detail { color: var(--encre-douce); font-size: .8125rem; }
.app-table .actions { white-space: nowrap; }
.app-table .actions form { display: inline; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 2px; border: 1px solid transparent; vertical-align: middle; }
.badge.role-admin { color: var(--rouge); border-color: var(--rouge); }
.badge.role-user { color: var(--encre); border-color: var(--trait); }
.badge.role-resp { color: var(--vert); border-color: var(--vert); }
.badge.invitation { color: var(--ambre); border-color: var(--ambre); }
.badge.desactive { color: var(--encre-douce); background: var(--lin); }
.badge.vous { color: var(--encre-douce); border-color: var(--trait); }
.lien-action { font: inherit; font-size: .875rem; font-weight: 600; color: var(--rouge); background: none; border: 0; padding: 2px 6px; cursor: pointer; }
.lien-action:hover { color: var(--rouge-sombre); text-decoration: underline; }
.flash-success { border-left-color: var(--vert); }

/* -------------------------------------------------------------------------
   Formulaires publics (pages.md §2) : cadre étroit, fil rouge, écrans du wizard
   ------------------------------------------------------------------------- */
body.public { display: flex; justify-content: center; -webkit-text-size-adjust: 100%; line-height: 1.55; --fil-x: 22px; }
.cadre { width: 100%; max-width: 460px; min-width: 0; position: relative; padding: 0 24px 48px calc(var(--fil-x, 22px) + 34px); }
.fil { position: absolute; top: 0; bottom: 0; left: var(--fil-x, 22px); width: 2px; background: repeating-linear-gradient(to bottom, var(--trait) 0 7px, transparent 7px 13px); }
.fil-progres { position: absolute; top: 0; left: 0; width: 2px; height: 0; background: repeating-linear-gradient(to bottom, var(--rouge) 0 7px, transparent 7px 13px); transition: height .6s cubic-bezier(.65, 0, .3, 1); }
.point-croix { position: absolute; left: 50%; width: 13px; height: 13px; transform: translate(-50%, -50%) scale(0); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1) .3s; }
.point-croix::before, .point-croix::after { content: ""; position: absolute; background: var(--rouge); }
.point-croix::before { left: 5px; top: 0; width: 3px; height: 13px; }
.point-croix::after { left: 0; top: 5px; width: 13px; height: 3px; }
.point-croix.pose { transform: translate(-50%, -50%) scale(1); }
.public-header { padding: 26px 0 10px; display: flex; align-items: center; gap: 12px; }
.public-header .croix-logo { width: 26px; height: 26px; }
.public-header .croix-logo::before { left: 9px; width: 8px; height: 26px; }
.public-header .croix-logo::after { top: 9px; width: 26px; height: 8px; }
.entite { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-douce); }
.entite strong { color: var(--encre); font-weight: 500; }
.compteur { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--rouge); margin: 26px 0 10px; min-height: 1em; }

.ecran { display: none; }
.ecran.actif { display: block; animation: entre .4s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes entre { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ecran h1 { font-size: clamp(28px, 9vw, 48px); letter-spacing: -.015em; margin: 10px 0 18px; }
.ecran h1 .rouge { color: var(--rouge); }
.ecran h2 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 6px; }
.ecran h1:focus, .ecran h2:focus { outline: none; }
.ecran .sous-titre { margin: 0 0 26px; }
.ecran .sous-titre b { color: var(--encre); font-weight: 600; }

.champ { margin-bottom: 18px; }
.champ label, .legende { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.optionnel { font-weight: 400; color: var(--encre-douce); font-size: 13px; }
.cadre input[type="text"], .cadre input[type="email"], .cadre input[type="tel"], .cadre input[type="date"], .cadre textarea {
    width: 100%; min-width: 0; font: inherit; color: var(--encre);
    background: var(--lin); border: 1.5px solid transparent; border-radius: 6px;
    padding: 13px 14px; transition: border-color .15s, background .15s;
}
.cadre textarea { min-height: 96px; resize: vertical; }
.cadre select {
    width: 100%; font: inherit; color: var(--encre); appearance: none;
    background: var(--lin) no-repeat right 14px center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23211D1D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    border: 1.5px solid transparent; border-radius: 6px; padding: 13px 40px 13px 14px;
    transition: border-color .15s, background-color .15s; cursor: pointer;
}
.cadre select:focus { outline: none; border-color: var(--encre); background-color: var(--blanc); }
.champ.invalide select { border-color: var(--rouge); background-color: #FDF2F3; }
.cadre input:focus, .cadre textarea:focus { outline: none; border-color: var(--encre); background: var(--blanc); }
.champ.invalide input, .champ.invalide textarea { border-color: var(--rouge); background: #FDF2F3; }
.champ ul { list-style: none; padding: 0; margin: 5px 0 0; }
.champ ul li, .erreur { color: var(--rouge-sombre); font-size: 13px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* intl-tel-input: flags served by jsDelivr (the CSS bundle without assets is vendored by AssetMapper) */
.iti { --iti-path-flags-1x: url("https://cdn.jsdelivr.net/npm/intl-tel-input@29.2.3/dist/img/flags.webp"); --iti-path-flags-2x: url("https://cdn.jsdelivr.net/npm/intl-tel-input@29.2.3/dist/img/flags@2x.webp"); width: 100%; display: block; }
.iti__country-list { font-size: 14px; }
.cadre .iti input[type="tel"] { padding-left: 52px; }
.pot-de-miel { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { display: inline-block; font-weight: 600; font-size: 14px; margin: 0; padding: 9px 14px; background: var(--blanc); border: 1.5px solid var(--trait); border-radius: 999px; cursor: pointer; transition: all .12s; }
.chips input:checked + label { background: var(--rouge); border-color: var(--rouge); color: var(--blanc); }
.chips input:focus-visible + label { outline: 2px solid var(--encre); outline-offset: 2px; }
.groupe-chip { display: flex; align-items: center; gap: 5px; }
.aide-activite { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.5px solid var(--trait); background: var(--blanc); color: var(--encre-douce); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.aide-activite:hover { border-color: var(--encre); color: var(--encre); }
.compte-chips { font-family: var(--font-mono); font-size: 12px; color: var(--encre-douce); margin-top: 14px; }

.choix-liste { display: grid; gap: 8px; }
.choix-liste input { position: absolute; opacity: 0; pointer-events: none; }
.choix-liste label { font-weight: 600; font-size: 14px; text-align: left; padding: 12px 14px; background: var(--lin); border: 1.5px solid transparent; border-radius: 6px; cursor: pointer; color: var(--encre); margin: 0; }
.choix-liste input:checked + label { background: var(--encre); color: var(--blanc); }
.choix-liste input:focus-visible + label { outline: 2px solid var(--encre); outline-offset: 2px; }

.engagements { margin: 22px 0 6px; }
.engagements .case { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.engagements input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--rouge); flex: none; }
.engagements label { font-weight: 400; font-size: 14px; margin: 0; }
.engagements .case { flex-wrap: wrap; }
.engagements .case label { flex: 1 1 0; min-width: 0; }
.engagements .case ul, .engagements .case .erreur { flex-basis: 100%; margin: 4px 0 0; }
.engagements .champ.invalide input { outline: 2px solid var(--rouge); outline-offset: 2px; }

.actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.cadre .btn { font-size: 16px; font-weight: 700; background: var(--rouge); color: var(--blanc); border: none; border-radius: 6px; padding: 15px 26px; transition: background .15s, transform .1s; }
.cadre .btn:hover { background: var(--rouge-sombre); }
.cadre .btn:active { transform: translateY(1px); }
.retour { font: inherit; font-size: 14px; font-weight: 600; color: var(--encre-douce); background: none; border: none; cursor: pointer; text-decoration: underline; }
.retour:hover { color: var(--encre); }
.rassurance { font-size: 13px; color: var(--encre-douce); margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--trait); }
.coche { width: 56px; height: 56px; border-radius: 50%; background: var(--vert); display: grid; place-items: center; margin: 10px 0 18px; }
.coche svg { width: 30px; height: 30px; fill: none; stroke: var(--blanc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.modale { border: none; border-radius: 12px 12px 0 0; padding: 22px 24px 30px; width: 100%; max-width: 460px; margin: auto auto 0; box-shadow: 0 -8px 30px rgba(0,0,0,.15); }
.modale::backdrop { background: rgba(33, 29, 29, .45); }
.modale .tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.modale h3 { font-size: 18px; margin: 0; }
.modale .fermer { font: inherit; font-size: 22px; line-height: 1; background: none; border: none; cursor: pointer; color: var(--encre-douce); }
.modale .texte { margin: 0; color: var(--encre); }
@media (min-width: 640px) { .modale { border-radius: 12px; margin: auto; } }

/* Bénévole d'un jour (P2) : civilité, lecture obligatoire, signature dessinée */
.ecran .choix-liste.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ecran .choix-liste.compact label { text-align: center; }
.lien-modale { font: inherit; font-size: 14px; padding: 0; background: none; border: none; cursor: pointer; color: var(--rouge-sombre); text-decoration: underline; }
.modale-lecture[open] { max-width: 560px; display: flex; flex-direction: column; max-height: 80vh; }
.contenu-lecture { overflow-y: auto; overscroll-behavior: contain; padding-right: 10px; border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); text-align: left; }
.contenu-lecture .muted { font-size: 12px; font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--encre-douce); margin: 12px 0 4px; }
.contenu-lecture .risque { padding: 14px 0; border-bottom: 1px dashed var(--trait); }
.contenu-lecture .risque:last-child { border-bottom: none; }
.contenu-lecture h4 { font-size: 15px; margin: 0; }
.contenu-lecture ul { list-style: disc; margin: 0; padding-left: 18px; font-size: 14px; }
.contenu-lecture ul li { color: var(--encre); margin-bottom: 3px; }
.pied-lecture { padding-top: 16px; }
.pied-lecture .btn:disabled { background: var(--trait); cursor: not-allowed; }
.cadre-signature { display: block; width: 100%; height: 170px; background: var(--lin); border: 1.5px dashed var(--trait); border-radius: 6px; touch-action: none; cursor: crosshair; }
.champ.invalide .cadre-signature { border-color: var(--rouge); background: #FDF2F3; }
.effacer { font: inherit; font-size: 13px; font-weight: 600; color: var(--encre-douce); background: none; border: none; padding: 8px 0 0; cursor: pointer; text-decoration: underline; }
.effacer:hover { color: var(--encre); }
.documents { list-style: none; padding: 0; margin: 0 0 8px; }
.documents li { border-top: 1px solid var(--trait); }
.documents a { display: block; padding: 14px 2px; font-weight: 600; color: var(--encre); }
.documents a:hover { color: var(--rouge); }
.documents .muted { font-weight: 400; font-size: 13px; color: var(--encre-douce); }

/* Inscription bénévole (P1) et autorisation parentale (P4) */
.aide { font-size: 13px; color: var(--encre-douce); margin: 6px 0 0; }
.repli { margin: 0 0 18px; }
.repli[hidden] { display: none; }
.carte-info { background: var(--lin); border-left: 3px solid var(--rouge); border-radius: 0 6px 6px 0; padding: 14px 16px; margin: 0 0 18px; }
.carte-info h3 { font-size: 15px; margin: 0 0 6px; }
.carte-info p { font-size: 14px; margin: 0 0 8px; }
.carte-info p:last-child { margin-bottom: 0; }
.ligne-profil { margin-bottom: 8px; }
.facultatif { margin: 0 0 18px; }
.facultatif summary { font-size: 14px; font-weight: 600; color: var(--encre-douce); cursor: pointer; padding: 6px 0; }
.facultatif summary:hover { color: var(--encre); }
.facultatif[open] summary { margin-bottom: 10px; }
.cadre input[type="file"] { width: 100%; font: inherit; font-size: 14px; background: var(--lin); border: 1.5px dashed var(--trait); border-radius: 6px; padding: 14px; }
.fichiers { list-style: none; padding: 0; margin: 10px 0 0; }
.fichiers li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.fichiers li:last-child { border-bottom: none; }
.retirer { font: inherit; font-size: 13px; font-weight: 600; color: var(--rouge-sombre); background: none; border: none; cursor: pointer; text-decoration: underline; }

/* -------------------------------------------------------------------------
   Secrétariat : personnes (liste et fiche)
   ------------------------------------------------------------------------- */
.optin { font-size: 1.1rem; }
.optin-oui { color: var(--vert); }
.optin-non { color: var(--trait); }
.retour-liste { margin: 0 0 .5rem; font-size: .875rem; }
.badge.population { color: var(--rouge); border-color: var(--rouge); }
.badge.badge-attente { color: var(--ambre); border-color: var(--ambre); }
.engagements-lus { list-style: none; padding: 0; margin: 0 0 .75rem; font-size: .9375rem; }
.engagements-lus li { padding: .15rem 0; }
.apercu-signature { display: block; max-width: 16rem; height: auto; padding: .5rem; background: var(--lin); border-radius: 2px; }
.liste-documents { list-style: none; padding: 0; margin: 0; }
.liste-documents li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--trait); }
.liste-documents li:last-child { border-bottom: none; }
.liste-documents a { font-weight: 600; }
.fiche { display: grid; gap: 1.25rem; max-width: 36rem; }
.fiche h2 { font-size: 1rem; margin-bottom: .75rem; }
.infos { margin: 0; display: grid; gap: .6rem; }
.infos div { display: grid; grid-template-columns: 10rem 1fr; gap: .75rem; align-items: baseline; }
.infos dt { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-douce); }
.infos dd { margin: 0; }
@media (max-width: 600px) { .infos div { grid-template-columns: 1fr; gap: .1rem; } }

/* -------------------------------------------------------------------------
   Configuration : onglets, listes réordonnables, formulaire structure
   ------------------------------------------------------------------------- */
.onglets { display: flex; gap: .25rem; border-bottom: 1px solid var(--trait); margin: 0 0 1.5rem; flex-wrap: wrap; }
.onglets a { padding: .6rem .9rem; text-decoration: none; color: var(--encre-douce); font-weight: 600; font-size: .9375rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets a:hover { color: var(--encre); }
.onglets a.actif { color: var(--encre); border-bottom-color: var(--rouge); }
.carte-large { max-width: 900px; margin-bottom: 1.5rem; }
.carte-large h2 { font-size: 1.125rem; margin-bottom: .25rem; }
.config-liste { border-top: 1px solid var(--lin); margin-top: .75rem; }
/* One row: handle | name | Visible | Enregistrer | Supprimer ; the description spans the width below. */
.config-ligne { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto auto auto; gap: .5rem .9rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--lin); background: var(--blanc); }
.config-ligne.fantome { opacity: .4; background: var(--lin); }
.config-ligne .ligne-edition, .config-ligne .actions, .config-ligne .actions form { display: contents; }
.poignee { grid-column: 1; grid-row: 1; width: 1.75rem; height: 2.4rem; display: grid; place-items: center; font: inherit; font-size: 1.15rem; line-height: 1; letter-spacing: -.15em; color: var(--encre-douce); background: var(--lin); border: 0; border-radius: 4px; cursor: grab; user-select: none; }
.poignee:hover { color: var(--encre); background: var(--trait); }
.poignee:active { cursor: grabbing; }
.config-ligne input[type="text"] { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; font-weight: 600; }
.config-ligne .case-visible { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: .4rem; font-size: .875rem; white-space: nowrap; }
.config-ligne .case-visible input { accent-color: var(--rouge); }
.config-ligne .actions > button { grid-column: 4; grid-row: 1; }
.config-ligne .actions > form > button, .config-ligne .actions > span { grid-column: 5; grid-row: 1; white-space: nowrap; }
.config-ligne textarea { grid-column: 2 / -1; grid-row: 2; font: inherit; font-size: .875rem; padding: .4rem .6rem; border: 1px solid transparent; background: var(--lin); border-radius: 2px; resize: vertical; }
.config-ligne.masque input[type="text"], .config-ligne.masque textarea { color: var(--encre-douce); }
@media (max-width: 760px) {
    .config-ligne { grid-template-columns: 2rem minmax(0, 1fr) auto; }
    .config-ligne .actions > button { grid-column: 2; grid-row: 3; justify-self: start; }
    .config-ligne .actions > form > button, .config-ligne .actions > span { grid-column: 3; grid-row: 3; }
}
.statut-ordre { min-height: 1.2rem; font-size: .8125rem; margin: .5rem 0 0; }
.ajout { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.ajout input[type="text"] { flex: 1; min-width: 14rem; }
.notif { display: grid; gap: .75rem; max-width: 30rem; justify-items: start; }
.notif + .notif { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--trait); }
.notif h3 { font-size: .9375rem; margin: 0; }
.notif .muted { margin: -.5rem 0 0; }
.notif textarea { width: 100%; }
.notif textarea { font: inherit; font-family: var(--font-mono); font-size: .875rem; padding: .6rem .75rem; border: 1px solid transparent; background: var(--lin); border-radius: 2px; }
.config-form { display: grid; gap: 1.25rem; max-width: 40rem; }
.config-form .carte { max-width: none; }
.config-form h2 { font-size: 1rem; margin-bottom: .75rem; }
.config-form .champ label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .3rem; }
.config-form input[type="text"], .config-form input[type="email"] { width: 100%; min-width: 0; font: inherit; padding: .6rem .75rem; border: 1px solid transparent; border-radius: 2px; background: var(--lin); }
.config-form .aide { margin: .3rem 0 0; font-size: .8125rem; color: var(--encre-douce); }
.config-form .actions { margin-top: 0; }

/* Partage du formulaire (QR code + lien) */
.partage { display: flex; gap: 1.25rem; align-items: flex-start; max-width: 40rem; margin-bottom: 1.75rem; }
.partage-qr { flex: none; border: 1px solid var(--lin); }
.partage-texte { min-width: 0; flex: 1; }
.partage-texte h2 { font-size: 1rem; margin-bottom: .25rem; }
.partage-lien { display: flex; gap: .5rem; margin: .75rem 0 .5rem; }
.partage-lien input { flex: 1; min-width: 0; font-size: .8125rem; }
.partage-lien .btn { white-space: nowrap; padding: .5rem .9rem; }
.partage-texte p:last-child { margin: 0; font-size: .875rem; }
@media (max-width: 600px) { .partage { flex-direction: column; } .partage-lien { flex-direction: column; } }

/* Fiche : actions et édition */
.fiche-actions { display: flex; gap: 1rem; align-items: center; margin: -0.75rem 0 1.25rem; }
.fiche-actions form { display: inline; }
.lien-danger { color: var(--rouge-sombre); }
.fiche-edition { display: grid; gap: 1.25rem; max-width: 40rem; }
.fiche-edition .carte { max-width: none; }
.fiche-edition h2 { font-size: 1rem; margin-bottom: .75rem; }
.fiche-edition .champ label, .fiche-edition .legende { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .3rem; }
.fiche-edition input[type="text"], .fiche-edition input[type="email"], .fiche-edition input[type="tel"], .fiche-edition textarea { width: 100%; min-width: 0; font: inherit; padding: .6rem .75rem; border: 1px solid transparent; border-radius: 2px; background: var(--lin); }
.fiche-edition textarea { min-height: 5rem; resize: vertical; }
.fiche-edition .iti input[type="tel"] { padding-left: 52px; }
.fiche-edition .champ.invalide input, .fiche-edition .champ.invalide textarea { border-color: var(--rouge); background: #FDF2F3; }
.fiche-edition .champ ul { list-style: none; margin: .3rem 0 0; padding: 0; color: var(--rouge-sombre); font-size: .8125rem; }
.fiche-edition .chips label { font-size: .8125rem; padding: .4rem .75rem; }
.fiche-edition .choix-liste.compact { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.fiche-edition .choix-liste.compact label { font-size: .8125rem; padding: .5rem .75rem; }
.fiche-edition .engagements { margin: .5rem 0 0; }
.fiche-edition .engagements label { font-weight: 400; font-size: .875rem; }
.fiche-edition .actions { margin-top: 0; }

/* Permissions d'un utilisateur, invitation */
.permissions textarea { width: 100%; font: inherit; font-family: var(--font-mono); font-size: .875rem; padding: .6rem .75rem; border: 1px solid transparent; background: var(--lin); border-radius: 2px; resize: vertical; }
.erreurs { margin: 0 0 .75rem; padding: .6rem .9rem; list-style: none; border-left: 3px solid var(--rouge); background: #FDF2F3; color: var(--rouge-sombre); font-size: .875rem; }
.permissions { display: grid; gap: 1.25rem; max-width: 44rem; }
.permissions .carte { max-width: none; }
.permissions h2 { font-size: 1rem; margin-bottom: .25rem; }
.case-permission { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem 0; font-weight: 400; font-size: .9375rem; cursor: pointer; }
.case-permission input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--rouge); flex: none; }
.case-permission b { font-weight: 600; }
.grille-activites { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1rem; margin-top: .5rem; }
.case-permission.compacte { padding: .3rem 0; font-size: .875rem; }
.permissions .actions { margin-top: 0; }
