/* IArama — styles des composants. Les valeurs viennent de tokens.json (variables --papier, --eclair, etc.). */

.d-page { background: var(--papier); color: var(--encre); font: 400 16px/26px var(--font-texte); padding: var(--espace-5); }
.d-bande { background: var(--nuit); color: var(--sur-nuit); padding: var(--espace-6); border-radius: var(--rayon-lg); }
.d-bande :focus-visible { outline-color: var(--repere); }

/* Boutons : pilules pleines, halo violet */
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--espace-2); min-height: 52px; padding: 14px 28px; border: 2px solid transparent; border-radius: var(--rayon-pilule); background: var(--eclair); color: var(--sur-eclair); font: 700 16px/20px var(--font-texte); box-shadow: var(--ombre-halo); cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.d-btn:hover { transform: translateY(-2px); }
.d-btn:active { transform: translateY(0); box-shadow: none; }
.d-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.d-btn--secondaire { background: transparent; color: var(--encre); border-color: var(--encre); box-shadow: none; }
.d-btn--repere { background: var(--repere); color: var(--sur-repere); box-shadow: none; }
.d-btn[disabled] { background: var(--craie); color: var(--encre-douce); border-color: transparent; box-shadow: none; transform: none; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .d-btn { transition: none; } .d-btn:hover { transform: none; } }

/* Cartes et tuiles */
.d-carte { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon-lg); padding: var(--espace-6); max-width: 640px; box-sizing: border-box; box-shadow: var(--ombre-carte); }
.d-carte h3 { margin: 0; font: 700 28px/32px var(--font-display); letter-spacing: -0.02em; }
.d-resultat { max-width: 760px; }
.d-bento { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--espace-4); margin-bottom: var(--espace-5); }
.d-tuile { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon-lg); padding: var(--espace-6); box-shadow: var(--ombre-carte); box-sizing: border-box; }
.d-tuile h3 { margin: 0; font: 700 28px/32px var(--font-display); letter-spacing: -0.02em; }
.d-tuile--eclair { background: var(--eclair); color: var(--sur-eclair); border-color: transparent; box-shadow: var(--ombre-halo); }
.d-tuile--craie { background: var(--craie); border-color: transparent; box-shadow: none; }
.d-tuile--large { grid-column: 1 / -1; }
@media (max-width: 640px) { .d-bento { grid-template-columns: 1fr; } }

/* Champs */
.d-champ { display: grid; gap: var(--espace-2); }
.d-champ label { font: 700 16px/22px var(--font-texte); }
.d-champ input[type="email"], .d-champ input[type="text"] { min-height: 52px; padding: 12px 16px; border: 2px solid var(--trace); border-radius: var(--rayon-md); background: var(--feuille); color: var(--encre); font: 400 16px/24px var(--font-texte); box-sizing: border-box; width: 100%; }
.d-champ input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--eclair); }
.d-champ--erreur input { border-color: var(--alerte); }
.d-aide { color: var(--encre-douce); font: 400 14px/22px var(--font-texte); margin: 0; }
.d-erreur { color: var(--alerte); font: 700 14px/20px var(--font-texte); margin: 0; }
.d-consent { display: flex; gap: var(--espace-3); align-items: flex-start; font: 400 14px/22px var(--font-texte); color: var(--encre-douce); }
.d-consent input { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--trace); border-radius: var(--rayon-sm); background: var(--feuille); }
.d-consent input:checked { background: var(--eclair); border-color: var(--eclair); box-shadow: inset 0 0 0 4px var(--feuille); }
.d-consent input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.d-consent a { color: var(--eclair); }

/* Questionnaire */
.d-progres { height: 10px; border-radius: var(--rayon-pilule); background: var(--craie); overflow: hidden; }
.d-progres > span { display: block; height: 100%; border-radius: var(--rayon-pilule); background: var(--eclair); }
.d-axe-info { margin: var(--espace-4) 0 var(--espace-2); color: var(--encre-douce); font: 400 14px/22px var(--font-texte); }
.d-options { display: grid; gap: var(--espace-3); border: 0; padding: 0; margin: var(--espace-5) 0; }
.d-options legend { padding: 0; margin: 0 0 var(--espace-4); font: 700 26px/32px var(--font-display); letter-spacing: -0.02em; }
.d-option { display: flex; gap: var(--espace-3); align-items: flex-start; padding: var(--espace-4) var(--espace-5); border: 2px solid var(--trace); border-radius: var(--rayon-md); background: var(--feuille); cursor: pointer; font: 400 16px/26px var(--font-texte); }
.d-option:hover { border-color: var(--eclair); }
.d-option input { appearance: none; flex: none; width: 24px; height: 24px; margin: 1px 0 0; border: 2px solid var(--trace); border-radius: 50%; background: var(--feuille); }
.d-option input:checked { background: var(--eclair); border-color: var(--eclair); box-shadow: inset 0 0 0 4px var(--feuille); }
.d-option:has(input:checked) { border-color: var(--eclair); background: var(--craie); }
.d-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.d-nav { display: flex; justify-content: space-between; gap: var(--espace-4); }

