/* CertiCampus — feuille de style. Couleurs tirées du logo officiel. */
@font-face { font-family: 'Lora'; src: url('../fonts/Lora-Variable.woff') format('woff'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('../fonts/Lora-Italic-Variable.woff') format('woff'); font-weight: 400 700; font-style: italic; font-display: swap; }

/* Charte CertiCampus : vert d'eau #26A69A sur fond sombre #05100B (mode sombre par défaut), variante claire disponible */
:root {
  --marine: #0B2A66;           /* réservé aux documents officiels imprimés */
  --teal: #26A69A;
  --teal-fonce: #1E8A80;
  --teal-clair: #4DD0C3;
  --vert: #26A69A;
  --vert-fonce: #1E8A80;
  --bleu-clair: #4DD0C3;

  --fond: #05100B;
  --surface: #0B1813;
  --surface-2: #12221C;
  --champ: #1F2E39;
  --encre: #E8F1EE;
  --encre-2: #9AAEA8;
  --encre-3: #6E847E;
  --trait: #1A2C26;
  --trait-fort: #2A3F44;
  --accent: #26A69A;
  --accent-texte: #FFFFFF;
  --accent-doux: #0E2E29;
  --lien: #3CC4B6;
  --ok: #4DD0A0;
  --ok-doux: #0E2E22;
  --alerte: #F2B04B;
  --alerte-doux: #33260C;
  --erreur: #FF8A80;
  --erreur-doux: #3A1513;
  --lateral: #07130F;
  --lateral-texte: #A5B9B3;
  --ombre: 0 1px 2px rgba(0,0,0,.35), 0 6px 20px rgba(0,0,0,.3);
  --chiffre: #FFFFFF;

  --police: 'Inter', 'Source Sans 3', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --police-doc: 'Lora', Georgia, 'Times New Roman', serif;
  --r-petit: 8px;
  --r: 12px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --fond: #F2F7F6; --surface: #FFFFFF; --surface-2: #EAF3F1; --champ: #FFFFFF;
  --encre: #0D1F1B; --encre-2: #4A615B; --encre-3: #78908A; --trait: #D7E5E1; --trait-fort: #BCD2CC;
  --accent: #1E8A80; --accent-texte: #FFFFFF; --accent-doux: #DDF2EF; --lien: #17786F;
  --ok: #17786F; --ok-doux: #DDF2EA; --alerte: #A15C00; --alerte-doux: #FFF2DC; --erreur: #B3261E; --erreur-doux: #FCE8E6;
  --lateral: #07130F; --lateral-texte: #A5B9B3; --ombre: 0 1px 2px rgba(5,16,11,.06), 0 4px 16px rgba(5,16,11,.07); --chiffre: #0D1F1B;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 15.5px/1.5 var(--police); -webkit-font-smoothing: antialiased; }
a { color: var(--lien); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--bleu-clair); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muet { color: var(--encre-2); }
.petit { font-size: .875rem; }
.chiffre { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ---------- Démarrage ---------- */
#demarrage { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fond); z-index: 100; transition: opacity .4s; }
#demarrage img { width: 92px; }
#demarrage.cache { opacity: 0; pointer-events: none; }

/* ---------- Structure générale ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.lateral { background: var(--lateral); color: var(--lateral-texte); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.marque { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; color: #fff; text-decoration: none; }
.marque img { width: 38px; height: auto; background: #fff; border-radius: 8px; padding: 4px; }
.marque b { display: block; font-size: 1.12rem; letter-spacing: .01em; }
.marque b span { color: var(--teal-clair); }
.marque small { display: block; font-size: .74rem; opacity: .75; }
.etab-nom { margin: 0 14px 10px; padding: 10px 12px; border-radius: var(--r-petit); background: rgba(255,255,255,.06); font-size: .82rem; line-height: 1.35; color: #fff; }
.etab-nom span { display: block; color: var(--lateral-texte); font-size: .76rem; }
.nav { padding: 4px 10px 20px; flex: 1; }
.nav-groupe { margin: 14px 10px 4px; font-size: .76rem; color: rgba(201,214,238,.6); }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-petit); color: var(--lateral-texte); text-decoration: none; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.actif { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.nav svg, .onglets svg, .btn svg, .ico { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .pastille { margin-left: auto; background: var(--teal); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 10px; padding: 0 7px; }
.lateral-pied { padding: 12px 18px 18px; font-size: .75rem; opacity: .6; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.barre { display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--trait); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.barre .annee { font-size: .9rem; color: var(--encre-2); }
.barre .annee b { color: var(--encre); }
.barre .espace { flex: 1; }
.barre-marque { display: none; align-items: center; gap: 8px; font-weight: 700; }
.barre-marque img { width: 28px; }
.contenu { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.entete p { margin: 6px 0 0; color: var(--encre-2); max-width: 70ch; }
.entete .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fil { font-size: .88rem; margin-bottom: 8px; }
.fil a { text-decoration: none; }

.bandeau { padding: 10px 28px; font-size: .9rem; display: flex; gap: 10px; align-items: center; }
.bandeau.alerte { background: var(--alerte-doux); color: var(--alerte); }
.bandeau.erreur { background: var(--erreur-doux); color: var(--erreur); }

/* ---------- Composants ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: var(--r-petit); border: 1px solid var(--trait-fort); background: var(--surface); color: var(--encre); font: 600 .93rem var(--police); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.principal-btn { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.btn.principal-btn:hover { filter: brightness(1.08); }
.btn.vert { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.danger { color: var(--erreur); }
.btn.danger:hover { border-color: var(--erreur); }
.btn.discret { border-color: transparent; background: transparent; }
.btn.discret:hover { background: var(--surface-2); }
.btn.petit-btn { min-height: 32px; padding: 0 11px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.icone { padding: 0; width: 40px; }

.bloc { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r); padding: 20px; }
.bloc + .bloc { margin-top: 18px; }
.bloc-titre { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grille-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.grille-2 > *, .grille-3 > * { min-width: 0; }
.grille-2 > .bloc + .bloc, .grille-3 > .bloc + .bloc { margin-top: 0; }

/* Chiffres du tableau de bord : une seule bande, pas de cartes */
.chiffres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r); margin-bottom: 18px; }
.chiffres a { padding: 16px 18px; text-decoration: none; color: inherit; border-right: 1px solid var(--trait); }
.chiffres a:last-child { border-right: 0; }
.chiffres a:hover { background: var(--surface-2); }
.chiffres b { display: block; font-size: 1.75rem; font-weight: 700; color: var(--chiffre); font-variant-numeric: tabular-nums; }
.chiffres span { font-size: .86rem; color: var(--encre-2); }

/* Statuts : le vert signifie toujours « validé ou certifié » */
.statut { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 20px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--encre-2); white-space: nowrap; }
.statut::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.statut.ok { background: var(--ok-doux); color: var(--ok); }
.statut.info { background: var(--accent-doux); color: var(--accent); }
.statut.alerte { background: var(--alerte-doux); color: var(--alerte); }
.statut.erreur { background: var(--erreur-doux); color: var(--erreur); }

