/* Espace client AG Digital Hub — mobile d'abord (360 px), clair / sombre. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/space-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Clair : encre #0B2530 sur #F6F8FA. L'accent des textes et boutons est un cyan plus profond
   (#0E7490, 5,4:1 sur blanc) : le #0891B2 de la marque n'atteint pas 4,5:1 en texte courant. */
:root {
  --accent: #0e7490;
  --accent-texte: #ffffff;
  --marque: #0891b2;
  --fond: #f6f8fa;
  --surface: #ffffff;
  --surface-2: #eef3f6;
  --texte: #0b2530;
  --discret: #4a5d68;
  --bord: #c9d5dc;
  --erreur: #b91c1c;
  --erreur-fond: #fef2f2;
  --succes: #047857;
  --succes-fond: #ecfdf5;
  --attente: #92400e;
  --attente-fond: #fffbeb;
  --logo-jambes: #0b2530;
  --logo-barre: #0891b2;
  --rayon: 8px;
  --titres: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #22d3ee;
    --accent-texte: #060d14;
    --marque: #22d3ee;
    --fond: #060d14;
    --surface: #0d1824;
    --surface-2: #122131;
    --texte: #f2fcff;
    --discret: #9fb3c2;
    --bord: #24364a;
    --erreur: #fca5a5;
    --erreur-fond: #2a1215;
    --succes: #6ee7b7;
    --succes-fond: #0b2620;
    --attente: #fcd34d;
    --attente-fond: #2a2110;
    --logo-jambes: #22d3ee;
    --logo-barre: #f2fcff;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.evitement {
  position: absolute;
  left: -9999px;
}
.evitement:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 16px;
}

.invisible {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* Logo « Trajectoire » : couleurs du thème, jamais d'effet. */
.logo {
  width: 32px;
  height: 32px;
  flex: none;
  display: block;
}
.logo-jambes {
  stroke: var(--logo-jambes);
}
.logo-barre {
  fill: var(--logo-barre);
}

/* En-tête */
.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--bord);
}
.entete-haut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  min-width: 0;
}
.marque {
  text-decoration: none;
  color: var(--texte);
}
.marque-agence {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.marque-texte {
  display: grid;
  line-height: 1.15;
}
.marque-nom {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.marque-espace {
  font-size: 0.8125rem;
  color: var(--discret);
}
.site-client {
  font-size: 0.875rem;
  color: var(--discret);
  padding-left: 12px;
  border-left: 1px solid var(--bord);
}
/* Navigation sur une seule ligne, même à 360 px ; défilement horizontal en dernier recours (écrans plus étroits). */
.entete nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  font-size: 0.9375rem;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  /* Marge intérieure : l'anneau de focus n'est pas rogné par le défilement. */
  padding: 4px;
  margin: -4px;
}
@media (min-width: 640px) {
  .entete nav {
    gap: 20px;
    font-size: 1rem;
    overflow: visible;
    padding: 0;
    margin: 0;
  }
}
.entete nav a,
.entete nav button.lien {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--texte);
  text-decoration: none;
}
.entete nav a:hover,
.entete nav button.lien:hover {
  color: var(--accent);
  text-decoration: underline;
}
.entete nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.entete nav form {
  margin: 0;
}

main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  flex: 1 0 auto;
}
main.large {
  max-width: 1040px;
}

