/* polices servies par le site (pas de Google Fonts : l'adresse des visiteurs n'est envoyée à personne) — licence SIL OFL */
@font-face {
  font-family: Archivo;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src:
    url('/static/polices/archivo-latin-wdth-normal.woff2') format('woff2-variations'),
    url('/static/polices/archivo-latin-wdth-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/static/polices/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('/static/polices/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('/static/polices/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}

/* Métralivo — feuille de style du site.
   Calque bleuté (fond) + marine (encre) + turquoise (réseaux, actions) + ambre (à vérifier, jamais de rouge qui fait peur). */
:root {
  --marine: #14213d;
  --marine-2: #2a3b60;
  --encre-2: #4a5672;
  --encre-3: #5f6a80;
  --calque: #eef3f6;
  --papier: #fff;
  --trait: #cbd7e1;
  --trait-fin: #dfe7ee;
  --grille: rgb(20 33 61 / 5.5%);
  --turq: #117068;
  --turq-vif: #2ec4b6;
  --turq-doux: #ddf4f1;
  --ambre: #9a5b00;
  --ambre-doux: #fcefd6;
  --ok: #1c7a50;
  --ok-doux: #e0f2e8;
  --gris-doux: #e8edf2;
  --f-titre: 'Archivo', 'Arial Narrow', arial, sans-serif;
  --f-texte: 'IBM Plex Sans', 'Segoe UI', arial, sans-serif;
  --r: 6px;
  --r-grand: 10px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --marine: #e8eef6;
    --marine-2: #c8d3e3;
    --encre-2: #aeb9cc;
    --encre-3: #8995aa;
    --calque: #0e1a30;
    --papier: #15243f;
    --trait: #2b3d60;
    --trait-fin: #22324f;
    --grille: rgb(200 220 240 / 6%);
    --turq: #45d4c6;
    --turq-vif: #2ec4b6;
    --turq-doux: #123d45;
    --ambre: #f2b451;
    --ambre-doux: #3a2e14;
    --ok: #5cd39a;
    --ok-doux: #143a2a;
    --gris-doux: #1e2d49;

    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --marine: #e8eef6;
  --marine-2: #c8d3e3;
  --encre-2: #aeb9cc;
  --encre-3: #8995aa;
  --calque: #0e1a30;
  --papier: #15243f;
  --trait: #2b3d60;
  --trait-fin: #22324f;
  --grille: rgb(200 220 240 / 6%);
  --turq: #45d4c6;
  --turq-vif: #2ec4b6;
  --turq-doux: #123d45;
  --ambre: #f2b451;
  --ambre-doux: #3a2e14;
  --ok: #5cd39a;
  --ok-doux: #143a2a;
  --gris-doux: #1e2d49;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--calque);
  color: var(--marine);
  font: 16px/1.6 var(--f-texte);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--turq);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--marine);
}

:focus-visible {
  outline: 2.5px solid var(--turq-vif);
  outline-offset: 2px;
  border-radius: 3px;
}

.enveloppe {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.etroit {
  max-width: 720px;
}

/* ---------- en-tête ---------- */
.tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.tete .logo {
  flex: none;
}

.tete .logo img {
  height: 30px;
  width: auto;
  max-width: none;
}

.logo .sombre {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo .clair {
    display: none;
  }

  :root:not([data-theme='light']) .logo .sombre {
    display: block;
  }
}

:root[data-theme='dark'] .logo .clair {
  display: none;
}

:root[data-theme='dark'] .logo .sombre {
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 500;
  font-size: 15px;
}

.nav a {
  color: var(--encre-2);
  text-decoration: none;
}

.nav a:hover {
  color: var(--marine);
}

.nav form {
  margin: 0;
}

@media (width <= 720px) {
  .nav .masque-mobile {
    display: none;
  }

  .nav {
    gap: 14px;
  }
}

/* ---------- boutons, champs ---------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 16px var(--f-texte);
  border-radius: var(--r);
  padding: 12px 20px;
  border: 1.5px solid var(--marine);
  background: var(--marine);
  color: var(--calque);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.bouton:hover {
  background: var(--marine-2);
  border-color: var(--marine-2);
  color: var(--calque);
}

.bouton.clair {
  background: transparent;
  color: var(--marine);
}

.bouton.clair:hover {
  background: var(--papier);
}

.bouton.petit {
  font-size: 14px;
  padding: 8px 13px;
}

.bouton.lien {
  border: 0;
  background: none;
  color: var(--encre-2);
  padding: 6px 2px;
  text-decoration: underline;
  font-weight: 500;
}

.bouton[disabled] {
  opacity: 0.45;
  cursor: default;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  margin: 0 0 6px;
}

input[type='email'],
input[type='text'],
input[type='number'],
select {
  width: 100%;
  font: 16px var(--f-texte);
  color: var(--marine);
  background: var(--papier);
  border: 1.5px solid var(--trait);
  border-radius: var(--r);
  padding: 11px 12px;
  min-width: 0;
}

input:focus,
select:focus {
  border-color: var(--turq);
  outline: none;
  box-shadow: 0 0 0 3px var(--turq-doux);
}

.aide {
  font-size: 14px;
  color: var(--encre-3);
  margin: 6px 0 0;
}

.erreur {
  background: var(--ambre-doux);
  color: var(--ambre);
  border-radius: var(--r);
  padding: 11px 14px;
  font-weight: 500;
  margin: 0 0 16px;
}

.succes {
  background: var(--ok-doux);
  color: var(--ok);
  border-radius: var(--r);
  padding: 11px 14px;
  font-weight: 500;
}

.succes.neutre {
  background: var(--gris-doux);
  color: var(--marine);
}

/* ---------- accueil : le plan qui se mesure ---------- */
.ouverture {
  padding: 26px 0 56px;
}

.ouverture .grille2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 44px;
  align-items: center;
}

@media (width <= 900px) {
  .ouverture .grille2 {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

h1 {
  font: 800 clamp(38px, 6.2vw, 66px)/1 var(--f-titre);
  font-stretch: 82%;
  letter-spacing: -0.5px;
  margin: 0 0 20px;
  text-wrap: balance;
}

h1 span {
  display: block;
}

.ouverture p.chapeau {
  font-size: 19px;
  line-height: 1.55;
  color: var(--encre-2);
  margin: 0 0 26px;
  max-width: 34em;
}

.ouverture .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.ouverture .gratuit {
  font-size: 14.5px;
  color: var(--encre-3);
  margin-top: 14px;
}

.calque {
  position: relative;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  overflow: hidden;
  background-image:
    linear-gradient(var(--grille) 1px, transparent 1px), linear-gradient(90deg, var(--grille) 1px, transparent 1px);
  background-size: 22px 22px;
}

.calque svg {
  display: block;
  width: 100%;
  height: auto;
}

.calque .cartouche {
  position: absolute;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--trait);
  border-left: 1px solid var(--trait);
  background: var(--papier);
  font: 600 12.5px var(--f-texte);
  color: var(--encre-3);
  padding: 7px 12px;
}

.compteur {
  background: var(--marine);
  color: var(--calque);
  padding: 10px 16px;
  font: 700 17px var(--f-titre);
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.compteur small {
  display: block;
  font: 500 11.5px var(--f-texte);
  opacity: 0.75;
}

.tube {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trace {
  stroke-dasharray: var(--l);
  stroke-dashoffset: var(--l);
}

.anime .trace {
  animation: tracer 1.8s cubic-bezier(0.45, 0.1, 0.3, 1) forwards;
}

.anime .t2 {
  animation-delay: 0.3s;
}

.anime .t3 {
  animation-delay: 0.6s;
}

@keyframes tracer {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trace {
    stroke-dashoffset: 0;
  }

  .anime .trace {
    animation: none;
  }
}

/* ---------- sections ---------- */
section.bande {
  padding: 64px 0;
  border-top: 1px solid var(--trait);
}

section.bande.papier {
  background: var(--papier);
}

h2 {
  font: 800 clamp(28px, 3.6vw, 40px)/1.08 var(--f-titre);
  font-stretch: 85%;
  margin: 0 0 14px;
  text-wrap: balance;
}

h3 {
  font: 700 19px/1.25 var(--f-titre);
  margin: 0 0 6px;
}

.intro {
  color: var(--encre-2);
  font-size: 17.5px;
  max-width: 40em;
  margin: 0 0 34px;
}

.etapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  counter-reset: etape;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (width <= 820px) {
  .etapes {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.etapes li {
  counter-increment: etape;
  border-top: 3px solid var(--marine);
  padding-top: 16px;
}

.etapes li::before {
  content: counter(etape);
  font: 800 44px/1 var(--f-titre);
  color: var(--turq);
  display: block;
  margin-bottom: 10px;
}

.etapes p {
  margin: 0;
  color: var(--encre-2);
}

/* aperçu du Récap Excel */
.excel {
  margin: 0;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  overflow: hidden;
  font-size: 14.5px;
}

.excel .barre {
  background: var(--marine);
  color: var(--calque);
  padding: 11px 16px;
  font: 700 15px var(--f-titre);
}

.excel .encadre {
  padding: 12px 16px;
  border-bottom: 1px solid var(--trait-fin);
  display: grid;
  gap: 4px;
}

.excel .encadre p {
  margin: 0;
}

.excel .ok {
  color: var(--ok);
  font-weight: 600;
}

.excel .av {
  color: var(--ambre);
  font-weight: 600;
}

.excel table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.excel th {
  text-align: left;
  font-weight: 600;
  color: var(--encre-3);
  font-size: 13px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--trait);
}

.excel td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--trait-fin);
}

.excel td.n {
  text-align: right;
}

.excel .pastille {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ambre-doux);
  color: var(--ambre);
  font: 700 12.5px/22px var(--f-texte);
  text-align: center;
}

.excel-wrap {
  overflow-x: auto;
}

.deux {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: start;
}

@media (width <= 900px) {
  .deux {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.liste-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.liste-points li {
  padding-left: 18px;
  border-left: 3px solid var(--turq-vif);
}

.liste-points b {
  display: block;
}

.liste-points span {
  color: var(--encre-2);
}

.metiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  background: var(--papier);
  overflow: hidden;
}

@media (width <= 900px) {
  .metiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (width <= 520px) {
  .metiers {
    grid-template-columns: 1fr;
  }
}

.metiers div {
  padding: 20px 20px 22px;
  border-right: 1px solid var(--trait-fin);
  border-bottom: 1px solid var(--trait-fin);
}

.metiers p {
  margin: 0;
  color: var(--encre-2);
  font-size: 15px;
}

.lit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (width <= 700px) {
  .lit {
    grid-template-columns: 1fr;
  }
}

.lit ul {
  margin: 0;
  padding-left: 20px;
}

.lit li {
  margin: 4px 0;
}

.question {
  border-top: 1px solid var(--trait);
  padding: 18px 0;
}

.question h3 {
  font-size: 17.5px;
}

.question p {
  margin: 0;
  color: var(--encre-2);
}

/* ---------- pied ---------- */
footer {
  border-top: 1px solid var(--trait);
  padding: 30px 0 40px;
  color: var(--encre-3);
  font-size: 14px;
}

footer .enveloppe {
  display: grid;
  gap: 18px;
}

.pied-metiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.pied-bas {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}

footer a {
  color: var(--encre-2);
}

/* ---------- connexion ---------- */
.carte-seule {
  max-width: 440px;
  margin: 40px auto 80px;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  padding: 28px;
}

.carte-seule h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.carte-seule p {
  color: var(--encre-2);
}

.carte-seule form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.code {
  font: 700 30px var(--f-titre) !important;
  letter-spacing: 10px;
  text-align: center;
}

/* ---------- espace ---------- */
.espace {
  padding: 20px 0 70px;
}

.espace h1 {
  font-size: clamp(32px, 4.5vw, 44px);
  margin-bottom: 6px;
}

.quota {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--encre-2);
  margin: 0 0 26px;
}

.cases {
  display: flex;
  gap: 4px;
}

.cases i {
  width: 26px;
  height: 9px;
  border-radius: 2px;
  background: var(--trait);
}

.cases i.prise {
  background: var(--turq-vif);
}

.depot {
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  padding: 22px;
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
}

.depot .ligne {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (width <= 640px) {
  .depot .ligne {
    grid-template-columns: 1fr;
  }
}

.zone {
  border: 2px dashed var(--trait);
  border-radius: var(--r-grand);
  padding: 30px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--calque);
  transition:
    border-color 0.15s,
    background 0.15s;
}

.zone.survol {
  border-color: var(--turq-vif);
  background: var(--turq-doux);
}

.zone b {
  display: block;
  font: 700 19px var(--f-titre);
}

.zone span {
  color: var(--encre-3);
  font-size: 14.5px;
}

.zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choisis {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.choisis li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: var(--calque);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.choisis li small {
  color: var(--encre-3);
  white-space: nowrap;
}

.envois {
  display: grid;
  gap: 10px;
}

.envoi-l {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--marine);
}

.envoi-l:hover {
  border-color: var(--encre-3);
  color: var(--marine);
}

.envoi-l b {
  font: 700 17px var(--f-titre);
  overflow-wrap: anywhere;
}

.envoi-l .meta {
  color: var(--encre-3);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.etiquette {
  font: 600 13px var(--f-texte);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  background: var(--gris-doux);
  color: var(--encre-2);
}

.etiquette.ok {
  background: var(--ok-doux);
  color: var(--ok);
}

.etiquette.av {
  background: var(--ambre-doux);
  color: var(--ambre);
}

.etiquette.encours {
  background: var(--turq-doux);
  color: var(--turq);
}

.vide {
  border: 1.5px dashed var(--trait);
  border-radius: var(--r-grand);
  padding: 26px;
  text-align: center;
  color: var(--encre-2);
}

/* ---------- résultat d'un envoi ---------- */
.resultat {
  padding: 20px 0 70px;
}

.resultat h1 {
  font-size: clamp(30px, 4.2vw, 42px);
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.attente-lecture {
  background: var(--papier);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  padding: 26px;
  margin: 24px 0;
  display: grid;
  gap: 12px;
}

.jauge {
  height: 8px;
  border-radius: 4px;
  background: var(--trait-fin);
  overflow: hidden;
}

.jauge i {
  display: block;
  height: 100%;
  width: 30%;
  background: var(--turq-vif);
  border-radius: 4px;
  animation: glisse 1.6s ease-in-out infinite;
}

@keyframes glisse {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(340%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jauge i {
    animation: none;
    width: 100%;
    opacity: 0.5;
  }
}

.chiffres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  background: var(--papier);
  overflow: hidden;
  margin: 22px 0;
}

.chiffres div {
  padding: 16px 18px;
  border-right: 1px solid var(--trait-fin);
}

.chiffres strong {
  display: block;
  font: 800 30px/1.1 var(--f-titre);
  font-variant-numeric: tabular-nums;
}

.chiffres span {
  color: var(--encre-3);
  font-size: 14px;
}

.alerte {
  background: var(--ambre-doux);
  border-left: 4px solid var(--ambre);
  border-radius: var(--r);
  padding: 12px 16px;
  margin: 10px 0;
  color: var(--marine);
}

.alerte b {
  color: var(--ambre);
}

.refus {
  background: var(--gris-doux);
  border-radius: var(--r);
  padding: 12px 16px;
  margin: 10px 0;
}

.telecharger {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 22px 0;
}

/* ---------- admin ---------- */
.admin table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--papier);
}

.admin th,
.admin td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--trait-fin);
  vertical-align: top;
}

.admin th {
  color: var(--encre-3);
  font-weight: 600;
}

.admin .defile {
  overflow-x: auto;
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
}

.admin .defile + h2 {
  margin-top: 48px;
}

.admin td form {
  margin: 0;
}

.admin td .bouton.lien {
  padding: 0;
  line-height: inherit;
}

.texte-long {
  padding: 20px 0 70px;
}

.texte-long h1 {
  font-size: clamp(32px, 4.5vw, 44px);
}

.texte-long h2 {
  font-size: 24px;
  margin-top: 30px;
}

.texte-long p,
.texte-long li {
  color: var(--encre-2);
}

/* ---------- lien d'évitement (clavier, lecteur d'écran) ---------- */
.evitement {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--r);
  background: #14213d;
  color: #fff;
  font-weight: 600;
}

.evitement:focus {
  top: 12px;
}

/* ---------- pages par métier ---------- */
.metier-tete {
  padding-top: 36px;
}

.metier-tete h1 {
  max-width: 18ch;
}

.metier-tete .chapeau {
  max-width: 62ch;
}

.fil {
  margin: 0 0 14px;
  color: var(--encre-3);
  font-size: 14px;
}

.fil a {
  color: var(--encre-2);
}

.liste-simple {
  margin: 0 0 14px;
  padding-left: 20px;
}

.liste-simple li {
  margin: 6px 0;
}

.autres-metiers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.autres-metiers a {
  font-weight: 600;
}

.autres-metiers span {
  display: block;
  color: var(--encre-2);
  font-size: 15px;
}

/* texte lu par les lecteurs d'écran, invisible à l'écran */
.lecteur-ecran {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