/* Tableaux */
.table-cadre { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--encre-2); font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--trait); background: var(--surface-2); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.cliquable { cursor: pointer; }
tbody tr.cliquable:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ianu { font-variant-numeric: tabular-nums; font-size: .86rem; color: var(--encre-2); white-space: nowrap; }
.nom-etu b { font-weight: 600; }

/* Formulaires */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .plein { grid-column: 1 / -1; }
.champ label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: 5px; }
.champ label i { font-style: normal; color: var(--erreur); }
.champ input, .champ select, .champ textarea, .filtre input, .filtre select {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--r-petit); border: 1px solid var(--trait-fort);
  background: var(--champ); color: var(--encre); font: 400 .97rem var(--police);
}
.champ textarea { min-height: 84px; resize: vertical; }
.champ input:focus, .champ select:focus, .champ textarea:focus, .filtre input:focus, .filtre select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.champ .aide { font-size: .82rem; color: var(--encre-3); margin-top: 4px; }
.champ .err { font-size: .83rem; color: var(--erreur); margin-top: 4px; }
.champ.en-erreur input, .champ.en-erreur select { border-color: var(--erreur); }
.case { display: flex; gap: 9px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.case input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.filtres { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.filtre { min-width: 170px; }
.filtre.large { flex: 1; min-width: 220px; }
.filtre label { display: block; font-size: .8rem; color: var(--encre-2); margin-bottom: 4px; }

.onglets-page { display: flex; gap: 2px; border-bottom: 1px solid var(--trait); margin-bottom: 18px; overflow-x: auto; }
.onglets-page button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: 600 .93rem var(--police); color: var(--encre-2); cursor: pointer; white-space: nowrap; }
.onglets-page button.actif { color: var(--accent); border-bottom-color: var(--accent); }

.vide { text-align: center; padding: 42px 20px; color: var(--encre-2); }
.vide h3 { color: var(--encre); margin-bottom: 6px; }
.vide p { max-width: 52ch; margin: 0 auto 16px; }
.chargement { padding: 40px; text-align: center; color: var(--encre-3); }
.liste-def { display: grid; grid-template-columns: 170px 1fr; gap: 7px 14px; margin: 0; font-size: .95rem; }
.liste-def dt { color: var(--encre-2); }
.liste-def dd { margin: 0; font-weight: 500; }

/* Premiers pas : vraie séquence, donc numérotée */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: e; }
.etapes li { counter-increment: e; display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--trait); }
.etapes li:last-child { border-bottom: 0; }
.etapes li::before { content: counter(e); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--surface-2); color: var(--encre-2); flex: none; }
.etapes li.fait::before { content: '✓'; background: var(--ok-doux); color: var(--ok); }
.etapes li.fait span { color: var(--encre-3); text-decoration: line-through; }
.etapes a { margin-left: auto; font-size: .88rem; }