/* Échelle de maturité : la fiole à bulle */
.d-echelle { display: grid; gap: var(--espace-2); max-width: 560px; }
.d-vial { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: 48px; border: 2px solid var(--trace); border-radius: var(--rayon-pilule); overflow: hidden; background: var(--feuille); }
.d-vial > i { display: block; border-left: 2px solid var(--trace); }
.d-vial > i:first-of-type { border-left: 0; }
.d-vial > i:nth-of-type(1) { background: var(--niveau-1); }
.d-vial > i:nth-of-type(2) { background: var(--niveau-2); }
.d-vial > i:nth-of-type(3) { background: var(--niveau-3); }
.d-vial > i:nth-of-type(4) { background: var(--niveau-4); }
.d-bulle { position: absolute; top: 50%; left: var(--pos, 50%); width: 32px; height: 32px; margin: -16px 0 0 -16px; border: 3px solid var(--encre); border-radius: 50%; background: var(--repere); animation: d-glisse .8s ease-out 1; }
@keyframes d-glisse { from { left: 12%; } }
@media (prefers-reduced-motion: reduce) { .d-bulle { animation: none; } }
.d-regle { height: 8px; background: repeating-linear-gradient(90deg, var(--trace) 0 2px, transparent 2px 16px); }
.d-niveaux { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.d-niveaux li { padding: 0 var(--espace-2) 0 0; font: 700 14px/20px var(--font-texte); }
.d-niveaux li small { display: block; font-weight: 400; color: var(--encre-douce); }
.d-niveaux li[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; text-decoration-color: var(--eclair); }
.d-niveaux li[aria-current="true"] small { text-decoration: none; }

/* Barres d'axes */
.d-axes { display: grid; gap: var(--espace-3); margin: 0; padding: 0; list-style: none; max-width: 560px; }
.d-axe { display: grid; grid-template-columns: 120px 1fr 48px; gap: var(--espace-3); align-items: center; font: 700 14px/20px var(--font-texte); }
.d-axe__piste { height: 16px; border: 2px solid var(--trace); border-radius: var(--rayon-pilule); background: var(--feuille); overflow: hidden; }
.d-axe__piste > span { display: block; height: 100%; background: var(--eclair); }
.d-axe__val { text-align: right; font-variant-numeric: tabular-nums; }

/* Résultat */
.d-score { margin: 0; font: 800 120px/104px var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.d-score small { font-size: 48px; letter-spacing: -0.03em; }
.d-niveau-nom { margin: var(--espace-4) 0 0; font: 700 20px/26px var(--font-display); letter-spacing: -0.01em; }
.d-priorites { counter-reset: p; margin: var(--espace-5) 0 0; padding: 0; list-style: none; display: grid; gap: var(--espace-4); }
.d-priorites li { display: grid; grid-template-columns: 36px 1fr; gap: var(--espace-3); align-items: start; }
.d-priorites li::before { counter-increment: p; content: counter(p); display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid var(--encre); border-radius: 50%; background: var(--repere); color: var(--sur-repere); font: 800 15px/1 var(--font-display); }
.d-actions { display: flex; flex-wrap: wrap; gap: var(--espace-4); }

/* En-tête et pied de page du thème enfant */
.iarama-header { background: var(--feuille); border-bottom: 1px solid var(--filet); }
.iarama-header__inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.iarama-header__logo img { display: block; height: 49px; width: auto; }
.iarama-header__nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.iarama-header__nav a { color: var(--encre); text-decoration: none; font: 600 16px/20px var(--font-texte); }
.iarama-header__nav a:hover { color: var(--eclair); }
.iarama-header__nav a.d-btn { color: var(--sur-eclair); min-height: 44px; padding: 10px 22px; }
.iarama-header__nav a.d-btn:hover { color: var(--sur-eclair); }
.iarama-footer { background: var(--nuit); color: var(--sur-nuit-doux); }
.iarama-footer__inner { max-width: 1120px; margin: 0 auto; padding: 32px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 15px/24px var(--font-texte); }
.iarama-footer p { margin: 0; }
.iarama-footer a { color: var(--sur-nuit); margin-left: 20px; }
@media (max-width: 600px) { .iarama-footer a { margin: 0 20px 0 0; } }