h1,
h2,
h3 {
  font-family: var(--titres);
  letter-spacing: -0.015em;
}
h1 {
  font-size: 1.625rem;
  line-height: 1.2;
  font-weight: 600;
  margin: 12px 0 16px;
}
h2 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 600;
  margin: 0 0 8px;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.pied {
  width: 100%;
  border-top: 1px solid var(--bord);
  margin-top: 32px;
  padding: 24px 16px 32px;
  color: var(--discret);
  font-size: 0.875rem;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
}
.pied p {
  margin: 0;
}
.pied strong {
  color: var(--texte);
  font-weight: 600;
}
.pied .logo-pied {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

/* Boutons */
button,
.bouton {
  font: inherit;
  display: inline-block;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--rayon);
  border: 2px solid var(--accent);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.principal {
  background: var(--accent);
  color: var(--accent-texte);
  font-weight: 600;
  width: 100%;
}
.secondaire,
.bouton {
  background: transparent;
  color: var(--accent);
}
button.lien {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
}

/* Messages */
.message {
  padding: 12px 16px;
  border-radius: var(--rayon);
  border-left: 4px solid;
  margin: 0 0 16px;
}
.succes {
  background: var(--succes-fond);
  border-color: var(--succes);
}
.alerte,
.recapitulatif {
  background: var(--erreur-fond);
  border-color: var(--erreur);
}
.recapitulatif {
  border-left: 4px solid var(--erreur);
  border-radius: var(--rayon);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.recapitulatif ul {
  margin: 0;
  padding-left: 20px;
}
.recapitulatif a {
  color: var(--texte);
}

/* Liste des sections */
.sections {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.sections a {
  display: block;
  color: var(--texte);
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  font-weight: 600;
  text-decoration: none;
}

/* Formulaire */
.liste {
  display: grid;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
fieldset.liste {
  margin-top: 8px;
}
legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 8px;
}
.ligne {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
}
.ligne > summary {
  padding: 12px 16px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.ligne[open] > summary {
  border-bottom: 1px solid var(--bord);
}
.ligne-corps {
  padding: 12px 16px 16px;
  display: grid;
  gap: 16px;
}
.ligne .ligne {
  background: var(--fond);
}

.champ {
  display: grid;
  gap: 4px;
}
.champ label {
  font-weight: 600;
}
.champ input[type="text"],
.champ textarea {
  font: inherit;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--texte);
}
.champ.case {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
}
.champ.case input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--accent);
}
.champ.case .aide,
.champ.case .erreur {
  grid-column: 1 / -1;
}
.aide {
  margin: 0;
  color: var(--discret);
  font-size: 0.875rem;
}
.erreur {
  margin: 0;
  color: var(--erreur);
  font-weight: 600;
}
.en-erreur input[type="text"],
.en-erreur textarea {
  border: 2px solid var(--erreur);
}
.retirer label {
  font-weight: 400;
  color: var(--discret);
}

.actions {
  position: sticky;
  bottom: 0;
  padding: 16px 0;
  background: var(--fond);
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

/* Historique */
.historique {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.historique li {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
}
.historique .date {
  font-weight: 600;
}
.historique .actuelle {
  color: var(--discret);
  font-size: 0.875rem;
}
.historique .bouton {
  justify-self: start;
}

@media (min-width: 640px) {
  .principal {
    width: auto;
  }
  .actions {
    grid-auto-flow: column;
    justify-content: start;
  }
}

/* Accueil : tableau de bord */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.discret {
  color: var(--discret);
}
.tableau {
  display: grid;
  gap: 32px;
}
.colonne-principale,
.colonne-laterale {
  display: grid;
  gap: 32px;
  align-content: start;
  min-width: 0;
}
@media (min-width: 960px) {
  .tableau {
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 40px;
  }
}

/* Bandeau d'état */
.publication {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 20px 16px;
  display: grid;
  gap: 16px;
}
.publication h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--discret);
  margin: 0;
}
.publication .message {
  margin: 0;
}
.message-titre {
  margin: 0;
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.125rem;
}
.message-aide {
  margin: 4px 0 0;
  color: var(--discret);
}
.attente {
  background: var(--attente-fond);
  border-color: var(--attente);
}
.actions-etat {
  display: grid;
  gap: 8px;
}
.actions-etat form {
  margin: 0;
}
@media (min-width: 640px) {
  .actions-etat {
    grid-auto-flow: column;
    justify-content: start;
  }
}

/* Suivi en étapes : vertical sur mobile, horizontal ensuite. Repères dessinés en CSS, sans icône. */
.suivi {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.etape {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 12px;
  align-items: center;
  position: relative;
  padding: 6px 0;
}
.etape-repere {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bord);
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--discret);
  background: var(--surface);
  position: relative;
  z-index: 1;
}
.etape-nom {
  font-weight: 600;
  line-height: 1.2;
}
.etape-etat {
  font-size: 0.8125rem;
  color: var(--discret);
}
.etape:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -6px;
  width: 2px;
  background: var(--bord);
}
.etape-fait .etape-repere {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-texte);
}
.etape-fait:not(:last-child)::after {
  background: var(--accent);
}
.etape-en-cours .etape-repere,
.etape-a-faire .etape-repere {
  border-color: var(--accent);
  border-width: 3px;
  color: var(--accent);
}
.etape-verification .etape-repere {
  border-color: var(--attente);
  border-width: 3px;
  color: var(--attente);
}
.etape-verification .etape-etat {
  color: var(--attente);
  font-weight: 600;
}
.etape[aria-current="step"] .etape-etat {
  color: var(--texte);
}
@media (min-width: 640px) {
  .suivi {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }
  .etape {
    grid-template-columns: 1fr;
    justify-items: start;
    row-gap: 6px;
    padding: 0 8px 0 0;
  }
  .etape-repere {
    grid-row: auto;
  }
  .etape:not(:last-child)::after {
    left: 34px;
    right: 6px;
    top: 13px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* Ce qui va changer */
.changements .intro {
  margin-bottom: 8px;
}
.liste-changements {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 3px solid var(--marque);
}
.liste-changements li {
  display: grid;
  gap: 2px;
  padding: 8px 0 8px 14px;
}
.liste-changements li + li {
  border-top: 1px solid var(--bord);
}
.liste-changements .ou {
  font-size: 0.8125rem;
  color: var(--discret);
}
.liste-changements .quoi {
  font-weight: 600;
}
.autres {
  margin: 8px 0 0 17px;
  color: var(--discret);
}

/* Aperçu intégré */
.apercu-tete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.apercu-tete h2 {
  margin: 0;
}
.bascule {
  display: inline-flex;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 2px;
  background: var(--surface);
}
.bascule[hidden] {
  display: none;
}
.bascule button {
  min-height: 36px;
  padding: 4px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--texte);
}
.bascule button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-texte);
  font-weight: 600;
}
.apercu .intro {
  margin: 8px 0 12px;
}
.cadre {
  background: var(--surface-2);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 12px;
  display: grid;
  justify-items: center;
}
.cadre iframe {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--bord);
  border-radius: 6px;
  background: #ffffff;
}
.cadre[data-largeur="mobile"] iframe {
  max-width: 390px;
}
.apercu > p:last-child {
  margin: 8px 0 0;
}

