/* Mon parcours DIFÉA® — direction artistique tirée de difea.fr
   Bleu nuit pour les titres et le bouton principal, ardoise pour le texte,
   bleu vif pour les petites étiquettes, fond bleu très clair en dégradé,
   la « trajectoire » (une ligne et des points, le point orange = où j'en suis). */

:root {
  --nuit: #142B45;        /* titres, bouton principal */
  --ardoise: #334155;     /* texte courant */
  --ardoise-doux: #64748B;
  --bleu: #1D4ED8;        /* étiquettes, liens */
  --bleu-clair: #EAF5FF;  /* fond */
  --carte: #FFFFFF;
  --trait: #CBD5E1;
  --orange: #F97316;      /* repère « vous êtes ici », jamais pour du texte */
  --sarcelle: #0E6F78;    /* phase préliminaire */
  --violet: #5B21B6;      /* phase d'investigation */
  --vert: #4F7C5A;        /* phase de conclusion */
  --rayon: 8px;
  --ombre: 0 1px 2px rgba(20, 43, 69, .06), 0 4px 16px rgba(20, 43, 69, .06);
  --police: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 18px/1.6 var(--police);
  color: var(--ardoise);
  background: var(--bleu-clair) radial-gradient(ellipse 80% 40% at 30% 0%, #9CC5FF 0%, rgba(156, 197, 255, 0) 70%) no-repeat;
  min-height: 100vh;
}
a { color: var(--bleu); }
h1, h2, h3 { color: var(--nuit); line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }

/* Étiquette en capitales, filet à gauche — comme sur difea.fr */
.etiquette {
  display: block;
  border-left: 2px solid var(--bleu);
  padding-left: .6rem;
  margin-bottom: .75rem;
  color: var(--bleu);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Marque */
.marque { color: var(--nuit); font-weight: 700; text-decoration: none; font-size: 1.2rem; letter-spacing: -.01em; }
.marque sup { font-size: .55em; font-weight: 400; }
.marque-grande { font-size: 3rem; line-height: 1; display: block; margin-bottom: .5rem; }

/* Mise en page */
.bandeau-test { background: #FEF3C7; color: #78350F; text-align: center; padding: .3rem; font-size: .85rem; }
.entete { display: flex; align-items: center; justify-content: space-between; padding: 1rem; max-width: 64rem; margin: 0 auto; }
.entete form { margin: 0; }
.lien-discret { background: none; border: 0; color: var(--ardoise-doux); font: inherit; font-size: .9rem; cursor: pointer; padding: .5rem; text-decoration: underline; }
.cadre { max-width: 64rem; margin: 0 auto; display: flex; gap: 2rem; padding: 0 1rem 6rem; }
main { flex: 1; min-width: 0; max-width: 40rem; }
.seul { max-width: 26rem; margin: 2rem auto; padding: 0 1rem; }

/* Navigation : barre latérale sur ordinateur, barre en bas sur téléphone */
.nav { list-style: none; margin: 0; padding: 0; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: var(--rayon); color: var(--ardoise); text-decoration: none; font-size: .95rem; }
.nav a[aria-current="page"] { background: var(--carte); color: var(--nuit); font-weight: 700; box-shadow: var(--ombre); }
.nav svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-laterale { width: 13rem; flex: none; }
.nav-bas { display: none; }

@media (max-width: 760px) {
  .nav-laterale { display: none; }
  .cadre { padding-bottom: 6rem; }
  .nav-bas {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--carte); border-top: 1px solid var(--trait);
    padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .nav-bas li { flex: 1; }
  .nav-bas a { flex-direction: column; gap: .15rem; padding: .35rem .1rem; font-size: .7rem; text-align: center; }
  .nav-bas a[aria-current="page"] { box-shadow: none; background: none; color: var(--bleu); }
}

/* Cartes */
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.25rem; margin-bottom: 1rem; }
.carte > :last-child { margin-bottom: 0; }
.carte > label:first-of-type { margin-top: 0; }
.meta { color: var(--ardoise-doux); font-size: .9rem; }

/* Bouton principal : un seul par écran */
.bouton {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .95rem 1.25rem; margin-top: 1rem;
  background: var(--nuit); color: #fff; border: 0; border-radius: var(--rayon);
  font: 600 1rem/1.2 var(--police); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 43, 69, .25);
}
.bouton:hover { background: #0B1D31; }
.bouton::after { content: "→"; }
.bouton-secondaire { background: none; color: var(--nuit); box-shadow: none; border: 1.5px solid var(--nuit); }
.bouton-secondaire:hover { background: var(--carte); }

/* Formulaires */
label { display: block; margin: 1rem 0 .3rem; color: var(--nuit); font-weight: 600; font-size: .95rem; }
input, textarea, select {
  width: 100%; padding: .75rem; font: 1rem var(--police); color: var(--ardoise);
  background: var(--carte); border: 1px solid #94A3B8; border-radius: var(--rayon);
}
input:focus, textarea:focus, select:focus { border-color: var(--bleu); outline: 2px solid rgba(29, 78, 216, .2); }
.erreur { color: #B91C1C; background: #FEF2F2; border-radius: var(--rayon); padding: .6rem .8rem; }

/* La trajectoire : phases et étapes reliées par une ligne */
.trajectoire { list-style: none; margin: 0; padding: 0; }
.trajectoire li { position: relative; padding: 0 0 1.1rem 2rem; }
.trajectoire li::before { /* la ligne */
  content: ""; position: absolute; left: .45rem; top: 1rem; bottom: -.2rem; width: 2px; background: var(--trait);
}
.trajectoire li:last-child::before { display: none; }
.trajectoire .point {
  position: absolute; left: 0; top: .3rem; width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--carte); border: 2px solid var(--trait);
}
.trajectoire .faite .point { background: var(--couleur-phase, var(--nuit)); border-color: var(--couleur-phase, var(--nuit)); }
.trajectoire .faite .point::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.trajectoire .faite::before { background: var(--couleur-phase, var(--nuit)); }
.trajectoire .ici .point { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 5px rgba(249, 115, 22, .2); }
.trajectoire .ici { font-weight: 700; color: var(--nuit); }
.trajectoire .ici .meta { font-weight: 400; }

.phase { --couleur-phase: var(--nuit); }
.phase-preliminaire { --couleur-phase: var(--sarcelle); }
.phase-investigation { --couleur-phase: var(--violet); }
.phase-conclusion { --couleur-phase: var(--vert); }
.phase h2 { display: flex; align-items: center; gap: .5rem; color: var(--couleur-phase); }
.pastille { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 99px; background: var(--bleu-clair); color: var(--nuit); }

/* Jauge des 3 phases sur « Où j'en suis » */
.jauge { display: flex; gap: .35rem; margin: .5rem 0 1rem; }
.jauge span { flex: 1; height: 6px; border-radius: 3px; background: var(--trait); }
.jauge .passee { background: var(--nuit); }
.jauge .en-cours { background: var(--orange); }

.vide { color: var(--ardoise-doux); font-style: italic; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Écrans complets --------------------------------------------------- */
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.annonce { background: #ECFDF5; color: #065F46; border-radius: var(--rayon); padding: .6rem .8rem; }
.carte-lien { display: block; color: inherit; text-decoration: none; }
.carte-lien:hover { outline: 2px solid var(--bleu); }
.carte-lien h2 { margin-top: .25rem; }
.lien-fleche { color: var(--bleu); font-weight: 600; }
.lien-fleche::after { content: " →"; }
.case { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.case input { width: 1.3rem; height: 1.3rem; }
textarea { resize: vertical; }
details summary { cursor: pointer; color: var(--bleu); font-weight: 600; margin-top: .75rem; }
.liste-simple { padding-left: 1.2rem; margin: 0; }

/* États des outils */
.etat { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 99px; }
.etat-a_faire { background: #FFEDD5; color: #9A3412; }
.etat-en_cours { background: #DBEAFE; color: #1E40AF; }
.etat-termine { background: #DCFCE7; color: #166534; }

/* Messagerie */
.fil { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.bulle { background: var(--carte); border-radius: var(--rayon); padding: .7rem .9rem; max-width: 85%; box-shadow: var(--ombre); }
.bulle p { margin: .2rem 0 0; }
.bulle.moi { align-self: flex-end; background: var(--nuit); color: #fff; }
.bulle.moi .meta { color: #CBD5E1; }
.carte .bulle { box-shadow: none; border: 1px solid var(--trait); }

/* Espace consultante */
main.large { max-width: 72rem; margin: 0 auto; padding: 0 1rem 4rem; }
.onglets { display: flex; gap: .25rem; max-width: 72rem; margin: 0 auto 1rem; padding: 0 1rem; overflow-x: auto; }
.onglets a { padding: .5rem .9rem; border-radius: var(--rayon); color: var(--ardoise); text-decoration: none; white-space: nowrap; }
.onglets a[aria-current="page"] { background: var(--carte); color: var(--nuit); font-weight: 700; box-shadow: var(--ombre); }
.titre-action { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.titre-action h1 { margin: 0; }
.bouton-court { width: auto; margin: 0; }
.etroit { max-width: 36rem; }
.tableau-defilant { overflow-x: auto; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); }
.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu); padding: .8rem; border-bottom: 1px solid var(--trait); }
.tableau td { padding: .8rem; border-bottom: 1px solid #E2E8F0; vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.pastille-alerte { background: #FFEDD5; color: #9A3412; }
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: start; }
@media (max-width: 900px) { .grille { grid-template-columns: 1fr; } }
.grille .bouton { margin-top: .75rem; }
.liste-actions { list-style: none; margin: 0 0 .5rem; padding: 0; }
.liste-actions li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid #EEF2F6; flex-wrap: wrap; }
.liste-actions form { margin: 0; }
.a-droite { margin-left: auto !important; }
.a-droite .lien-discret { padding: .2rem; font-size: .85rem; }
.case-bouton { width: 1.5rem; height: 1.5rem; border: 2px solid var(--trait); border-radius: 50%; background: var(--carte); color: #fff; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; }
.case-bouton.cochee { background: var(--nuit); border-color: var(--nuit); }
.barre { text-decoration: line-through; color: var(--ardoise-doux); }
.zone-danger { margin-top: 2rem; padding: 1rem; border: 1px solid #FCA5A5; border-radius: var(--rayon); background: #FFF; }
.zone-danger summary { color: #B91C1C; }
.bouton-danger { background: #B91C1C; box-shadow: none; }
.bouton-danger::after { content: ""; }

/* Impression / export PDF */
.imprimable { max-width: 44rem; margin: 2rem auto; padding: 0 1rem; }
@media print {
  body { background: #fff; font-size: 12pt; }
  .bandeau-test, .pas-imprime, .nav-bas, .nav-laterale, .entete { display: none !important; }
  .imprimable { margin: 0; }
  h2 { break-after: avoid; }
}
.entete-large { max-width: 72rem; }
.pied-nav { font-size: .8rem; color: var(--ardoise-doux); padding: 1rem .75rem; }
.pied-nav a { color: var(--ardoise-doux); }
.en-ligne { display: inline; }
.exports a { font-weight: 600; }
.texte-long p { margin-bottom: .8rem; }
.lien-danger { color: #B91C1C; padding-left: 0; }

/* Bouton œil : afficher / masquer le mot de passe */
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 3.6rem; }
.bascule-mdp {
  position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  width: 2.9rem; height: 2.9rem; padding: 0; display: flex; align-items: center; justify-content: center;
  background: none; color: var(--ardoise); border: 0; border-radius: 6px; cursor: pointer;
}
.bascule-mdp svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bascule-mdp:hover { background: var(--bleu-clair); }
.bascule-mdp[aria-pressed="true"] { color: var(--bleu); }
