/* ═══════════════════════════════════════
   BAROMÈTRE DE L'IA AU TRAVAIL : QUESTIONNAIRE
   Complète diagnostic.css (écrans, options, boutons, formulaire) :
   progression par bloc, échelle 1→7 / 1→10, cases multiples, retour,
   révélation des chiffres 2025, écran de profil, sortie et clôture.
   ═══════════════════════════════════════ */

.baro-body .diag-screens {
    align-items: center;
    padding: 6rem 2rem 4rem;
}
.baro {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}
.baro .diag-screen {
    max-width: none;
    animation: none;
}
.baro .baro-titre:focus { outline: none; }

/* Entrée des écrans : glissé dans le sens du parcours */
.baro-entre-avant { animation: baroAvant 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.baro-entre-arriere { animation: baroArriere 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes baroAvant {
    from { opacity: 0; transform: translateX(32px); }
    to { opacity: 1; transform: none; }
}
@keyframes baroArriere {
    from { opacity: 0; transform: translateX(-32px); }
    to { opacity: 1; transform: none; }
}

/* ───────── Progression ───────── */
.baro-progress {
    display: none;
    margin-bottom: 2.75rem;
}
.baro-progress.visible { display: block; }
.baro-progress-tete {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.7rem;
    font-size: 0.8rem;
}
.baro-progress-bloc {
    color: var(--off-white);
    font-weight: 700;
}
.baro-progress-compte {
    color: var(--soft-blue);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.baro .diag-progress-bar,
.baro .diag-progress-fill { border-radius: 0; }
.baro .diag-progress-fill { box-shadow: 0 0 12px rgba(249, 220, 92, 0.45); }

/* ───────── Accueil, sortie, clôture ───────── */
.baro-accueil h1,
.baro-sortie h1,
.baro-close h1 { margin-bottom: var(--space-md); }
.baro-accueil-cadre {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-lg);
    padding: 1.75rem 2.25rem;
    text-align: left;
    background: rgba(27, 73, 101, 0.1);
    border: 1px solid rgba(124, 152, 179, 0.12);
}
.baro-accueil .diag-intro-list { margin-bottom: 0; }
.baro-accueil .diag-intro-list li { font-size: 0.95rem; }
.baro-commencer,
.baro-close .diag-btn,
.baro-partage {
    width: auto;
    min-width: 280px;
}
.baro-rgpd {
    max-width: 540px;
    margin: var(--space-lg) auto 0;
    font-size: 0.75rem;
    line-height: 1.65;
    color: var(--soft-blue);
}
.baro-rgpd a,
.baro-email-retour a {
    color: var(--light-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.baro-rgpd a:hover,
.baro-email-retour a:hover { color: var(--golden); }
.baro-sortie .diag-intro-sub { margin-bottom: var(--space-sm); }
.baro-sortie-texte {
    color: var(--light-blue);
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
}
.baro-sortie .baro-actions { justify-content: center; }

/* ───────── Question ───────── */
.baro .diag-option:focus-visible,
.baro-echelle-btn:focus-visible,
.baro-retour:focus-visible,
.baro .diag-btn:focus-visible,
.baro-champ select:focus-visible,
.baro-champ input:focus-visible {
    outline: 2px solid var(--golden);
    outline-offset: 3px;
}

/* Choix multiples : case carrée cochée */
.diag-option.multi .diag-option-marker { border-radius: 0; }
.diag-option.multi.selected .diag-option-marker::after {
    width: 10px;
    height: 6px;
    background: none;
    border-radius: 0;
    border-left: 2px solid var(--midnight);
    border-bottom: 2px solid var(--midnight);
    transform: translateY(-1px) rotate(-45deg);
}

/* Échelle : rangée de cases jointives, bornes en dessous */
.baro-echelle { position: relative; }
.baro-echelle-boutons {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(124, 152, 179, 0.2);
    border: 1px solid rgba(124, 152, 179, 0.2);
}
.baro-echelle-10 .baro-echelle-boutons { grid-template-columns: repeat(10, 1fr); }
.baro-echelle-btn {
    position: relative;
    height: clamp(58px, 10vw, 84px);
    background: var(--midnight);
    color: var(--light-blue);
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 0;
    border-radius: 0;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.baro-echelle-btn:hover {
    background: linear-gradient(rgba(249, 220, 92, 0.1), rgba(249, 220, 92, 0.1)), var(--midnight);
    color: var(--off-white);
    box-shadow: inset 0 -3px 0 rgba(249, 220, 92, 0.6);
}
.baro-echelle-btn.selected {
    background: var(--golden);
    color: var(--midnight);
    box-shadow: 0 0 28px rgba(249, 220, 92, 0.35);
    z-index: 1;
}
.baro-echelle-btn.selected:focus-visible { outline-color: var(--off-white); }
.baro-echelle-btn:focus-visible { z-index: 2; outline-offset: -3px; }
.baro-echelle-bornes {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    color: var(--soft-blue);
}
.baro-echelle-bornes span:last-child { text-align: right; }

/* Liste déroulante et texte libre */
.baro-champ select,
.baro-champ input {
    min-height: 56px;
    font-size: 1rem;
}

/* Exemple sous le titre de la question : colle au titre (qui garde sa grande marge basse), sans cadre ni italique */
.baro-aide {
    margin: -3.25rem 0 var(--space-md);
    font-size: 0.88rem;
    color: var(--soft-blue);
    line-height: 1.55;
    max-width: 36rem;
}

/* Précision libre d'une option « Autre » : même champ que le texte libre, sous les options */
.baro-autre-champ { margin-top: 1.25rem; }
.baro-autre-champ[hidden],
.baro-actions .diag-btn[hidden] { display: none; }

/* Barre d'actions : retour à gauche, suivant à droite */
.baro-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.25rem;
}
.baro-actions .diag-btn {
    width: auto;
    min-width: 200px;
    margin-left: auto;
}
.baro .diag-btn:disabled {
    opacity: 0.35;
    transform: none;
    box-shadow: none;
}
.baro-retour {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    background: none;
    border: 0;
    color: var(--soft-blue);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
}
.baro-retour:hover { color: var(--golden); }
.baro-fleche { width: 18px; height: 18px; flex-shrink: 0; }

/* ───────── Ouverture de bloc ───────── */
.baro-bloc-cadre {
    position: relative;
    padding: 3.5rem 2.5rem;
    text-align: center;
    background: rgba(27, 73, 101, 0.1);
    border: 1px solid rgba(124, 152, 179, 0.12);
}
.baro-bloc-cadre h2 {
    font-size: clamp(1.8rem, 4.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--off-white);
}
.baro-bloc-texte {
    max-width: 30em;
    margin: 1rem auto 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--light-blue);
}

/* ───────── Révélation d'un chiffre 2025 ───────── */
.baro-revelation.diag-transition-takeaway {
    padding: 3.5rem 2.5rem 3rem;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(249, 220, 92, 0.1), transparent 65%),
        rgba(27, 73, 101, 0.1);
}
.baro-chiffre-titre { margin: 0; }
.baro-chiffre {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 14vw, 8rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--golden);
    text-shadow: 0 0 40px rgba(249, 220, 92, 0.25);
    font-variant-numeric: tabular-nums;
}
.baro-chiffre-texte {
    max-width: 32em;
    margin: 1rem auto 0;
    font-size: 1.08rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--light-blue);
}