/* Votre site en un coup d'œil : liste de mesures, pas de cartes */
.chiffres {
  margin: 0;
  border-top: 1px solid var(--bord);
}
.chiffres > div {
  display: grid;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bord);
}
.chiffres dt {
  font-size: 0.8125rem;
  color: var(--discret);
}
.chiffres dd {
  margin: 0;
  display: grid;
  gap: 2px;
  font-weight: 600;
}
.chiffres dd .discret,
.chiffres dd .mesure.discret {
  font-weight: 400;
}
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pastille::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.pastille.ok {
  color: var(--succes);
}
.pastille.ko {
  color: var(--erreur);
}
.chiffres dd:has(.pastille) {
  display: block;
}
.indisponible {
  color: var(--discret);
  font-weight: 400;
  font-style: italic;
}

/* Raccourcis */
.raccourcis .sections a {
  display: grid;
  gap: 2px;
  padding: 14px 40px 14px 16px;
  position: relative;
}
.raccourcis .sections a::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
.raccourcis .sections a:hover {
  border-color: var(--accent);
}
.raccourci-titre {
  font-family: var(--titres);
  font-weight: 600;
  font-size: 1.0625rem;
}
.raccourci-aide {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--discret);
}
.liens-secondaires {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pastille.attente-site {
  color: var(--attente);
}

/* Aide */
.intro {
  color: var(--discret);
  margin: 0 0 16px;
}
.faq {
  border-top: 1px solid var(--bord);
}
.question {
  border-bottom: 1px solid var(--bord);
}
.question > summary {
  cursor: pointer;
  padding: 12px 4px;
  min-height: 44px;
  font-weight: 600;
}
.question[open] > summary {
  color: var(--accent);
}
.reponse {
  padding: 0 4px 16px 20px;
}
.reponse p {
  margin: 0 0 8px;
  max-width: 62ch;
}
.encart-contact {
  margin-top: 32px;
  padding: 20px 16px;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-left: 4px solid var(--marque);
  border-radius: var(--rayon);
}
.encart-contact p {
  margin: 0 0 8px;
}
