/* Accueil « quatre portes » — d'après la maquette Claude Design « Site Mathieu — page d'accueil ».
   Polices IBM Plex hébergées sur le site (SIL Open Font License), aucune ressource tierce. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --fond: #0E1116; --carte: #151A21; --bord: #262E38; --trait: #232A33; --contour: #3A4450;
  --texte: #E8ECF1; --doux: #B4BDC9; --gris: #9AA4B2;
  --teal: #6FD3C3; --teal-clair: #A8EBE0; --ambre: #F2B544;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fond); color: var(--texte); font-family: "IBM Plex Sans", system-ui, sans-serif; }
body.porte-ouverte { overflow: hidden; }
a { color: var(--teal); }
a:hover { color: var(--teal-clair); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.portes { min-height: 100vh; display: flex; flex-direction: column; }
.portes__entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--trait); }
.portes__nom { display: flex; flex-direction: column; gap: 2px; }
.portes__titre { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.portes__sous { font-size: 13px; color: var(--gris); }
.portes__outils { display: flex; gap: 10px; align-items: center; }
.bouton-contour, .langue {
  min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; background: transparent; color: var(--texte);
  border: 1px solid var(--contour); border-radius: 8px; font-size: 13px; cursor: pointer; text-decoration: none;
}
.langue { padding: 0 14px; font-weight: 500; }
.bouton-contour:hover, .langue:hover { border-color: var(--teal); color: var(--teal); }

.portes__main { flex-grow: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 72px); display: flex; flex-direction: column; gap: 56px; }
.portes__intro { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.surtitre-porte { font-size: 13px; letter-spacing: 0.08em; color: var(--teal); }
.surtitre-porte.ambre { color: var(--ambre); }
.portes__intro h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.05; font-weight: 600; letter-spacing: -0.02em; }
.portes__intro p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--doux); }

.portes__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.porte {
  display: flex; flex-direction: column; gap: 16px; padding: 28px; min-height: 300px; background: var(--carte);
  border: 1px solid var(--bord); border-radius: 14px; text-decoration: none; color: var(--texte);
  transition: border-color .15s, transform .15s;
}
a.porte:hover { color: var(--texte); border-color: var(--contour); transform: translateY(-2px); }
a.porte:focus-visible { border-color: var(--texte); outline-offset: 2px; }
.porte__haut { display: flex; justify-content: space-between; align-items: center; }
.porte__num { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--gris); }
.porte--teal svg, .porte--teal .porte__lien { color: var(--teal); }
.porte--ambre svg, .porte--ambre .porte__lien { color: var(--ambre); }
.porte h2 { margin: 0; font-size: 24px; font-weight: 600; }
.porte p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--doux); flex-grow: 1; }
.porte__lien { font-family: "IBM Plex Mono", monospace; font-size: 14px; }
.porte--bientot { opacity: .72; }
.porte--bientot .porte__lien { color: var(--gris); }

.portes__pied { padding: 24px clamp(20px, 5vw, 72px); border-top: 1px solid var(--trait); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--gris); }

/* Porte d'entrée (pop-up) */
.porte-entree { position: fixed; inset: 0; z-index: 10; background: rgba(8, 10, 14, 0.82); display: flex; align-items: flex-start; justify-content: center; padding: clamp(48px, 12vh, 140px) 16px 32px; overflow-y: auto; }
.porte-entree__boite { width: 100%; max-width: 540px; background: var(--carte); border: 1px solid #323B47; border-radius: 16px; padding: clamp(24px, 5vw, 36px); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.porte-entree section { display: flex; flex-direction: column; gap: 20px; }
.porte-entree h2 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.porte-entree section[data-ecran="accueil"] h2 { font-size: 32px; }
.porte-entree p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--doux); }
.porte-entree__boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.porte-entree button, .porte-entree input { font-family: inherit; font-size: 16px; }
.b-ambre, .b-teal, .b-contour { flex: 1 1 180px; min-height: 52px; padding: 0 20px; border-radius: 10px; font-weight: 600; cursor: pointer; border: none; }
.b-ambre { background: var(--ambre); color: #1A1408; }
.b-teal { background: var(--teal); color: #0B1A17; }
.b-contour { background: transparent; color: var(--texte); border: 1px solid var(--contour); font-weight: 400; }
.b-ambre:hover { background: #f6c76b; } .b-teal:hover { background: var(--teal-clair); } .b-contour:hover { border-color: var(--texte); }
.b-retour { align-self: flex-start; min-height: 44px; padding: 0 4px; background: transparent; color: var(--gris); border: none; font-size: 13px !important; cursor: pointer; }
.b-retour:hover { color: var(--texte); }
.calcul { font-size: clamp(26px, 5vw, 34px); font-weight: 500; padding: 18px; background: var(--fond); border: 1px solid var(--bord); border-radius: 10px; text-align: center; }
.porte-entree__reponse { display: flex; flex-direction: column; gap: 8px; }
.porte-entree__reponse label { font-size: 13px; color: var(--gris); }
.porte-entree__reponse input { flex: 1 1 200px; min-height: 52px; padding: 0 16px; background: var(--fond); color: var(--texte); border: 1px solid var(--contour); border-radius: 10px; font-size: 18px; }
.porte-entree__reponse .b-teal { flex: 0 0 auto; padding: 0 24px; }
.verdict { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 10px; }
.verdict p, p.verdict { font-size: 16px; line-height: 1.5; }
.verdict--teal { background: #12302B; } .verdict--teal p { color: #BFF0E7; } .verdict--teal a { color: #fff; }
.verdict--ambre, p.verdict--ambre { background: #2A2113; color: #F7D58C; } .verdict--ambre p { color: #F7D58C; }
.verdict--rouge { background: #2A1A1A; } .verdict--rouge p { color: #F5C2BA; }
.verdict .b-teal, .verdict .b-ambre, .verdict .b-contour { min-height: 44px; flex: 0 1 auto; font-size: 15px; }

/* Pages des portes (Éducation, Direction) */
.portes__nom--lien { color: var(--texte); text-decoration: none; }
.portes__nom--lien:hover { color: var(--texte); }
.page-porte { gap: 40px; }
.essai { max-width: 760px; display: flex; flex-direction: column; gap: 24px; }
.essai__resume { margin: 0; font-size: clamp(19px, 2.2vw, 22px); line-height: 1.65; color: var(--texte); border-left: 2px solid var(--ambre); padding-left: clamp(16px, 3vw, 28px); }
.essai__etat { margin: 0; font-size: 13px; color: var(--gris); }
.page-porte__intro { margin: -16px 0 0; max-width: 760px; font-size: 19px; line-height: 1.55; color: var(--doux); }
.edu__section { display: flex; flex-direction: column; gap: 18px; }
.edu__section > h2 { margin: 0; }
.edu__grille { list-style: none; margin: 0; padding: 0; }
.edu__carte { min-height: 240px; }
.edu__carte h3 { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.25; }
.edu__bientot { color: var(--gris) !important; }
.essai__images { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.essai__images li { background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; padding: 20px 22px; color: var(--doux); line-height: 1.5; }
.essai__images strong { display: block; color: var(--ambre); font-weight: 600; margin-bottom: 4px; }
.essai__plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 32px; }
.essai__plan h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.essai__plan ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--doux); line-height: 1.45; }
.essai__plan .mono { color: var(--teal); font-size: 13px; display: inline-block; min-width: 1.6em; }
.edu__liens a { color: inherit; text-underline-offset: 3px; }
.edu__liens a:hover { color: var(--texte); }
