/* Habillage de la plateforme apprenants — charte du site 3xr-formation.fr (17/10/2026).
   Marine #14305A, ambre #E9A23B, bleu des liens #2B6CC4, gris-bleu #5E6E86 ; Sora (titres) et Inter (texte).
   Polices incluses dans la plateforme : aucun appel à un service extérieur (RGPD). */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../polices/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../polices/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../polices/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-style: normal; font-display: swap; src: url("../polices/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-style: normal; font-display: swap; src: url("../polices/sora-latin-700-normal.woff2") format("woff2"); }

:root {
  --marine: #14305A;
  --ambre: #E9A23B;
  --bleu-lien: #2B6CC4;
  --gris-bleu: #5E6E86;

  --fond: #FFFFFF;
  --fond-carte: #F3F5F9;
  --encre: #14305A;
  --encre-douce: var(--gris-bleu);
  --accent: var(--bleu-lien);       /* liens : contraste 5:1 sur blanc */
  --repere: var(--ambre);           /* décor uniquement (filets, coche), jamais pour du texte sur blanc */
  --bouton-fond: var(--marine);
  --bouton-texte: #FFFFFF;
  --bord: #D6DCE6;
  --succes: #1F7A4D;
  --fond-message: #FDF3E3;
  --erreur: #B3261E;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0E2340;
    --fond-carte: #17345E;
    --encre: #F3F5F9;
    --encre-douce: #C3CCDA;
    --accent: #8DB8F0;
    --bouton-fond: var(--ambre);
    --bouton-texte: #14305A;
    --bord: #2E4C78;
    --succes: #7FD3A6;
    --fond-message: #2A3B55;
    --erreur: #FFB4AB;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem; line-height: 1.55;
}
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--ambre); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; font-family: Sora, Inter, system-ui, sans-serif; font-weight: 700; }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 0 0 .25rem; }

.lien-evitement { position: absolute; left: -9999px; }
.lien-evitement:focus { left: 1rem; top: 1rem; background: var(--fond); padding: .5rem; z-index: 10; }

.entete { background: var(--marine); color: #fff; border-bottom: 3px solid var(--ambre); }
.entete-interieur { max-width: 60rem; margin: 0 auto; padding: .75rem 1rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; }
.marque { color: #fff; font-family: Sora, Inter, sans-serif; font-weight: 700; text-decoration: none; font-size: 1.15rem; display: inline-flex; align-items: center; gap: .5rem; }
.marque svg { width: 1.6rem; height: 1.6rem; flex: none; }

.entete nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.entete nav a, .entete .lien { color: #fff; }
.entete form { margin: 0; }

.principal { max-width: 60rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.pied { max-width: 60rem; margin: 0 auto; padding: 1rem; color: var(--encre-douce); font-size: .8rem; border-top: 1px solid var(--bord); }

.carte { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 12px; padding: 1rem 1.25rem; margin: 0 0 1rem; }
.etroite { max-width: 26rem; margin: 2rem auto; }
.liste-cartes { list-style: none; padding: 0; }
.resume { color: var(--encre-douce); }
.petit { font-size: .85rem; color: var(--encre-douce); }
.message { background: var(--fond-message); color: var(--encre); border-left: 4px solid var(--ambre); padding: .6rem .9rem; border-radius: 6px; }
.erreur { color: var(--erreur); margin: .25rem 0 0; }

label { display: block; margin: .9rem 0 .3rem; font-weight: 600; }
label.case { font-weight: 400; display: flex; gap: .5rem; align-items: center; }
input[type=email], input[type=password], input[type=number], input[type=text], select, input[type=file] {
  width: 100%; padding: .65rem .75rem; font: inherit; color: var(--encre); background: var(--fond);
  border: 1px solid var(--bord); border-radius: 8px;
}
input[aria-invalid=true] { border-color: var(--erreur); }

.bouton, button.bouton {
  display: inline-block; margin-top: 1rem; padding: .65rem 1.1rem; min-height: 44px;
  background: var(--bouton-fond); color: var(--bouton-texte); border: 0; border-radius: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
button.lien { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

.carte-modules { list-style: none; padding: 0; counter-reset: none; }
.module { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
  background: var(--fond-carte); border: 1px solid var(--bord); border-left: 6px solid var(--bord); border-radius: 10px; padding: .9rem 1rem; margin-bottom: .75rem; }
.module p { margin: .2rem 0 0; color: var(--encre-douce); }
.module .bouton { margin-top: 0; }
.etat-acheve { border-left-color: var(--succes); }
.etat-en-cours { border-left-color: var(--ambre); }
.verrou { font-size: .9rem; }

/* Lecteur : le module occupe tout l'écran sous une barre fine. */
.page-lecteur { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.page-lecteur .entete { display: none; }
.principal-lecteur { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.barre-lecteur { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; padding: .4rem .75rem; background: var(--marine); color: #fff; font-size: .9rem; border-bottom: 3px solid var(--ambre); }
.barre-lecteur a { color: #fff; }
.titre-lecteur { font-weight: 600; flex: 1; min-width: 10rem; }
@media (max-width: 600px) {
  .barre-lecteur { font-size: .8rem; padding: .3rem .6rem; }
  .titre-lecteur { display: none; }
}
#cadre-module { flex: 1; width: 100%; border: 0; background: #fff; min-height: 0; }
.voile { position: fixed; inset: 0; background: rgba(20, 48, 90, .8); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 20; }
.voile[hidden] { display: none; }
.voile .carte { max-width: 28rem; background: var(--fond); }

table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .9rem; }
th, td { border: 1px solid var(--bord); padding: .35rem .5rem; text-align: left; vertical-align: top; }

@media print {
  .entete, .pied, .non-imprime { display: none; }
  body { background: #fff; color: #000; }
}
