/* =====================================================================
   Montserrat — auto-hébergée (police variable 400-800, sous-ensembles
   Google Fonts v31). Volontairement PAS servie depuis fonts.googleapis.com :
   aucune requête vers un tiers, donc aucune fuite d'IP des participantes
   (cf. docs/conformite.md). `unicode-range` fait que latin-ext n'est
   téléchargé que si un caractère l'exige — le français tient dans latin.
   ===================================================================== */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* =====================================================================
   Autodiagnostic des compétences intrapreneuriales — feuille de style
   Marque : Intrapreneuriat (sous-marque ÉEQ, jaune) sur les jetons ÉEQ
   (gris, rayons, ombres, typographie). Voir docs/source/eeq-tokens.css.
   ===================================================================== */

:root {
  /* Sous-marque Intrapreneuriat — couleurs relevées sur le logo */
  --jaune: #E8A804;
  --jaune-fonce: #B98400;
  --jaune-texte: #7A5700;      /* 6,4 : 1 sur blanc — texte courant */
  --jaune-pale: #FBEBC0;
  --jaune-pale-2: #F4CF6A;
  --creme: #F4F0E8;

  /* Jetons ÉEQ */
  --g900: #2E2D2C; --g800: #454342; --g700: #5C5A58; --g600: #767472; --g500: #91908E;
  --g400: #ACAAA9; --g300: #C7C5C4; --g200: #E3E0E0; --g100: #EFEDED; --g50: #F7F6F6; --g0: #FFFFFF;
  --rxs: 4px; --rsm: 8px; --rmd: 16px; --rpill: 999px;
  --osm: 0 1px 2px rgba(46,45,44,.08);
  --omd: 0 4px 12px rgba(46,45,44,.10);
  --olg: 0 12px 32px rgba(46,45,44,.12);

  /* Paliers : du plus pâle (émergente) au plus profond (force) */
  --palier-force: var(--jaune-fonce);
  --palier-presente: var(--jaune);
  --palier-a-developper: var(--jaune-pale-2);
  --palier-emergente: var(--jaune-pale);

  --police: Montserrat, "Neue Montreal", Archivo, Arial, Helvetica, sans-serif;
  --largeur: 880px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.6;
  color: var(--g900);
  background: var(--creme);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--jaune-texte); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--g900); }

h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 4vw, 34px); }
h2 { font-size: 24px; line-height: 1.3; }
.h3 { font-size: 18px; line-height: 1.4; font-weight: 600; }
p { margin: 0 0 12px; }

.conteneur { width: min(100% - 48px, var(--largeur)); margin-inline: auto; }

/* ---------- En-tête ---------- */
.bandeau { background: var(--jaune); }
/* Deux logos de même famille : le mot-symbole à gauche, la signature « par l'École » à droite,
   un peu plus haute pour que la matrice É pèse autant que le mot-symbole. */
.bandeau__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; }
.bandeau__logo img { display: block; height: clamp(38px, 6.2vw, 62px); width: auto; }
.bandeau__eeq img { display: block; height: clamp(50px, 8.4vw, 84px); width: auto; }
.bandeau__eeq:focus-visible, .bandeau__logo:focus-visible { outline: 3px solid var(--g0); outline-offset: 4px; }
@media (max-width: 420px) { .bandeau__inner { gap: 14px; } }

/* ---------- Structure ---------- */
main { flex: 1; padding: 40px 0 64px; }
.ecran { animation: apparaitre 200ms ease-out; }
@keyframes apparaitre { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.surtitre {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--jaune-texte); margin: 0 0 8px;
}
.surtitre--clair { color: var(--jaune-pale); }
.chapeau { font-size: 18px; color: var(--g700); max-width: 60ch; margin-bottom: 32px; }
.titre-accueil { text-transform: uppercase; letter-spacing: 0.02em; font-size: clamp(22px, 3.4vw, 30px); max-width: 24ch; }
.aide { font-size: 14px; line-height: 1.55; color: var(--g600); }
.aide--centre { text-align: center; margin-top: 12px; min-height: 1.5em; }
.facultatif { font-weight: 400; color: var(--g600); }

