/* ==========================================================================
   Génération Saint Joseph — inscription (une question par écran)
   ========================================================================== */

.inscription {
    background: var(--white);
}

.masthead-hint {
    font-size: 14px;
    color: var(--ink-3);
}

/* --- Progression ------------------------------------------------------------- */

.progression {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
}

.progression-barre {
    height: 3px;
    background: var(--rule);
}

.progression-remplissage {
    height: 100%;
    width: 0;
    background: var(--navy);
    transition: width 0.35s ease;
}

.progression-texte {
    max-width: 680px;
    margin: 0 auto;
    padding: 14px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.progression-retour {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--ink-2);
    transition: color 0.15s ease;
}

.progression-retour:hover {
    color: var(--navy);
}

.progression-retour[hidden] {
    display: none;
}

/* --- Écrans -------------------------------------------------------------------- */

.ecrans {
    max-width: 680px;
    margin: 0 auto;
    padding: 36px 24px 96px;
}

.ecran {
    animation: rise 0.35s ease both;
}

.ecran[hidden] {
    display: none;
}

.ecran h1 {
    font-size: clamp(30px, 4.4vw, 42px);
    font-weight: 500;
    line-height: 1.12;
    margin-bottom: 14px;
}

.ecran .lead {
    margin-bottom: 30px;
    font-size: 17px;
}

.ecran h1 + .grands-choix,
.ecran h1 + .field-group {
    margin-top: 30px;
}

.field-court {
    max-width: 280px;
}

.ecran-actions {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: flex-end;
}

.ecran-erreur {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--bad-soft);
    color: var(--bad);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
}

.ecran-erreur[hidden] {
    display: none;
}

.ecran-erreur::before {
    content: "\f06a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* --- Grands choix (relation, classe, situation, civilité) --------------------- */

.grands-choix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}

.grands-choix-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grand-choix input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.grand-choix-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 26px 24px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.grand-choix-inner i {
    font-size: 24px;
    color: var(--royal);
    margin-bottom: 6px;
}

.grand-choix-inner strong {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.2;
}

.grand-choix-inner small {
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.45;
}

.grand-choix:hover .grand-choix-inner {
    border-color: var(--navy);
}

.grand-choix input:checked + .grand-choix-inner {
    border-color: var(--navy);
    background: var(--navy);
    box-shadow: 0 0 0 1px var(--navy);
}

.grand-choix input:checked + .grand-choix-inner i,
.grand-choix input:checked + .grand-choix-inner strong {
    color: #fff;
}

.grand-choix input:checked + .grand-choix-inner small {
    color: rgba(255, 255, 255, 0.78);
}

.grand-choix input:focus-visible + .grand-choix-inner {
    outline: 2px solid var(--royal);
    outline-offset: 3px;
}

/* Version compacte : une ligne, icône et libellé côte à côte */
.grand-choix-court .grand-choix-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 20px;
}

.grand-choix-court .grand-choix-inner i {
    font-size: 18px;
    margin: 0;
}

.grand-choix-court .grand-choix-inner strong {
    font-size: 18px;
}

/* --- Rappel de l'établissement (élève actuel) ----------------------------------- */

.rappel-etab {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 6px 0 14px;
    background: var(--paper);
    border-left: 3px solid var(--navy);
    border-radius: var(--radius);
}

.rappel-etab img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.rappel-etab strong {
    display: block;
    font-family: var(--serif);
    font-size: 16px;
    color: var(--navy);
}

.rappel-etab span {
    font-size: 13.5px;
    color: var(--ink-2);
}

/* --- Cycles (ancien) ------------------------------------------------------------- */

.cycle {
    border-top: 1px solid var(--rule);
    padding: 18px 0;
}

.cycle:last-of-type {
    border-bottom: 1px solid var(--rule);
}

.cycle-case {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.cycle-case input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.cycle-nom {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 500;
    color: var(--navy);
}

.cycle-annees {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 14px;
    max-width: 440px;
    margin-top: 14px;
    animation: fadeInUp 0.2s ease;
}

.cycle-case + .cycle-annees {
    padding-left: 34px;
}

.cycle-annees[hidden] {
    display: none;
}

.cycle-annees .field-group {
    margin-bottom: 0;
}

.cycle-fleche {
    padding-bottom: 12px;
    color: var(--ink-3);
    font-size: 18px;
}

/* --- Aujourd'hui (ancien) --------------------------------------------------------- */

.aujourdhui-champs {
    animation: fadeInUp 0.25s ease;
    padding-top: 6px;
}

.aujourdhui-champs[hidden] {
    display: none;
}

/* --- Mot de passe ------------------------------------------------------------------ */

.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.strength-bar {
    flex: 0 0 120px;
    height: 4px;
    background: var(--rule);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.25s ease, background 0.25s ease;
}

.strength-text {
    font-size: 12.5px;
    color: var(--ink-3);
}

/* --- CGU --------------------------------------------------------------------------- */

.terms-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--ink-2);
    cursor: pointer;
    line-height: 1.55;
}

.terms-option input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

.terms-option a {
    color: var(--royal);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.terms-option a:hover {
    color: var(--navy);
}

/* --- Responsive --------------------------------------------------------------------- */

@media (max-width: 640px) {
    .ecrans {
        padding: 28px 18px 72px;
    }

    .progression-texte {
        padding: 12px 18px 0;
    }

    .masthead-hint {
        display: none;
    }

    .grands-choix,
    .grands-choix-3 {
        grid-template-columns: 1fr;
    }

    .grand-choix-inner {
        padding: 20px;
    }

    .cycle-annees,
    .cycle-case + .cycle-annees {
        grid-template-columns: 1fr;
        padding-left: 0;
    }

    .cycle-fleche {
        display: none;
    }

    .ecran-actions .btn {
        width: 100%;
    }
}
