/* Test de maturité digitale (/test-maturite-digitale/). Charte : Inter, blanc, gris clair, vert en accent ;
   angles droits, ni dégradé ni ombre. Sans JavaScript, toutes les questions s'affichent à la suite. */

.tm-section { padding-block: 56px 72px; }
.tm [hidden], .tm-resultat [hidden] { display: none !important; }
.tm, .tm-resultat { max-width: 720px; background: var(--edf-white); border: 1px solid var(--edf-border); padding: 36px 40px; }
.tm button, .tm input { font: inherit; }
.tm .btn, .tm-resultat .btn { font-weight: 600; }
.tm h2, .tm-resultat h2 { font-size: 1.5rem; max-width: none; }
.tm-resultat h3 { margin-top: 34px; }

.tm-etape { border: 0; margin: 0; padding: 0; min-width: 0; }
.tm-etape + .tm-etape { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--edf-border); }
.tm-js .tm-etape { display: none; margin-top: 0; padding-top: 0; border-top: 0; }
.tm-js .tm-etape.tm-courante { display: block; }
.tm-intro { display: none; }

.tm, .tm-resultat { scroll-margin-top: 100px; }
.tm-pilier { display: block; line-height: 1.4; margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--edf-green-ink); }
.tm-etape > legend { display: block; width: 100%; padding: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.tm-piliers { list-style: none; margin: 20px 0; padding: 0; }
.tm-piliers li { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--edf-border); }
.tm-piliers b { color: var(--edf-green-ink); }
.tm-piliers span { color: var(--edf-gray-text); font-size: 15px; }
.tm-intro .tm-h-debut { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--edf-border); }
.tm-intro .field { margin-top: 16px; }

/* Choix du format : deux cartes cliquables, de même poids. */
.tm-formats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.tm-format { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 20px 22px; border: 1px solid var(--edf-black); background: var(--edf-white); color: var(--edf-black); cursor: pointer; font: inherit; }
.tm-format b { font-size: 1.1rem; }
.tm-format span { font-size: 15px; line-height: 1.5; color: var(--edf-gray-text); }
.tm-format:hover, .tm-format:focus-visible { background: var(--edf-green-soft); border-color: var(--edf-green-dark); }
.tm-format:focus-visible { outline: 2px solid var(--edf-black); outline-offset: 2px; }
@media (max-width: 600px) { .tm-formats { grid-template-columns: 1fr; } }

@media (max-width: 600px) { .tm-piliers li { grid-template-columns: 1fr; } }

.tm-choix-liste { display: grid; gap: 10px; margin-top: 22px; }
.tm-choix { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border: 1px solid var(--edf-border); background: var(--edf-white); cursor: pointer; font-size: 16px; }
.tm-choix:hover { border-color: var(--edf-black); }
.tm-choix input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--edf-black); }
.tm-choix:has(input:checked) { background: var(--edf-green-soft); border-color: var(--edf-green-dark); font-weight: 600; }
.tm-choix:has(input:focus-visible) { outline: 2px solid var(--edf-black); outline-offset: 2px; }
.tm-etape[aria-invalid="true"] .tm-choix { border-color: #B00020; }

.tm-avancement { margin-bottom: 28px; }
.tm-compteur { margin: 0 0 8px; font-size: 14px; color: var(--edf-gray-text); }
.tm-barre { height: 6px; background: var(--edf-light); }
.tm-barre i { display: block; height: 100%; width: 0; background: var(--edf-green); }
.tm-nav { margin: 26px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.tm-retour { padding: 0; border: 0; background: none; color: var(--edf-gray-text); font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tm-retour:hover { color: var(--edf-black); }
.tm-mention { margin: 14px 0 0; font-size: 14px; color: var(--edf-gray-text); }
.tm-mention a { text-decoration: underline; }
.tm-coordonnees .btn { margin-top: 24px; }
.tm-coordonnees select { width: 100%; min-height: 48px; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--edf-border); background: var(--edf-white); color: var(--edf-black); border-radius: 0; }
.tm-coordonnees select:focus { border-color: var(--edf-black); outline: 1px solid var(--edf-black); outline-offset: -2px; }
.tm-coordonnees select[aria-invalid="true"] { border-color: #B00020; }

/* Résultat */
.tm-resultat:focus { outline: none; }
.tm-score { padding: 24px 28px; background: var(--edf-green-soft); border-left: 4px solid var(--edf-green-dark); }
.tm-score p { margin: 10px 0 0; }
.tm-resultat > p { margin: 12px 0 0; }
.tm-lien { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--edf-green-dark); }
.tm-raisons ul { list-style: none; margin: 12px 0 0; padding: 0; }
.tm-raisons li { padding: 12px 16px; border-left: 3px solid var(--edf-green); margin-bottom: 10px; background: var(--edf-light); font-weight: 600; }
.tm-raisons small { display: block; font-weight: 400; font-size: 14px; color: var(--edf-gray-text); margin-bottom: 4px; }

.tm-jauges { list-style: none; margin: 16px 0 0; padding: 0; }
.tm-jauges li { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em; gap: 4px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--edf-border); }
.tm-jauges .tm-jauge-nom { font-size: 15px; grid-column: 1; }
.tm-jauges .tm-jauge-note { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-weight: 700; }
.tm-jauges .tm-jauge { grid-column: 1; height: 8px; background: var(--edf-light); }
.tm-jauges .tm-jauge i { display: block; height: 100%; background: var(--edf-green-dark); }
.tm-jauges .tm-jauge-note { font-weight: 400; color: var(--edf-gray-text); }
.tm-jauges .tm-retenu .tm-jauge-nom, .tm-jauges .tm-retenu .tm-jauge-note { font-weight: 700; color: var(--edf-black); }


/* Audit complet */
.tm-note-chiffre { margin: 0 0 6px !important; font-size: 1.1rem; color: var(--edf-gray-text); }
.tm-note-chiffre b { font-size: 2.6rem; line-height: 1; color: var(--edf-black); }
.tm-note h2 { margin: 0; }
.tm-themes .tm-jauge-note { font-weight: 700; color: var(--edf-black); }
.tm-priorites { margin: 14px 0 0; padding-left: 1.4em; }
.tm-priorites li { padding: 10px 0 12px; border-bottom: 1px solid var(--edf-border); }
.tm-priorites li::marker { font-weight: 700; }
.tm-prio-texte { display: block; font-weight: 600; }
.tm-prio-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: 14px; color: var(--edf-gray-text); }
.tm-type { padding: 2px 8px; border: 1px solid var(--edf-green-dark); background: var(--edf-green-soft); color: var(--edf-black); font-size: 13px; font-weight: 600; }
.tm-h-profil { margin-bottom: 14px; }

.tm-plus { margin-top: 34px; padding: 22px 24px; border: 1px solid var(--edf-green-dark); }
.tm-plus p { margin: 0; }
.tm-plus p + p { margin-top: 16px; }

.tm-suite { margin-top: 34px; padding-top: 26px; border-top: 2px solid var(--edf-black); }
.tm-suite p { margin: 0; }
.tm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px !important; }

@media (max-width: 600px) {
  .tm-section { padding-block: 32px 48px; }
  .tm, .tm-resultat { padding: 24px 18px; }
  .tm-etape > legend { font-size: 1.15rem; }
  .tm-score { padding: 20px; }
}