.carte {
  background: var(--g0);
  border-radius: var(--rmd);
  padding: 24px;
  box-shadow: var(--osm);
  margin-bottom: 24px;
}
.carte--consigne { border-left: 6px solid var(--jaune); }

/* Aperçu de l'échelle sur l'accueil */
.echelle-apercu {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.echelle-apercu li {
  background: var(--g50); border-radius: var(--rsm); padding: 10px 8px; text-align: center;
  font-size: 14px; line-height: 1.3;
}
.echelle-apercu .valeur { display: block; font-weight: 800; font-size: 20px; color: var(--jaune-texte); }
@media (max-width: 640px) {
  .echelle-apercu { grid-template-columns: repeat(2, 1fr); }
  .echelle-apercu li:last-child { grid-column: span 2; }
}

/* ---------- Formulaires ---------- */
.form-accueil { max-width: 600px; }
.etiquette { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.champ {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--g300);
  border-radius: var(--rsm); background: var(--g0); color: var(--g900); margin-bottom: 8px;
}
.champ:focus { outline: 3px solid var(--jaune); outline-offset: 1px; border-color: var(--jaune-fonce); }
.form-accueil .bouton { margin-top: 16px; }

.bouton {
  font: inherit; font-weight: 600; font-size: 16px;
  padding: 12px 22px; min-height: 44px; border-radius: var(--rsm);
  border: 2px solid transparent; cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.bouton:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }
.bouton:active { transform: translateY(1px); }
.bouton--primaire { background: var(--g900); color: var(--g0); }
.bouton--primaire:hover { background: var(--g800); }
.bouton--primaire:disabled { background: var(--g300); color: var(--g0); cursor: not-allowed; transform: none; }
.bouton--secondaire { background: var(--g0); color: var(--g900); border-color: var(--g900); }
.bouton--secondaire:hover { background: var(--g100); }
.bouton--lien { background: transparent; color: var(--g700); text-decoration: underline; text-underline-offset: 3px; padding-inline: 8px; }
.bouton--lien:hover { color: var(--g900); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.actions--haut { margin: 0 0 24px; }
#btn-precedent { margin-right: auto; }

/* ---------- Questionnaire ---------- */
.progression { margin-bottom: 8px; }
.progression__barre { height: 6px; background: var(--g200); border-radius: var(--rpill); overflow: hidden; }
.progression__remplissage { height: 100%; width: 0; background: var(--jaune); border-radius: var(--rpill); transition: width 200ms ease-out; }

.enonce {
  background: var(--g0); border-radius: var(--rmd); padding: 20px 24px; margin: 0 0 16px;
  border: 0; box-shadow: var(--osm);
}
.enonce legend {
  font-weight: 600; font-size: 17px; line-height: 1.45; padding: 0; margin-bottom: 14px; float: left; width: 100%;
}
.enonce legend .numero { color: var(--jaune-texte); margin-right: 6px; }
.enonce.est-repondu { border-left: 6px solid var(--jaune); padding-left: 18px; }

.options { clear: both; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.option { position: relative; }
.option input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 60px; padding: 8px 6px; border-radius: var(--rsm); border: 2px solid var(--g200);
  background: var(--g50); font-size: 14px; line-height: 1.25; color: var(--g800);
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.option span b { font-size: 18px; font-weight: 800; color: var(--jaune-texte); margin-bottom: 2px; }
.option input:hover + span { border-color: var(--jaune-pale-2); background: var(--g0); }
.option input:focus-visible + span { outline: 3px solid var(--jaune); outline-offset: 2px; }
.option input:checked + span { background: var(--jaune); border-color: var(--jaune-fonce); color: var(--g900); }
.option input:checked + span b { color: var(--g900); }

@media (max-width: 640px) {
  .options { grid-template-columns: repeat(2, 1fr); }
  .option:last-child { grid-column: span 2; }
  .option span { min-height: 52px; flex-direction: row; gap: 8px; }
  .option span b { margin: 0; }
}

/* ---------- Résultats ---------- */
.resultats__entete { margin-bottom: 20px; }
.resultats__meta { color: var(--g600); font-size: 14px; }

.carte--profil { background: var(--g900); color: var(--g0); box-shadow: var(--omd); }
.profil__nom { color: var(--jaune); font-size: clamp(26px, 4vw, 36px); }
.profil__description { font-size: 17px; max-width: 64ch; color: var(--g100); }
.profil__co { font-size: 14px; color: var(--g300); margin-top: -4px; }

.profils-scores { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.profils-scores li { display: grid; grid-template-columns: minmax(150px, 1fr) 3fr auto; gap: 12px; align-items: center; font-size: 15px; }
.profils-scores .nom { font-weight: 600; }
.profils-scores .barre { height: 12px; background: var(--g700); border-radius: var(--rpill); overflow: hidden; }
.profils-scores .barre i { display: block; height: 100%; background: var(--g400); border-radius: var(--rpill); }
.profils-scores li.est-dominant .barre i { background: var(--jaune); }
.profils-scores li.est-dominant .nom { color: var(--jaune); }
.profils-scores .score { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 5.5ch; text-align: right; }
.profils-scores .score small { font-weight: 400; color: var(--g400); }
@media (max-width: 560px) {
  .profils-scores li { grid-template-columns: 1fr auto; }
  .profils-scores .barre { grid-column: 1 / -1; }
}

.grille-resultats { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: stretch; }
.grille-resultats > .carte { margin-bottom: 24px; }
@media (max-width: 760px) { .grille-resultats { grid-template-columns: 1fr; } }

.radar { width: 100%; max-width: 560px; margin: 0 auto; }
.radar svg { width: 100%; height: auto; display: block; overflow: visible; }
.radar .toile { fill: none; stroke: var(--g200); stroke-width: 1; }
.radar .axe { stroke: var(--g200); stroke-width: 1; }
.radar .surface { fill: var(--jaune); fill-opacity: .35; stroke: var(--jaune-fonce); stroke-width: 2.5; stroke-linejoin: round; }
.radar .point { fill: var(--jaune-fonce); stroke: var(--g0); stroke-width: 1.5; }
.radar .etiquette { font-size: 11.5px; font-weight: 600; fill: var(--g800); }
.radar .graduation { font-size: 9.5px; fill: var(--g500); }

.carte--transversale { border-top: 6px solid var(--jaune); }
.transversale__intro { font-size: 14px; color: var(--g700); }
.transversale__score { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 4px; }
.transversale__score b { font-size: 44px; font-weight: 800; line-height: 1; color: var(--jaune-texte); font-variant-numeric: tabular-nums; }
.transversale__score span { color: var(--g600); }
.transversale__palier { margin-top: 8px; font-size: 15px; }

/* Pastille de palier */
.pastille {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--rpill); color: var(--g900); background: var(--g200); vertical-align: middle;
}
.pastille--force { background: var(--palier-force); color: var(--g0); }
.pastille--presente { background: var(--palier-presente); }
.pastille--a-developper { background: var(--palier-a-developper); }
.pastille--emergente { background: var(--palier-emergente); }

/* Classement */
.classement { list-style: none; padding: 0; margin: 12px 0 0; }
.classement li {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--g100);
}
.classement li:first-child { border-top: 0; }
.classement .rang {
  width: 44px; height: 44px; border-radius: var(--rpill); background: var(--g100);
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--g800);
}
.classement .rang { display: inline-flex; align-items: baseline; justify-content: center; }
.classement .rang small { font-size: 11px; font-weight: 700; margin-left: 2px; align-self: flex-start; margin-top: 8px; }
.classement li.est-force .rang { background: var(--jaune); color: var(--g900); }
.classement .nom { font-weight: 600; }
.classement .nom .profil-tag { display: block; font-size: 12px; font-weight: 400; color: var(--g600); }
.classement .score { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px; text-align: right; white-space: nowrap; }
.classement .score small { font-weight: 400; color: var(--g500); font-size: 13px; }
.classement .barre { grid-column: 2 / -1; height: 8px; background: var(--g100); border-radius: var(--rpill); overflow: hidden; }
.classement .barre i { display: block; height: 100%; border-radius: var(--rpill); background: var(--jaune); }
.classement .barre i.force { background: var(--palier-force); }
.classement .barre i.presente { background: var(--palier-presente); }
.classement .barre i.a-developper { background: var(--palier-a-developper); }
.classement .barre i.emergente { background: var(--palier-emergente); }
.classement .pastille { justify-self: end; grid-column: 2 / -1; margin-top: -4px; }

/* Légende */
.legende { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.legende li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; }
.legende .plage { font-weight: 700; white-space: nowrap; min-width: 8ch; }
.legende .pastille { margin-right: 6px; }

/* ---------- Pied ---------- */
.pied { background: var(--g900); color: var(--g300); font-size: 13px; padding: 20px 0; }
.pied p { margin: 0; }
.pied a { color: var(--g0); }

/* ---------- Impression ---------- */
@page { size: A4 portrait; margin: 12mm 14mm; }

@media print {
  :root { --creme: #fff; }
  html, body { background: #fff !important; color: #000; font-size: 11pt; }
  body { display: block; }
  .ecran { animation: none !important; opacity: 1 !important; transform: none !important; }
  .ecran-seulement, .pied, #ecran-accueil, #ecran-questionnaire { display: none !important; }
  main { padding: 0; }
  .conteneur { width: 100%; }
  .bandeau { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: var(--jaune) !important; }
  .bandeau { border-radius: 6px; }
  .bandeau__inner { padding: 12px 20px; }
  .bandeau__logo img { height: 46px; }
  .bandeau__eeq img { height: 56px; }
  .resultats__entete { margin: 7mm 0 5mm; }
  .resultats__entete h1 { font-size: 22pt; }
  .carte { box-shadow: none; border: 1px solid var(--g200); padding: 14px 16px; margin-bottom: 12px; break-inside: avoid; }
  .carte--profil { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: var(--g900) !important; color: #fff !important; }
  .profil__nom { font-size: 22pt; }
  .profil__description { font-size: 11pt; }
  .profils-scores { margin-top: 12px; gap: 8px; }
  .profils-scores li { grid-template-columns: 175px 1fr 62px; font-size: 10pt; }
  .profils-scores .barre { grid-column: auto; }
  /* Le format A4 passe sous le point de rupture mobile : on force les deux colonnes. */
  .grille-resultats { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; }
  .grille-resultats > .carte { margin-bottom: 12px; break-inside: avoid; }
  .radar { max-width: 100%; }
  .radar .etiquette { font-size: 13px; }
  .transversale__intro { font-size: 9.5pt; }
  .transversale__score b { font-size: 30pt; }
  .transversale__palier { font-size: 10pt; }
  /* Classement sur une ligne par compétence : rang · nom · barre · score · palier */
  .classement li {
    grid-template-columns: 26px 1fr 140px 52px auto; gap: 0 10px; padding: 5px 0; break-inside: avoid;
  }
  .classement .rang { width: 26px; height: 26px; font-size: 10.5pt; }
  .classement .nom { font-size: 10pt; line-height: 1.25; }
  .classement .nom .profil-tag { display: inline; font-size: 8.5pt; }
  .classement .nom .profil-tag::before { content: ' · '; }
  .classement .barre { grid-column: auto; height: 7px; }
  .classement .score { font-size: 10.5pt; }
  .classement .pastille { grid-column: auto; margin: 0; font-size: 8pt; padding: 2px 7px; }
  .legende li { font-size: 9.5pt; }
  .pastille, .rang, .barre i, .profils-scores .barre i, .radar .surface {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  a { color: inherit; text-decoration: none; }
  .impression-seulement { display: block; }
  .pied-impression {
    margin-top: 6mm; padding-top: 3mm; border-top: 1px solid var(--g200);
    font-size: 8.5pt; color: var(--g600); display: flex; justify-content: space-between; gap: 12px;
  }
  .pied-impression span:first-child { flex: 1; }
  .pied-impression span:last-child { white-space: nowrap; }
}
