/* Charte d'eika.fr : ambre, encre, bleu de survol, polices Barlow (locales, licence OFL). */
@font-face { font-family: Barlow; src: url("polices/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url("polices/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Barlow; src: url("polices/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url("polices/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("polices/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ambre: #F8B01E;
  --ambre-fonce: #AB750A;
  --encre: #303A3E;
  --encre-fonce: #262D30;
  --bleu: #1E74F7;
  --creme: #FFFBF2;

  --fond: #F4F5F5;
  --carte: #ffffff;
  --champ: #ffffff;
  --texte: #303A3E;
  --discret: #5f6b70;
  --bord: #e3e5e6;
  --bord-champ: #c9cfd1;
  --lien: #8a5e06;
  --bouton-fond: #303A3E;
  --bouton-texte: #F8B01E;
  --actif-fond: #FFF3D6;
  --actif-texte: #303A3E;
  --danger: #bf1722;
  --alerte-fond: #FFF3D6;
  --alerte-texte: #5c3f00;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1d2326;
    --carte: #262D30;
    --champ: #1d2326;
    --texte: #eceeee;
    --discret: #a3adb1;
    --bord: #3b464b;
    --bord-champ: #4a575d;
    --lien: #F8B01E;
    --bouton-fond: #F8B01E;
    --bouton-texte: #262D30;
    --actif-fond: #3d3620;
    --actif-texte: #FFBD38;
    --danger: #ff8a80;
    --alerte-fond: #3d3620;
    --alerte-texte: #ffd98a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 Barlow, system-ui, sans-serif;
}
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: "Barlow Semi Condensed", Barlow, sans-serif; font-weight: 600; }
h2 { font-size: 1.35rem; margin-bottom: 12px; }
h2::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 6px; background: var(--ambre); }
h3 { font-size: 1.1rem; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
.discret { color: var(--discret); font-size: 0.9rem; }

/* Barre de menu sombre, comme sur eika.fr : majuscules, survol ambre, onglet actif bleu. */
.entete {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px;
  padding: 0 16px;
  background: var(--encre);
  color: #fff;
  border-bottom: 3px solid var(--ambre);
}
.marque { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.marque img { height: 40px; width: auto; display: block; }
.marque h1 { font-size: 1.05rem; color: var(--creme); letter-spacing: 0.02em; }
.onglets { display: flex; flex-wrap: wrap; flex: 1; }
.onglets button, .entete button.lien {
  background: none; border: 0; border-radius: 0; color: #fff;
  padding: 16px 14px; font-weight: 600; font-size: 0.94rem; text-transform: uppercase; letter-spacing: 0.02em;
}
.onglets button:hover, .entete button.lien:hover { background: var(--ambre); color: var(--encre); }
.onglets button.actif { background: var(--bleu); color: var(--creme); }
@media (max-width: 700px) {
  .marque { flex: 1; }
  .onglets { order: 3; flex: 0 0 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .onglets button, .entete button.lien { padding: 10px 10px; font-size: 0.86rem; }
}

main { max-width: 1180px; margin: 0 auto; padding: 20px 16px; }
.colonnes { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; align-items: start; }
@media (max-width: 800px) { .colonnes { grid-template-columns: minmax(0, 1fr); } }

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: 4px; padding: 18px; margin-bottom: 16px; }
.carte > :last-child { margin-bottom: 0; }

label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--discret); margin: 10px 0 4px; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px;
  background: var(--champ); border: 1px solid var(--bord-champ); border-radius: 3px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--bleu); outline-offset: 1px;
}
input[type=file] { width: 100%; font-size: 0.9rem; }
.ligne { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.ligne > * { flex: 1 1 130px; min-width: 0; }
.ligne > .fixe { flex: 0 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

button {
  cursor: pointer; border-radius: 3px; padding: 8px 16px; font-weight: 500;
  border: 1px solid var(--bord-champ); background: var(--carte);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
button:hover { border-color: var(--ambre-fonce); }
button.principal { background: var(--bouton-fond); border-color: var(--bouton-fond); color: var(--bouton-texte); font-weight: 600; }
button.principal:hover { background: var(--bleu); border-color: var(--bleu); color: #fff; }
button.lien { border: 0; background: none; padding: 4px 6px; color: var(--lien); font-weight: 600; }
button.lien:hover { color: var(--bleu); }
button.lien.danger { color: var(--danger); }
button:disabled { opacity: 0.55; cursor: default; }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.pastilles { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.pastilles button { font-size: 0.86rem; padding: 3px 12px; border-radius: 999px; }
.pastilles button:hover { background: var(--ambre); border-color: var(--ambre); color: var(--encre); }

audio { width: 100%; height: 38px; margin-top: 6px; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { padding: 10px 0; border-top: 1px solid var(--bord); }
.liste li:first-child { border-top: 0; padding-top: 0; }
.titre-ligne { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.titre-ligne strong { overflow-wrap: anywhere; }
.titre-ligne > span, .titre-ligne .discret { white-space: nowrap; }
.titre-ligne > span { flex: none; }

.menu { list-style: none; margin: 10px 0 0; padding: 0; }
.menu button { width: 100%; text-align: left; border: 0; border-left: 3px solid transparent; border-radius: 0; background: none; padding: 8px 10px; }
.menu button:hover { background: var(--actif-fond); }
.menu button.actif { background: var(--actif-fond); color: var(--actif-texte); border-left-color: var(--ambre); font-weight: 600; }
.menu small { display: block; color: var(--discret); font-weight: 400; }

.etape { border-top: 1px solid var(--bord); margin-top: 16px; padding-top: 4px; }
.etape h3 span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px;
  border-radius: 50%; background: var(--ambre); color: var(--encre); font-size: 0.9rem;
}
.choix { display: flex; gap: 16px; flex-wrap: wrap; }
.choix label { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--texte); font-size: 1rem; font-weight: 400; }
input[type=radio] { accent-color: var(--ambre-fonce); }

.annonce-etat { position: fixed; right: 16px; bottom: 16px; z-index: 10; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.annonce-etat div {
  padding: 10px 14px; border-radius: 4px; background: var(--encre-fonce); color: #fff;
  border-left: 4px solid var(--ambre); box-shadow: 0 4px 18px rgb(0 0 0 / 0.25);
}
.annonce-etat .erreur { border-left-color: #ff6b5f; }
.annonce-etat .succes { border-left-color: #56d37c; }
.attente::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--ambre); border-top-color: transparent; animation: tourner 0.8s linear infinite; vertical-align: -1px; }
@keyframes tourner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .attente::before { animation: none; } }

.bandeau { background: var(--alerte-fond); color: var(--alerte-texte); padding: 8px 12px; border-left: 4px solid var(--ambre); border-radius: 3px; margin-bottom: 16px; font-size: 0.92rem; }

.connexion { max-width: 380px; margin: 10vh auto 0; padding: 0 16px; }
.connexion .carte { padding: 0; overflow: hidden; }
.connexion .logo { background: var(--encre); border-bottom: 3px solid var(--ambre); padding: 22px; display: grid; place-items: center; }
.connexion .logo img { height: 74px; width: auto; }
.connexion .corps { padding: 18px; }
.connexion button.principal { width: 100%; }

.tableau { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 980px; }
th:first-child { width: 20%; }
th:nth-child(7) { width: 22%; }
td:last-child { white-space: nowrap; }
th, td { text-align: left; padding: 6px 6px; border-top: 1px solid var(--bord); vertical-align: middle; }
th { font-size: 0.84rem; color: var(--discret); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; border-top: 0; }
td input, td select { padding: 6px 8px; }