/* ───────── Profil ───────── */
.baro-profil-tete {
    text-align: center;
    margin-bottom: 2.75rem;
}
.baro-profil h1 {
    font-family: var(--font-body);
    font-size: clamp(1.15rem, 2.4vw, 1.4rem);
    font-weight: 700;
    color: var(--light-blue);
}
.baro-profil h1 br { display: none; }
.baro-profil h1 em {
    display: block;
    margin-top: 0.4rem;
    font-family: var(--font-display);
    font-style: normal;
    font-weight: 400;
    font-size: clamp(3rem, 9vw, 5.4rem);
    line-height: 1.15;
    color: var(--golden);
    text-shadow: 0 0 48px rgba(249, 220, 92, 0.25);
}
.baro-profil-texte {
    max-width: 36em;
    margin: 1.25rem auto 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--off-white);
}

/* Jauge du score de prompting : position parmi les répondants 2025 */
.baro-jauge-bloc {
    position: relative;
    padding: 2rem 2.25rem 2.25rem;
    background: rgba(27, 73, 101, 0.1);
    border: 1px solid rgba(124, 152, 179, 0.12);
}
.baro-jauge-phrase {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--off-white);
}
.baro-jauge {
    position: relative;
    height: 14px;
    margin-top: 1.5rem;
    background: rgba(124, 152, 179, 0.16);
}
.baro-jauge-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(249, 220, 92, 0.35), var(--golden));
    box-shadow: 0 0 18px rgba(249, 220, 92, 0.35);
    transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.baro-jauge-repere {
    position: absolute;
    top: -7px;
    bottom: -7px;
    left: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--off-white);
    transition: left 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.baro-jauge-graduation {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--midnight);
}

