/* Page « L'équipe » : ouverture (avatars en orbite), organigramme qui se dessine, postes ouverts, candidature en
   quatre étapes (js/equipe.js). S'appuie sur site.css, discord.css (fiches du staff) et serveur.css (thème sombre). */

/* ------------------------------------------------------------------------------------------------ ouverture */
.eq-tete { position: relative; overflow: clip; padding: clamp(40px, 7vw, 96px) 0 clamp(30px, 5vw, 64px); background: radial-gradient(70% 90% at 80% 40%, rgba(88, 101, 242, 0.28), transparent 70%), radial-gradient(60% 80% at 10% 10%, rgba(45, 212, 174, 0.14), transparent 70%); }
.eq-tete-dedans { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.eq-titre { margin: 8px 0 14px; color: #fff; font: 900 clamp(2.6rem, 6.4vw, 5.2rem)/0.95 var(--police-titre); letter-spacing: -0.03em; text-transform: uppercase; }
.eq-titre span { display: inline-block; padding-right: 0.06em; background: linear-gradient(90deg, #8e97ff, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eq-intro .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

/* les avatars du staff tournent autour du logo du serveur ; le quatrième, vide, attend la prochaine recrue */
.eq-orbite { position: relative; width: min(100%, 420px); aspect-ratio: 1; justify-self: center; }
.eq-orbite-logo { position: absolute; inset: 28%; width: 44%; height: 44%; border-radius: 30%; box-shadow: 0 30px 80px -20px rgba(88, 101, 242, 0.8); }
.eq-anneau { position: absolute; inset: 6%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.16); }
.eq-sat { --a: 0deg; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; margin: -11% 0 0 -11%; border-radius: 50%; transform: rotate(var(--a)) translateY(-200%) rotate(calc(-1 * var(--a))); animation: eq-orbite 26s linear infinite; }
.eq-sat img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #111214; box-shadow: 0 0 0 5px #10111a, 0 16px 30px -10px rgba(0, 0, 0, 0.8); }
.s-1 { --a: 0deg; } .s-2 { --a: 90deg; } .s-3 { --a: 180deg; } .s-4 { --a: 270deg; }
.eq-sat-vide { display: grid; place-items: center; border: 2px dashed var(--accent-2); background: rgba(45, 212, 174, 0.12); color: var(--accent-2); font: 900 2rem/1 var(--police-titre); }
@keyframes eq-orbite { from { transform: rotate(var(--a)) translateY(-200%) rotate(calc(-1 * var(--a))); } to { transform: rotate(calc(var(--a) + 360deg)) translateY(-200%) rotate(calc(-1 * var(--a) - 360deg)); } }
html.reduit .eq-sat { animation: none; }
/* à l'arrivée, les satellites partent du centre */
.eq-orbite .eq-sat { transition: scale 0.9s cubic-bezier(0.3, 1.3, 0.5, 1); }
.eq-orbite .s-2 { transition-delay: 0.12s; } .eq-orbite .s-3 { transition-delay: 0.24s; } .eq-orbite .s-4 { transition-delay: 0.36s; }
html.anime:not(.tout-visible):not(.reduit) .eq-orbite:not(.vu) .eq-sat { scale: 0.2; }

/* ------------------------------------------------------------------------------------------------ organigramme */
/* De gauche à droite : une colonne par niveau (fondateur, administration, modération, postes ouverts). En haut de chaque
   colonne, sa pastille ; un trait relie les pastilles et se trace niveau après niveau, de gauche à droite, puis les
   cartes arrivent. Sur téléphone et tablette, les colonnes défilent de côté (on fait glisser), calées sur chaque niveau. */
.orga { --trait: rgba(255, 255, 255, 0.24); --g: clamp(28px, 3.4vw, 52px); position: relative; display: grid; grid-auto-flow: column; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--g); align-items: stretch; list-style: none; margin: 0; padding: 0; }
.orga-niveau { position: relative; display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 18px; min-width: 0; }
/* les cartes d'une même rangée ont la même hauteur */
.orga-cartes:not(.orga-postes) > li { display: flex; }
/* le trait qui relie la pastille d'un niveau à celle du précédent : il se trace de gauche à droite, à son tour */
.orga-niveau + .orga-niveau::before { content: ""; position: absolute; z-index: 0; top: 19px; left: calc(-50% - var(--g)); width: calc(100% + var(--g)); height: 2px; background: linear-gradient(90deg, var(--niv-avant, var(--trait)), var(--niv)); transform-origin: 0 50%; transition: transform 0.5s cubic-bezier(0.5, 0, 0.2, 1); }
.n-admin { --niv-avant: var(--accent-2); } .n-modo { --niv-avant: var(--accent-vif); } .n-ouvert { --niv-avant: var(--accent-vif); }
/* une petite flèche au bout du trait, juste avant la pastille */
.orga-niveau + .orga-niveau::after { content: ""; position: absolute; z-index: 0; top: 15px; left: calc(-1 * var(--g) / 2 - 6px); width: 8px; height: 8px; border-top: 2px solid var(--niv); border-right: 2px solid var(--niv); transform: rotate(45deg); transition: opacity 0.3s; }
.orga-niveau:nth-child(2)::before { transition-delay: 0.2s; } .orga-niveau:nth-child(3)::before { transition-delay: 0.75s; } .orga-niveau:nth-child(4)::before { transition-delay: 1.3s; }
.orga-niveau:nth-child(2)::after { transition-delay: 0.6s; } .orga-niveau:nth-child(3)::after { transition-delay: 1.15s; } .orga-niveau:nth-child(4)::after { transition-delay: 1.7s; }
html.anime:not(.tout-visible):not(.reduit) .orga:not(.vu) .orga-niveau::before { transform: scaleX(0); }
html.anime:not(.tout-visible):not(.reduit) .orga:not(.vu) .orga-niveau::after { opacity: 0; }
.orga-titre { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 14px 4px 4px; border-radius: 999px; background: #1b1c27; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--niv) 45%, transparent), 0 0 0 6px var(--dc-nuit); color: #fff; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.orga-titre span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--niv, var(--accent-2)); color: var(--encre); font: 900 0.85rem/1 var(--police-titre); letter-spacing: 0; }
/* les niveaux de l'équipe : turquoise pour le fondateur, bleu Discord ensuite, turquoise pour les postes ouverts */
.n-fondateur { --niv: var(--accent-2); } .n-admin { --niv: var(--accent-vif); } .n-modo { --niv: var(--accent-vif); } .n-ouvert { --niv: var(--accent-2); }
.orga-cartes { position: relative; display: grid; justify-items: stretch; gap: 12px; width: 100%; list-style: none; margin: 0; padding: 0; }
/* chaque niveau entre à son tour, de gauche à droite, après son trait */
.orga-niveau > .orga-titre, .orga-niveau > .orga-cartes { transition: transform 0.6s cubic-bezier(0.3, 1.3, 0.5, 1); }
.orga-niveau:nth-child(2) > * { transition-delay: 0.45s; } .orga-niveau:nth-child(3) > * { transition-delay: 1s; } .orga-niveau:nth-child(4) > * { transition-delay: 1.55s; }
html.anime:not(.tout-visible):not(.reduit) .orga:not(.vu) .orga-niveau > .orga-titre, html.anime:not(.tout-visible):not(.reduit) .orga:not(.vu) .orga-niveau > .orga-cartes { transform: translateX(-24px) scale(0.94); }

/* la carte d'un membre du staff : une carte de profil Discord (bannière de la couleur du rôle, photo qui déborde) */
.orga-carte {
  --c: var(--niv); position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 46px 16px 18px; overflow: hidden;
  border: 0; border-radius: 20px; background: #181922; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, rgba(255, 255, 255, 0.06)), 0 26px 50px -32px var(--c);
  color: #dbdee1; font: inherit; text-align: center; cursor: pointer; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s;
}
.orga-carte::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 92px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, #5865f2)); opacity: 0.85; transition: height 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.orga-carte:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 2px var(--c), 0 34px 60px -28px var(--c); }
.orga-carte:hover::before { height: 104px; }
.orga-carte:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.orga-av { position: relative; width: 104px; height: 104px; margin-bottom: 8px; }
.orga-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #111214; box-shadow: 0 0 0 6px #181922; transition: transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.orga-carte:hover .orga-av img { transform: scale(1.05) rotate(-3deg); }
.orga-statut { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; background: #23a55a; box-shadow: 0 0 0 5px #181922; }
.orga-nom { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; color: #fff; font: 900 1.35rem/1.15 var(--police-titre); }
.orga-nom .dc-tag { font-size: 0.6rem; font-family: var(--police); }
.orga-role { padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); font-weight: 700; font-size: 0.84rem; }
.orga-mission { margin: 4px 0 12px; color: #b6bccb; font-size: 0.92rem; line-height: 1.4; }
.orga-voir { margin-top: auto; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #fff; font-weight: 700; font-size: 0.82rem; transition: background-color 0.25s, color 0.25s; }
.orga-carte:hover .orga-voir { background: var(--c); color: var(--encre); }

/* les postes ouverts : quatre places libres, en pointillés, l'une sous l'autre */
.orga-postes { gap: 10px; }
.orga-poste { --ac: var(--accent-2); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--ac) 55%, transparent); background: color-mix(in srgb, var(--ac) 7%, transparent); color: #fff; text-decoration: none; transition: transform 0.25s, background-color 0.25s, border-color 0.25s; }
.orga-poste .ret-ic { width: 40px; height: 40px; border-radius: 12px; }
.orga-poste .ret-ic::after { inset: 10px; }
.orga-poste strong { font-size: 1rem; line-height: 1.2; }
.orga-poste small { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ac) 20%, transparent); color: color-mix(in srgb, var(--ac) 70%, #fff); font-weight: 800; font-size: 0.8rem; white-space: nowrap; }
.orga-poste:hover { transform: translateX(4px); border-style: solid; background: color-mix(in srgb, var(--ac) 16%, transparent); }
.orga-poste:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.orga-postes li { transition: transform 0.5s cubic-bezier(0.3, 1.3, 0.5, 1); }
.orga-postes li:nth-child(1) { transition-delay: 1.65s; } .orga-postes li:nth-child(2) { transition-delay: 1.75s; } .orga-postes li:nth-child(3) { transition-delay: 1.85s; } .orga-postes li:nth-child(4) { transition-delay: 1.95s; }
html.anime:not(.tout-visible):not(.reduit) .orga:not(.vu) .orga-postes li { transform: translateX(-16px); }
/* l'aide « fais glisser » : seulement quand les colonnes défilent */
.orga-glisse { display: none; }

/* ------------------------------------------------------------------------------------------------ postes */
.postes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.poste { --ac: var(--accent-2); display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 20px; border-radius: 22px; background: linear-gradient(170deg, color-mix(in srgb, var(--ac) 20%, #191a25), #13141c 60%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac) 35%, transparent); scroll-margin-top: 96px; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s; }
.poste:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 2px var(--ac), 0 30px 60px -34px var(--ac); }
.poste:target { box-shadow: inset 0 0 0 3px var(--ac); }
.poste-animateur, .poste-cm { --ac: var(--accent-vif); }
.poste p, .poste h3 { margin: 0; }
.poste-tete { display: flex; align-items: center; gap: 14px; }
.poste-ic .ret-ic { width: 52px; height: 52px; border-radius: 16px; box-shadow: 0 14px 28px -12px var(--ac); transition: transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.poste-ic .ret-ic::after { inset: 13px; }
.poste:hover .poste-ic .ret-ic { transform: rotate(-8deg) scale(1.08); }
.poste h3 { color: #fff; font: 900 1.4rem/1.05 var(--police-titre); text-transform: uppercase; text-wrap: balance; }
.poste-accroche { color: color-mix(in srgb, var(--ac) 50%, #fff); font-weight: 700; font-size: 1.02rem; }
.poste-sous { margin-top: 4px !important; color: #8f95a3; font-weight: 800; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.poste-missions { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; color: #c7cad1; font-size: 0.93rem; }
.poste-missions li { position: relative; padding-left: 22px; }
.poste-missions li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 14px; height: 14px; background: var(--ac); -webkit-mask: url("/img/serveur/i-coche.svg") center / contain no-repeat; mask: url("/img/serveur/i-coche.svg") center / contain no-repeat; }
.poste-profil { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: #b6bccb; font-size: 0.9rem; }
.poste-profil strong { color: #fff; }
.poste-postuler { margin-top: auto; justify-content: center; --fond: var(--ac); --texte-bouton: var(--encre); }
.poste-postuler span[aria-hidden] { display: inline-block; margin-left: 4px; transition: transform 0.25s; }
.poste-postuler:hover span[aria-hidden] { transform: translateX(4px); }

/* ------------------------------------------------------------------------------------------------ ouverture : les repères */
.eq-faits { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.12); color: #b6bccb; font-weight: 600; font-size: 0.9rem; }
.eq-faits li { display: grid; gap: 2px; }
.eq-faits strong { color: #fff; font: 900 clamp(1.5rem, 2.4vw, 2rem)/1 var(--police-titre); letter-spacing: -0.02em; }
.eq-faits strong { color: var(--accent-vif); }

/* ------------------------------------------------------------------------------------------------ candidature : comment ça se passe */
/* Quatre étapes en ligne, reliées par un trait, juste au-dessus du formulaire. */
.eq-etapes { --g: clamp(12px, 2vw, 24px); position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--g); max-width: 980px; margin: 0 auto clamp(28px, 4vw, 44px); padding: 0; list-style: none; counter-reset: none; }
.eq-etapes::before { content: ""; position: absolute; z-index: -1; top: 21px; left: calc((100% - 3 * var(--g)) / 8); right: calc((100% - 3 * var(--g)) / 8); height: 2px; background: linear-gradient(90deg, #8e97ff, #2dd4ae); opacity: 0.6; transform-origin: 0 50%; transition: transform 1.2s cubic-bezier(0.65, 0, 0.2, 1) 0.2s; }
html.anime:not(.tout-visible):not(.reduit) .eq-etapes:not(.vu)::before { transform: scaleX(0); }
.eq-etapes li { display: grid; justify-items: center; gap: 4px; text-align: center; }
.eq-etape-num { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border-radius: 50%; background: var(--accent-vif); color: var(--encre); font: 900 1.15rem/1 var(--police-titre); box-shadow: 0 0 0 6px var(--dc-nuit); }
.eq-etapes strong { color: #fff; font-size: 1.02rem; }
.eq-etapes small { color: #b6bccb; font-size: 0.88rem; line-height: 1.4; }
.page-equipe .chapeau b { color: #fff; }

/* ------------------------------------------------------------------------------------------------ candidature */
.cand-cadre { max-width: 860px; margin-inline: auto; }
.cand, .cand-fin { padding: clamp(20px, 3.4vw, 36px); border-radius: 24px; background: #15161f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 40px 90px -50px rgba(88, 101, 242, 0.7); color: #dbdee1; }
.cand fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.cand-etape + .cand-etape { margin-top: 34px; }
.cand[data-pret] .cand-etape + .cand-etape { margin-top: 0; }
.cand-etape > legend { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 0; color: #fff; font: 900 1.35rem/1.15 var(--police-titre); text-transform: uppercase; }
.cand-etape > legend span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #5865f2; color: #fff; font-size: 0.95rem; }
.cand[data-pret] .cand-etape > legend span { display: none; }
.cand[data-pret] .cand-sans-js { display: none; }
.cand-sans-js { color: #b6bccb; }
.cand-email a { color: #00a8fc; }

/* progression : quatre pastilles et une barre qui se remplit */
.cand-progres { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0 0 26px; padding: 0 0 14px; }
.cand-progres[hidden] { display: none; }
.cand-progres li[data-pas] { display: flex; align-items: center; gap: 8px; color: var(--dc-doux); font-weight: 700; font-size: 0.86rem; transition: color 0.3s; }
.cand-progres li[data-pas] span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #2b2d31; color: #dbdee1; font-size: 0.82rem; transition: background-color 0.3s, transform 0.3s; }
.cand-progres li.fait { color: #c7cad1; } .cand-progres li.fait span { background: #23a55a; color: #fff; }
.cand-progres li.actuel { color: #fff; } .cand-progres li.actuel span { background: #5865f2; color: #fff; transform: scale(1.12); }
.cand-barre { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: #2b2d31; overflow: hidden; }
.cand-barre i { display: block; height: 100%; background: linear-gradient(90deg, #5865f2, #2dd4ae); transform-origin: 0 50%; transform: scaleX(0.25); transition: transform 0.5s cubic-bezier(0.5, 0, 0.2, 1); }

/* une étape à la fois (js/equipe.js), qui arrive du bon côté */
.cand[data-pret] .cand-etape[hidden] { display: none; }
.cand-etape.vient-d { animation: cand-droite 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cand-etape.vient-g { animation: cand-gauche 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes cand-droite { from { transform: translateX(40px); } }
@keyframes cand-gauche { from { transform: translateX(-40px); } }
html.reduit .cand-etape { animation: none !important; }

.cand-brouillon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 20px; padding: 10px 14px; border-radius: 12px; background: rgba(45, 212, 174, 0.1); color: #c7fff4; font-size: 0.9rem; }
.cand-brouillon[hidden] { display: none; }
.cand-brouillon button { padding: 2px 4px; border: 0; background: none; color: #fff; font: 700 0.9rem var(--police); text-decoration: underline; cursor: pointer; }

/* étape 1 : le choix du poste, en grandes cartes (le bouton radio, caché à l'œil, reste au clavier et aux lecteurs d'écran) */
.cand-postes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cand-poste-choix { --ac: var(--accent-2); position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: #1e1f28; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); cursor: pointer; transition: box-shadow 0.25s, transform 0.25s, background-color 0.25s; }
.cand-poste-choix.poste-animateur, .cand-poste-choix.poste-cm { --ac: var(--accent-vif); }
.cand-poste-choix input { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); appearance: none; pointer-events: none; }
.cand-poste-choix .ret-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; }
.cand-poste-choix .ret-ic::after { inset: 11px; }
.cand-poste-choix strong { color: #fff; font-size: 1.05rem; }
.cand-poste-choix small { color: #b6bccb; font-size: 0.86rem; }
.cand-poste-choix:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--ac); }
.cand-poste-choix:has(input:checked) { background: color-mix(in srgb, var(--ac) 16%, #1e1f28); box-shadow: inset 0 0 0 2px var(--ac), 0 18px 40px -24px var(--ac); }
.cand-poste-choix:has(input:checked)::after { content: ""; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--ac) url("/img/serveur/i-coche.svg") center / 14px no-repeat; animation: cand-coche 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes cand-coche { from { transform: scale(0); } }
.cand-poste-choix:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }

/* champs */
.cand-groupe + .cand-groupe { margin-top: 24px; }
.cand-groupe-titre { margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: var(--accent-2); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.cand-champ { display: grid; gap: 6px; margin: 0 0 16px; }
.cand-champ > label, .cand-choix > legend { margin: 0; padding: 0; color: #fff; font-weight: 700; }
.cand-choix > legend { margin-bottom: 8px; }
.cand input[type="text"], .cand input[type="email"], .cand input[type="number"], .cand select, .cand textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 0; border-radius: 10px; background: #1e1f22; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #fff; font: 400 1rem/1.4 var(--police); transition: box-shadow 0.2s; }
.cand input[type="number"] { max-width: 9em; }
.cand textarea { resize: vertical; min-height: 100px; }
.cand input:focus, .cand select:focus, .cand textarea:focus { outline: none; box-shadow: inset 0 0 0 2px #5865f2; }
.cand [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #ff7a59 !important; }
.cand-aide { color: var(--dc-doux); font-size: 0.85rem; }
.cand-erreur { margin: 0; color: #ff9b80; font-weight: 600; font-size: 0.88rem; }
.cand-erreur:empty { display: none; }
.cand-erreur:not(:empty) { animation: cand-secoue 0.4s; }
@keyframes cand-secoue { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
html.reduit .cand-erreur { animation: none; }
.cand-compteur { justify-self: end; margin-top: -2px; color: var(--dc-doux); font-size: 0.8rem; font-variant-numeric: tabular-nums; transition: color 0.2s; }
.cand-compteur.ok { color: #2dd4ae; }
.cand-puces { display: flex; flex-wrap: wrap; gap: 8px; }
.cand-puce { position: relative; display: inline-flex; }
.cand-puce input { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); appearance: none; pointer-events: none; }
.cand-puce span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: #2b2d31; color: #dbdee1; font-weight: 600; font-size: 0.92rem; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s; }
.cand-puce span:hover { background: #404249; color: #fff; }
.cand-puce input:checked + span { background: #5865f2; color: #fff; transform: scale(1.03); }
.cand-puce input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.cand-consent { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 4px; color: #c7cad1; font-size: 0.92rem; cursor: pointer; }
.cand-consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: #5865f2; }
.cand-questions + .cand-questions { margin-top: 26px; }
.cand-questions > legend { margin-bottom: 12px; color: var(--accent-2); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.cand[data-pret] .cand-questions > legend { display: none; }
.cand[data-pret] .cand-questions + .cand-questions { margin-top: 0; }
.cand[data-pret] .cand-questions[hidden] { display: none; }
/* le champ piège des robots : invisible pour les personnes */
.cand-piege { display: none; }

.cand-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 24px 0 0; }
.cand-nav[hidden] { display: none; }
.cand-nav [data-precedent] { margin-right: auto; }

/* relecture */
.cand-recap { display: grid; gap: 14px; }
.recap-bloc { padding: 14px 16px; border-radius: 14px; background: #1e1f28; }
.recap-bloc h4 { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--accent-2); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.recap-bloc h4 button { padding: 4px 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #fff; font: 700 0.8rem var(--police); letter-spacing: 0; text-transform: none; cursor: pointer; }
.recap-bloc h4 button:hover { background: #5865f2; }
.recap-bloc dl { display: grid; gap: 8px; margin: 0; }
.recap-bloc dt { color: var(--dc-doux); font-size: 0.85rem; }
.recap-bloc dd { margin: 0; color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.recap-bloc .recap-vide { color: var(--dc-doux); font-style: italic; }
.cand-envoi-erreur { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 122, 89, 0.12); color: #ffb8a6; font-weight: 600; }
.cand-envoi-erreur[hidden] { display: none; }
.cand [data-envoyer][aria-busy="true"] { opacity: 0.75; cursor: progress; }

/* fin : réussite (la coche se dessine) ou envoi de secours */
.cand-fin { text-align: center; }
.cand-fin[hidden] { display: none; }
.cand-fin h3 { margin: 10px 0 8px; color: #fff; font: 900 1.6rem/1.1 var(--police-titre); text-transform: uppercase; }
.cand-fin p { margin: 0 auto 14px; max-width: 34rem; }
.succes-coche { width: 92px; height: 92px; fill: none; stroke: #2dd4ae; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.succes-coche circle { stroke-dasharray: 152; stroke-dashoffset: 152; animation: trace 0.8s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
.succes-coche path { stroke-width: 4.2; stroke-dasharray: 40; stroke-dashoffset: 40; animation: trace 0.45s 0.7s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
html.reduit .succes-coche circle, html.reduit .succes-coche path { animation: none; stroke-dashoffset: 0; }
.secours-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.secours-statut { min-height: 1.4em; color: #2dd4ae; font-weight: 700; }
.secours-adresse strong { color: #fff; user-select: all; }
.secours-texte { display: block; width: 100%; margin: 6px 0 14px; padding: 12px; border: 0; border-radius: 12px; background: #1e1f22; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: #c7cad1; font: 400 0.85rem/1.45 ui-monospace, "Cascadia Code", Consolas, monospace; text-align: left; resize: vertical; }

/* ------------------------------------------------------------------------------------------------ écrans moyens et petits */
@media (max-width: 1080px) {
  .postes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* l'organigramme défile de côté, calé sur chaque niveau ; on voit le bord du niveau suivant */
  .orga { grid-template-columns: none; grid-auto-columns: minmax(260px, 40%); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--marge); margin-inline: calc(-1 * var(--marge)); padding: 10px var(--marge) 20px; scrollbar-width: none; }
  .orga-niveau { scroll-snap-align: start; }
  .orga-glisse { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 0; color: #8f95a3; font-weight: 700; font-size: 0.86rem; }
  .orga-glisse span { width: 34px; height: 2px; background: linear-gradient(90deg, transparent, #8f95a3); position: relative; animation: orga-glisse 1.6s ease-in-out infinite; }
  .orga-glisse span::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 2px solid #8f95a3; border-right: 2px solid #8f95a3; transform: rotate(45deg); }
  html.reduit .orga-glisse span { animation: none; }
}
@keyframes orga-glisse { 50% { translate: 6px 0; } }
@media (max-width: 860px) {
  .eq-tete-dedans { grid-template-columns: minmax(0, 1fr); }
  .eq-orbite { width: min(78%, 340px); }
  .eq-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .eq-etapes::before { display: none; }
}
@media (max-width: 620px) {
  .postes, .cand-postes { grid-template-columns: minmax(0, 1fr); }
  .cand-progres li[data-pas] { font-size: 0; gap: 0; justify-content: center; }
  .cand-progres li.actuel { font-size: 0.8rem; }
  .orga { grid-auto-columns: 80%; }
  .eq-faits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cand-nav .bouton { flex: 1; justify-content: center; }
}
@media print {
  .eq-orbite, .cand-nav, .cand-progres { display: none !important; }
}

/* « Continuer » : bouton plein sur fond sombre */
.cand-nav [data-suivant] { --fond: #5865f2; --texte-bouton: #fff; }
.cand-nav [data-suivant]:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px rgba(88, 101, 242, 0.8); }