.activite { list-style: none; margin: 0; padding: 0; }
.activite li { padding: 8px 0; border-bottom: 1px solid var(--trait); font-size: .9rem; display: flex; justify-content: space-between; gap: 10px; }
.activite li:last-child { border-bottom: 0; }
.barre-prog { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.barre-prog i { display: block; height: 100%; background: var(--accent); }
.barre-prog i.complet { background: var(--vert); }

/* Grille de notes */
.note-input { width: 84px; min-height: 36px; padding: 4px 8px; text-align: right; border: 1px solid var(--trait-fort); border-radius: var(--r-petit); background: var(--champ); color: var(--encre); font: 600 1rem var(--police); font-variant-numeric: tabular-nums; }
.note-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.note-input.invalide { border-color: var(--erreur); background: var(--erreur-doux); }
.note-input.modifie { border-color: var(--alerte); }
.note-echec { color: var(--erreur); font-weight: 600; }
.barre-collante { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--trait); padding: 12px 16px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin: 0 -1px -1px; border-radius: 0 0 var(--r) var(--r); }

/* ---------- Fenêtres ---------- */
.voile { position: fixed; inset: 0; background: rgba(6, 16, 36, .55); z-index: 60; display: grid; place-items: center; padding: 20px; animation: apparait .15s ease-out; }
.fenetre { background: var(--surface); border-radius: 14px; width: min(640px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.fenetre.large { width: min(920px, 100%); }
.fenetre-tete { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 10px; gap: 10px; }
.fenetre-corps { padding: 6px 22px 18px; overflow-y: auto; }
.fenetre-pied { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--trait); }
@keyframes apparait { from { opacity: 0; } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; gap: 8px; }
.toast { background: #12221C; border: 1px solid var(--trait-fort); color: #fff; padding: 11px 16px; border-radius: var(--r-petit); box-shadow: var(--ombre); max-width: 380px; font-size: .93rem; animation: apparait .2s; }
.toast.erreur { background: var(--erreur); }
.toast.ok { background: var(--teal-fonce); border-color: var(--teal-fonce); }
.secret { font: 700 1.15rem/1 var(--police); letter-spacing: .06em; background: var(--surface-2); padding: 12px 14px; border-radius: var(--r-petit); text-align: center; user-select: all; }
.encadre { padding: 12px 14px; border-radius: var(--r-petit); background: var(--accent-doux); color: var(--encre); font-size: .92rem; margin-bottom: 14px; }
.encadre.alerte { background: var(--alerte-doux); }
.encadre.erreur { background: var(--erreur-doux); color: var(--erreur); }

/* ---------- Connexion (reproduction du design validé) ---------- */
.connexion { min-height: 100vh; display: grid; grid-template-columns: 42fr 58fr; }
.connexion-visuel { background: var(--teal); color: #fff; padding: 56px 53px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; }
.tuile-logo { background: #fff; border-radius: 16px; width: 168px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.tuile-logo img { display: block; width: 100%; height: auto; }
.connexion-visuel h1 { font-size: clamp(1.6rem, 2.2vw, 2rem); font-weight: 700; letter-spacing: -.01em; margin: 0 0 16px; }
.connexion-visuel p { color: rgba(255,255,255,.88); max-width: 46ch; font-size: .98rem; line-height: 1.6; margin: 0; }
.connexion-visuel small { color: rgba(255,255,255,.75); font-size: .8rem; }
.connexion-droite { background: var(--fond); position: relative; display: grid; place-items: center; padding: 70px 24px 40px; }
.connexion-liens { position: absolute; top: 26px; right: 38px; display: flex; gap: 16px; align-items: center; font-size: .9rem; }
.connexion-liens a { color: var(--encre-2); text-decoration: none; }
.connexion-liens a:hover { color: var(--encre); }
.connexion-liens .btn { color: var(--encre-2); }
.connexion-form { width: min(384px, 100%); }
.connexion-form h2 { font-size: 1.55rem; font-weight: 700; margin: 0 0 8px; }
.connexion-form .sous { color: var(--encre-2); font-size: .93rem; margin: 0 0 30px; }
.connexion-form .champ { margin-bottom: 20px; }
.connexion-form .champ label { font-size: .93rem; margin-bottom: 7px; }
.connexion-form .btn.principal-btn { width: 100%; min-height: 44px; margin-top: 10px; font-size: .95rem; }
.connexion-form .bas { text-align: center; color: var(--encre-2); font-size: .93rem; margin-top: 26px; }
.connexion-form .bas a { color: var(--lien); text-decoration: none; }
.comptes-demo { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.comptes-demo button { border: 1px solid var(--trait-fort); background: var(--champ); color: var(--encre); border-radius: 16px; padding: 5px 12px; font: 600 .85rem var(--police); cursor: pointer; }
.comptes-demo button:hover { border-color: var(--teal); color: var(--teal-clair); }
.demo-boite { margin-top: 26px; padding: 14px; border: 1px dashed var(--trait-fort); border-radius: 10px; text-align: center; font-size: .88rem; color: var(--encre-2); }
.ecran-simple { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--fond); }
.ecran-simple form { width: min(400px, 100%); }
.ecran-simple .champ { margin-bottom: 16px; }
.ecran-simple .btn.principal-btn { width: 100%; min-height: 44px; }

/* ---------- Téléphone ---------- */
.onglets { display: none; }
@media (max-width: 1100px) { .chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); } .chiffres a:nth-child(3) { border-right: 0; } .chiffres a:nth-child(-n+3) { border-bottom: 1px solid var(--trait); } .grille-3 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; z-index: 70; }
  .lateral.ouvert { transform: none; box-shadow: 0 0 0 100vmax rgba(6,16,36,.5); }
  .barre { padding: 10px 16px; }
  .barre-marque { display: flex; }
  .barre .annee { display: none; }
  .contenu { padding: 18px 16px 96px; }
  .onglets { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--trait); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
  .onglets a, .onglets button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font: 600 .7rem var(--police); color: var(--encre-3); text-decoration: none; background: none; border: 0; }
  .onglets .actif { color: var(--accent); }
  .onglets svg { width: 22px; height: 22px; }
  .form, .grille-2 { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chiffres a { border-right: 0 !important; border-bottom: 1px solid var(--trait); }
  .chiffres a:nth-child(odd) { border-right: 1px solid var(--trait) !important; }
  .chiffres b { font-size: 1.45rem; }
  .voile { padding: 0; place-items: end stretch; }
  .fenetre, .fenetre.large { width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .connexion { grid-template-columns: 1fr; }
  .connexion-visuel { padding: 24px 20px; flex-direction: row; align-items: center; gap: 16px; }
  .connexion-visuel .tuile-logo { width: 104px; padding: 9px; flex: none; }
  .connexion-visuel p, .connexion-visuel small { display: none; }
  .connexion-visuel h1 { font-size: 1.3rem; margin: 0; }
  .connexion-droite { place-items: start center; padding: 64px 20px 40px; }
  .connexion-liens { right: 20px; top: 18px; }
  .liste-def { grid-template-columns: 1fr; gap: 0 0; }
  .liste-def dd { margin-bottom: 9px; }
  .toasts { left: 16px; right: 16px; bottom: 76px; }
  .entete .actions .btn { flex: 1; }
  .masquer-mobile { display: none; }
  .note-input { width: 64px; }
  td, th { padding: 9px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Documents officiels (relevés, attestations, PV) ---------- */
.papier { background: #fff; color: #111A2E; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 16mm 17mm 14mm; font: 400 10.5pt/1.45 var(--police-doc); box-shadow: var(--ombre); position: relative; }
.papier .tete { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; text-align: center; border-bottom: 2px solid #0B2A66; padding-bottom: 10px; }
.papier .tete img { width: 62px; }
.papier .tete .rep { font-size: 9pt; letter-spacing: .02em; }
.papier .tete .etab { font-size: 13pt; font-weight: 700; color: #0B2A66; margin-top: 3px; }
.papier .tete .lieu { font-size: 9pt; color: #44506A; }
.papier .titre-doc { text-align: center; margin: 20px 0 4px; font-size: 16pt; font-weight: 700; letter-spacing: .04em; color: #0B2A66; }
.papier .num-doc { text-align: center; font-size: 9.5pt; color: #44506A; margin-bottom: 18px; }
.papier p { text-align: justify; }
.papier table { font-size: 9.5pt; border: 1px solid #9AA6BC; }
.papier th { background: #EEF2F8; color: #111A2E; font-size: 9pt; border: 1px solid #9AA6BC; padding: 5px 7px; white-space: normal; }
.papier td { border: 1px solid #C3CEDF; padding: 4px 7px; }
.papier .ident { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 22px; margin-bottom: 14px; font-size: 10pt; }
.papier .ident span { color: #44506A; }
.papier .resultat { margin-top: 12px; padding: 8px 12px; border: 1px solid #0B2A66; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.papier .pied-doc { display: grid; grid-template-columns: 1fr 210px; gap: 20px; margin-top: 26px; align-items: end; }
.papier .verif { display: flex; gap: 10px; align-items: center; font-size: 8.5pt; color: #44506A; }
.papier .verif svg { width: 92px; height: 92px; flex: none; }
.papier .signature { text-align: center; font-size: 10pt; }
.papier .signature .ligne { height: 58px; }
.papier .sceau-annule { position: absolute; inset: 40% 10% auto; transform: rotate(-18deg); border: 4px solid #B3261E; color: #B3261E; font: 700 40pt var(--police); text-align: center; opacity: .5; padding: 6px; }
.papier .mentions-legales { position: absolute; left: 17mm; right: 17mm; bottom: 8mm; font-size: 7.5pt; color: #7A869E; border-top: 1px solid #DCE3EE; padding-top: 4px; text-align: center; }
.papier.paysage { width: 297mm; min-height: 210mm; }
.zone-doc { overflow-x: auto; padding: 4px 0 20px; }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .lateral, .barre, .onglets, .bandeau, .entete, .ne-pas-imprimer, .toasts { display: none !important; }
  .app { display: block; }
  .contenu { padding: 0; max-width: none; }
  .papier { box-shadow: none; margin: 0; width: auto; min-height: 0; }
  .zone-doc { overflow: visible; padding: 0; }
}

/* notes verrouillées : affichées comme du texte, pas comme des champs */
.note-input:disabled { border-color: transparent; background: transparent; color: var(--encre); opacity: 1; -webkit-text-fill-color: var(--encre); }

.bandeau.info { background: var(--accent-doux); color: var(--encre); }

/* ---------- Portail public ---------- */
.portail-tete { background: var(--lateral); color: #fff; border-bottom: 1px solid #13241E; }
.portail-tete .dedans { max-width: 1100px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.portail-tete .marque { padding: 0; }
.portail-tete nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.portail-tete nav a { color: #DCE6F7; text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; font-size: .95rem; }
.portail-tete nav a:hover, .portail-tete nav a.actif { background: rgba(255,255,255,.1); color: #fff; }
.portail-tete nav a.pro { background: var(--teal); color: #fff; }
.portail-tete nav a.pro:hover { background: var(--teal-fonce); }
.portail-hero { background: linear-gradient(180deg, #07130F 0%, #0B1D17 100%); color: #fff; padding: 34px 20px 70px; position: relative; overflow: hidden; }
.portail-hero::after { content: ''; position: absolute; right: -80px; top: -40px; width: 420px; height: 420px; background: url('../img/embleme.png') no-repeat center / contain; opacity: .06; filter: brightness(10); }
.portail-hero .dedans { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; position: relative; z-index: 1; }
.portail-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 18ch; }
.portail-hero p { color: #B5C8C2; max-width: 52ch; font-size: 1.05rem; }
.carte-verif { background: var(--surface); color: var(--encre); border-radius: 16px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.carte-verif h2 { margin-bottom: 6px; }
.carte-verif .saisie { display: flex; gap: 8px; margin-top: 14px; }
.carte-verif input { flex: 1; min-width: 0; min-height: 48px; padding: 8px 12px; border: 1px solid var(--trait-fort); border-radius: 8px; font: 600 1rem var(--police); text-transform: uppercase; background: var(--surface); color: var(--encre); }
.portail-corps { max-width: 1100px; margin: -38px auto 0; padding: 0 20px 60px; position: relative; z-index: 2; }
.parcours-public { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; overflow: hidden; }
.parcours-public > div { padding: 22px; border-right: 1px solid var(--trait); }
.parcours-public > div:last-child { border-right: 0; }
.parcours-public h3 { font-size: 1.08rem; margin-bottom: 6px; }
.parcours-public p { color: var(--encre-2); font-size: .95rem; }
.portail-pied { max-width: 1100px; margin: 0 auto; padding: 24px 20px 40px; color: var(--encre-3); font-size: .86rem; border-top: 1px solid var(--trait); }
@media (max-width: 860px) {
  .portail-hero .dedans { grid-template-columns: 1fr; gap: 24px; }
  .parcours-public { grid-template-columns: 1fr; }
  .parcours-public > div { border-right: 0; border-bottom: 1px solid var(--trait); }
  .portail-tete nav a:not(.pro) { display: none; }
}

.chiffres.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chiffres.quatre a:nth-child(-n+3) { border-bottom: 0; }
.chiffres.quatre a:nth-child(3) { border-right: 1px solid var(--trait); }
@media (max-width: 860px) {
  .chiffres.quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chiffres.quatre a:nth-child(-n+2) { border-bottom: 1px solid var(--trait); }
}
.portail-hero h1 { margin-bottom: 16px; }
.carte-verif p, .carte-verif .muet { color: var(--encre-2); }
.activite li { flex-wrap: wrap; align-items: center; }