/* Les deux lectures : grille bordée */
.baro-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 2.5rem;
    background: rgba(124, 152, 179, 0.12);
    border: 1px solid rgba(124, 152, 179, 0.12);
}
.baro-insight {
    padding: 1.75rem 1.75rem 2rem;
    background: var(--midnight);
}
.baro-insight h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--off-white);
}
.baro-insight h3::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--golden);
    flex-shrink: 0;
}
.baro-insight p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--light-blue);
}

.baro-partage-zone {
    margin: 2.75rem 0;
    text-align: center;
}
.baro-ic-linkedin { width: 18px; height: 18px; }

/* Inscription aux résultats */
.baro-email {
    position: relative;
    padding: 2rem 2.25rem;
    background: rgba(27, 73, 101, 0.1);
    border: 1px solid rgba(124, 152, 179, 0.12);
}
.baro-email-titre {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--off-white);
}
.baro-email-texte {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--soft-blue);
}
.baro-email-ligne {
    display: flex;
    gap: 0.75rem;
}
.baro-email-ligne input { flex: 1; min-height: 52px; }
.baro-email-ligne .diag-btn {
    width: auto;
    white-space: nowrap;
    padding: 0.9rem 1.5rem;
}
.baro-email-retour {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--light-blue);
}
.baro-piege {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ───────── Mobile ───────── */
@media (max-width: 768px) {
    .baro-body .diag-screens { padding: 6.25rem 1.25rem 0; }
    .baro-actions:has(.diag-btn:not([hidden])) {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin: 1.5rem -1.25rem 0;
        padding: 1.5rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
        background: linear-gradient(to top, var(--midnight) 72%, rgba(13, 27, 42, 0));
    }
    .baro-actions .diag-btn { flex: 1; min-width: 0; }
    .baro .diag-screen { padding-bottom: 2rem; }
    .baro-insights { grid-template-columns: 1fr; }
    .baro-bloc-cadre,
    .baro-revelation.diag-transition-takeaway { padding: 2.75rem 1.5rem 2.25rem; }
    .baro-jauge-bloc,
    .baro-email { padding: 1.75rem 1.5rem; }
}
@media (max-width: 520px) {
    .baro-echelle-10 .baro-echelle-boutons { grid-template-columns: repeat(5, 1fr); }
    .baro-echelle-btn { height: 60px; font-size: 1.15rem; }
    .baro-email-ligne { flex-direction: column; }
    .baro-email-ligne .diag-btn { width: 100%; }
    .baro-commencer,
    .baro-close .diag-btn,
    .baro-partage { width: 100%; min-width: 0; }
    .baro-retour { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .baro-entre-avant,
    .baro-entre-arriere { animation: none; }
    .baro-jauge-fill,
    .baro-jauge-repere,
    .baro-echelle-btn,
    .baro .diag-option,
    .baro .diag-btn { transition: none; }
}

/* La barre fixe du haut (diag-progress) porte la progression : celle du moteur reste pour les lecteurs d'écran seulement */
.baro-body .baro-progress { display: none !important; }

/* Kit gratuit sur l'écran de profil : bloc des fiches formation (fo-kit), empilé */
.baro-kit {
    position: relative;
    margin-top: var(--space-md);
    padding: 2rem;
    background: linear-gradient(180deg, var(--midnight-light) 0%, var(--midnight) 100%);
    border: 1px solid rgba(124, 152, 179, 0.12);
    text-align: left;
}
.baro-kit .corner-plus { position: absolute; }
.baro-kit-media img { width: 100%; height: auto; display: block; border: 1px solid rgba(124, 152, 179, 0.15); }
.baro-kit-corps { margin-top: 1.5rem; }
.baro-kit-titre { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--off-white); margin-bottom: 1rem; line-height: 1.25; }
.baro-kit-liste { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.5rem; }
.baro-kit-liste li { position: relative; padding-left: 1.5rem; color: var(--light-blue); font-size: 0.93rem; line-height: 1.6; }
.baro-kit-liste li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; background: var(--golden); opacity: 0.7; }
.baro-kit-btn { display: inline-flex; }
@media (max-width: 600px) {
    .baro-kit { padding: 1.5rem; }
    .baro-kit-btn { width: 100%; justify-content: center; }
}
