/* ============================================================
   REGISTER — étapes d'inscription, account-types, layouts fullscreen
   (login-fullscreen + register-fullscreen)
   ============================================================ */

/* ============================================================
   LAYOUT FULLSCREEN COMMUN (login + register)
   ============================================================ */

body:has(.login-fullscreen) .support-footer,
body:has(.register-fullscreen) .support-footer {
    display: none;
}

.login-fullscreen,
.register-fullscreen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--background-white);
}

/* Header partagé */
.login-fullscreen-header {
    display: flex;
    flex-direction: column;
    padding: clamp(12px, 2vw, 20px) clamp(16px, 3vw, 32px);
    background: var(--login-header-bg);
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.login-fullscreen-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: clamp(8px, 1.2vw, 16px);
}

.login-fullscreen-header-center {
    display: flex;
    gap: clamp(8px, 1.2vw, 16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -50px;
}

.login-fullscreen-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.login-fullscreen-back:hover { color: var(--primary-hover); text-decoration: none; }
.login-fullscreen-back i { font-size: 12px; }

.login-fullscreen-logo {
    height: clamp(36px, 4vw, 48px);
    width: auto;
    object-fit: contain;
    margin-bottom: clamp(4px, 0.8vw, 8px);
}

.login-fullscreen-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 500;
    color: #373C45;
    letter-spacing: -0.02em;
}

.login-fullscreen-subtitle {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    color: #4A4A4A;
    max-width: min(420px, 85vw);
}

/* Locale selector dans fullscreen */
.login-fullscreen-locale { position: relative; top: auto; right: auto; }

.login-fullscreen-locale summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
}

.login-fullscreen-locale summary::-webkit-details-marker,
.login-fullscreen-locale summary::marker { display: none; }
.login-fullscreen-locale summary i { font-size: 10px; opacity: 0.7; }
.login-fullscreen-locale .locale-ul { right: 0; left: auto; }

/* ============================================================
   LAYOUT LOGIN FULLSCREEN
   ============================================================ */

.login-fullscreen-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    max-width: min(1200px, 96vw);
    margin: 0 auto;
    width: 100%;
    padding: clamp(24px, 3vw, 48px) clamp(20px, 2.5vw, 32px);
}

.login-fullscreen-promo {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 clamp(24px, 4vw, 48px) 0 0;
    max-width: min(480px, 42vw);
}

.login-fullscreen-divider {
    width: 1px;
    min-height: 200px;
    align-self: stretch;
    background: var(--border-color);
    flex-shrink: 0;
    margin: 0 clamp(16px, 2.5vw, 32px);
}

.login-fullscreen-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: min(420px, 92vw);
    width: 100%;
    margin: 0 auto;
}

.login-fullscreen-form-title {
    margin: 0 0 clamp(16px, 2vw, 24px) 0;
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 700;
    color: var(--text-primary);
}

/* Promo (colonne gauche du login) */
.login-fullscreen-promo h2 { margin: 0 0 24px 0; font-size: 28px; font-weight: 700; color: var(--text-primary); }

.login-fullscreen-features { list-style: none; padding: 0; margin: 0 0 32px 0; }

.login-fullscreen-feature { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.login-fullscreen-feature:last-child { margin-bottom: 0; }

.login-fullscreen-feature-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    flex-shrink: 0;
}

.login-fullscreen-feature-text h3 { margin: 0 0 4px 0; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.login-fullscreen-feature-text p  { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.45; }

.login-fullscreen-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 200px;
    border-radius: 24px;
    height: 48px;
    padding: 0 28px;
    background: var(--background-white);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
}

.login-fullscreen-cta:hover { background: var(--primary-hover); color: var(--background-white); text-decoration: none; }

/* Desktop: cacher le lien inscription (promo a son propre CTA) */
.login-fullscreen .registration-content { display: none; }

/* Carousel dots — cachés sur desktop */
.login-fullscreen-carousel-dots { display: none; }

/* ============================================================
   LAYOUT REGISTER FULLSCREEN
   ============================================================ */

.register-progress-bar {
    width: min(1066px, 82vw);
    max-width: 100%;
    height: 6px;
    background: #FFFF;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 100px;
}

.register-progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.register-fullscreen-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    max-width: min(1200px, 96vw);
    margin: 0 auto;
    width: 100%;
    /* padding: clamp(24px, 3vw, 48px) clamp(20px, 2.5vw, 32px); */
    box-sizing: border-box;
}

.register-fullscreen-form { width: 100%; }

/* ============================================================
   ÉTAPES (steps)
   ============================================================ */

/* Indicateur de progression */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: clamp(24px, 3vw, 40px);
    gap: clamp(8px, 1vw, 12px);
}

.step-dot {
    height: 10px;
    border-radius: 100px;
    background: var(--border-color);
    border: none;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    width: 10px;
}

.step-dot.active    { background: var(--primary-color); width: 40px; height: 12px; }
.step-dot.completed { background: var(--primary-color); opacity: 0.5; }
.step-dot.completed::after { display: none; }

/* Étapes */
.register-step { display: none; width: 100%; }

.register-step.active {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.register-step.register-step--hidden-mobile { display: none !important; }

.steps-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.register-step h3 {
    font-size: clamp(17px, 1.6vw, 20px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.register-step h2 {
     font-size: 28px;
     font-weight: 500;
     color: #373C45;
    }

.register-step p {
    font-size: clamp(13px, 1.2vw, 14px);
    color: var(--text-secondary);
    margin: 0 0 clamp(16px, 2vw, 24px) 0;
    line-height: 1.4;
}

/* Mobile-only header label (step langue) */
.language-header-mobile-only { display: none; }

@media (max-width: 768px) {
    .language-header-mobile-only { display: block; }
}

/* ============================================================
   STEP PANELS
   ============================================================ */

.step-panel { width: 70%; }

.step-panel h2 {
    text-align: center;
}

.step-1-footer {
    width: min(70%, 100%);
    max-width: 100%;
    justify-self: center;
    align-items: center;
    justify-content: space-evenly;
    display: flex;
    flex-wrap: wrap;
    margin-top: clamp(16px, 2vw, 24px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: clamp(8px, 1vw, 10px);
}

.step-1-footer-item {
    max-width: 33%;
    min-width: 140px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex-direction: column;
    gap: clamp(6px, 0.8vw, 8px);
    font-size: clamp(12px, 1.1vw, 13px);
    color: var(--text-secondary);
}

.step-1-footer-item h3 { font-size: clamp(14px, 1.3vw, 16px); font-weight: 600; flex-wrap: wrap; color: var(--text-primary); margin: 0; }
.step-1-footer-item p  { margin: 0; flex-wrap: wrap; font-size: clamp(12px, 1.1vw, 14px); color: var(--text-secondary); line-height: 1.45; }
.step-1-footer-item i  { color: var(--primary-color); font-size: 16px; }

/* Trust logos */
.step-2-trust-block {
    margin-top: clamp(20px, 2.5vw, 32px);
    padding-top: clamp(16px, 2vw, 24px);
}

.step-2-trust-title {
    font-size: clamp(13px, 1.2vw, 14px);
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 clamp(12px, 1.5vw, 16px) 0;
}

.step-2-trust-logos {
    --trust-logo-width: clamp(100px, 18vw, 150px);
    --trust-logo-gap: clamp(8px, 1.2vw, 12px);
    display: grid;
    grid-template-columns: repeat(4, var(--trust-logo-width));
    justify-content: center;
    align-items: center;
    gap: var(--trust-logo-gap);
}

.step-2-trust-logo {
    width: var(--trust-logo-width);
    height: clamp(60px, 10vw, 90px);
    object-fit: contain;
    opacity: 0.8;
    border: 1px solid #E0E7FF;
    border-radius: 10px;
    padding: clamp(6px, 1vw, 10px);
    box-sizing: border-box;
}

/* Pedagogical card */
.pedagogical-info-card {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 24px);
    width: 70%;
    max-width: 50rem;
    margin-top: clamp(20px, 2.5vw, 32px);
    padding: clamp(20px, 2.5vw, 28px);
    background: var(--login-header-bg);
    border-radius: var(--radius-md);
}

.pedagogical-info-card__text { flex: 1; min-width: 0; }
.pedagogical-info-card__text h3 { font-size: clamp(15px, 1.4vw, 17px); font-weight: 700; color: var(--primary-color); margin: 0 0 8px 0; text-align: left; letter-spacing: -0.01em; }
.pedagogical-info-card__text p  { font-size: clamp(13px, 1.2vw, 14px); color: var(--text-secondary); margin: 0; line-height: 1.6; text-align: left; }

.pedagogical-info-card__image { flex-shrink: 0; max-width: 332px; }
.pedagogical-info-card__image img { width: 100%; height: auto; object-fit: contain; }

.pedagogical-options { margin-top: 16px; }

/* CGU */
.register-cgu-text {
    display: block;
    margin-bottom: clamp(12px, 1.5vw, 16px);
    color: var(--text-secondary);
    font-size: clamp(13px, 1.2vw, 14px);
    line-height: 1.6;
}

.register-cgu-link { color: var(--primary-color); text-decoration: underline; }

/* Invitation email */
.invitation-email-display {
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--background-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
}

.invitation-email-display p      { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; text-align: left; }
.invitation-email-display strong { color: var(--text-primary); }
.invitation-email-display span   { color: var(--primary-color); font-weight: 500; }

/* Mobile learner welcome card */
.mobile-learner-welcome-card { width: 95%; margin: 16px auto -10px auto; }

/* ============================================================
   ACCOUNT TYPES
   ============================================================ */

.account-type-options {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: clamp(12px, 1.5vw, 16px);
    margin: clamp(16px, 2vw, 24px) 0;
}

.account-type-option {
    padding: clamp(8px, 1vw, 10px);
    flex: 1;
    max-width: min(500px, 48%);
    position: relative;
    cursor: pointer;
    transition: var(--transition-normal);
}

.account-type-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.account-type-option .option-content {
    height: 6rem;
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    padding: clamp(8px, 1vw, 10px);
    border: 1px solid #E0E7FF;
    border-radius: var(--radius-sm);
    background: var(--background-white);
    transition: var(--transition-normal);
    position: relative;
}

.account-type-option:hover .option-content { border-color: var(--text-muted); }

.account-type-option input[type="radio"]:checked + .option-content {
    border-color: var(--primary-color);
    border-width: 2px;
    background: var(--background-white);
}

/* Radio circle */
.account-type-option .option-radio-visual {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border: 1px solid #E0E7FF;
    border-radius: 50%;
    background: var(--background-white);
    transition: var(--transition-fast);
    position: relative;
}

.account-type-option input[type="radio"]:checked + .option-content .option-radio-visual {
    border-color: #335CFF;
    background: var(--background-white);
    display: flex; align-items: center; justify-content: center;
}

.account-type-option input[type="radio"]:checked + .option-content .option-radio-visual::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 5px; height: 9px;
    box-sizing: border-box;
    border: solid #335CFF;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Text block */
.account-type-option .option-text { flex: 1; min-width: 0; }
.account-type-option .option-text h4 { margin: 0 0 6px 0; font-size: 1rem; font-weight: 600; color: var(--text-primary); transition: var(--transition-fast); }
.account-type-option .option-text p  { margin: 0; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.4; text-align: left; }

/* Icon */
.account-type-option .option-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(93px, 4vw, 44px);
    height: clamp(83px, 4vw, 44px);
    padding: 8px;
    color: var(--primary-color);
    font-size: clamp(1.25rem, 1.2vw, 1.5rem);
    background: var(--login-header-bg);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.account-type-option .option-icon svg {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

/* Legacy: option-content h4/p */
.option-content h4 { margin: 0 0 6px 0; font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.option-content p  { margin: 0; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.4; text-align: left; }

/* Pedagogical options */
.pedagogical-options .account-type-option .option-content { height: 7rem; padding: 10px 24px; align-items: center; }
.pedagogical-options .account-type-option .option-text h4 { margin: 0; }

/* Personal info: first name + last name on one line (desktop), stacked (mobile) */
.personal-info-fields-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.personal-info-fields-row > * {
    min-width: 0;
}

@media (min-width: 601px) {
    .personal-info-fields-row {
        flex-direction: row;
        gap: clamp(12px, 1.5vw, 20px);
    }

    .personal-info-fields-row > * {
        flex: 1;
    }
}

/* ============================================================
   REGISTER — RESPONSIVE
   ============================================================ */

@media (max-width: 1120px) {
    .register-progress-bar { width: min(1066px, 78vw); }
    .login-fullscreen-promo { max-width: min(420px, 90%); }
}

@media (max-width: 1024px) {
    .step-1-footer { width: 100%; }
    .step-1-footer-item { min-width: 120px; max-width: 50%; }
    .step-panel { width: 90%; }
    .pedagogical-info-card { width: 100%; }
    .account-type-options { flex-wrap: wrap; gap: 12px; }
    .account-type-option { max-width: 100%; min-width: 0; }
}

/* Mobile: login fullscreen */
@media (max-width: 900px) {
    .login-fullscreen-main,
    .register-fullscreen-main {
        padding: 24px 20px;
    }

    .login-fullscreen-main { flex-direction: column; align-items: stretch; }
    .login-fullscreen-form { order: 1; max-width: 100%; }
    .login-fullscreen-divider { display: none; }
    .login-fullscreen-logo { display: none; }

    .login-fullscreen-locale summary { padding: 6px 12px; font-size: 13px; gap: 4px; }
    .login-fullscreen-locale summary .language-flag { display: none; }

    .login-fullscreen-promo {
        order: 2; max-width: 100%;
        padding: 24px; margin: 24px 0 0;
        border-bottom: none;
        background: var(--background-light);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        text-align: center;
    }

    .login-fullscreen-promo h2,
    .login-fullscreen-cta { display: none; }

    .login-fullscreen-features { margin: 0; }

    .login-fullscreen-feature {
        display: none;
        flex-direction: column; align-items: center;
        text-align: center; gap: 8px; margin: 0;
    }

    .login-fullscreen-features:not(.carousel-active) .login-fullscreen-feature:first-child { display: flex; }
    .login-fullscreen-feature.active { display: flex; }
    .login-fullscreen-feature-icon { margin-bottom: 4px; }
    .login-fullscreen-feature-text h3,
    .login-fullscreen-feature-text p { text-align: center; }

    .login-fullscreen-carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }

    .login-fullscreen-carousel-dot {
        width: 8px; height: 8px;
        border-radius: 50%;
        background: var(--border-color);
        border: none; padding: 0;
        cursor: pointer;
        transition: background var(--transition-fast);
    }

    .login-fullscreen-carousel-dot.active { background: var(--primary-color); }

    .login-fullscreen .registration-content { display: flex; flex-direction: column; align-items: stretch; margin-top: 16px; }
    .login-fullscreen .registration-text { display: none; }
    .login-fullscreen .registration-link {
        width: 100%; 
        padding: 16px;
        border-radius: 24px;
        text-align: center;
        border: 2px solid var(--border-color);
        font-size: 16px; font-weight: 600;
        color: var(--primary-color);
        text-decoration: none; box-sizing: border-box;
    }
    .login-fullscreen .registration-link:hover { background: var(--primary-light); border-color: var(--primary-color); text-decoration: none; }

    .login-fullscreen .password-field-container { display: flex; flex-direction: column; }
    .login-fullscreen .forgot-password-link { position: static; order: 2; text-align: center; margin-top: 12px; }
    .login-fullscreen .forgot-password-link a { font-size: 14px; background: transparent; padding: 4px 8px; }
}

@media (max-width: 768px) {
    .step-indicator { margin-bottom: 28px; gap: 10px; }
    .step-dot { width: 8px; height: 8px; }
    .step-dot.active { width: 32px; height: 10px; }
    .register-step h3 { font-size: 20px; }

    .account-type-options { gap: 12px; margin: 24px 0; }
    .account-type-option .option-content { padding: 20px; }
    .option-content h4 { font-size: 16px; }
    .option-content p  { font-size: 13px; }

    .step-2-trust-logos { grid-template-columns: repeat(2, var(--trust-logo-width)); }
}

@media (max-width: 600px) {
    .login-fullscreen-header { padding: 12px 16px; gap: 8px; }
    .login-fullscreen-title  { font-size: 18px; }
    .login-fullscreen-subtitle { font-size: 13px; }
    .login-fullscreen-main,
    .register-fullscreen-main { padding: 20px 16px; }
    .login-fullscreen-form-title { font-size: 20px; }
    .login-fullscreen-promo { padding: 20px 16px; }
    .login-fullscreen-header-center { margin-top: 0; }
    .register-header-text-container { display: none; }

    .step-1-footer { display: none; }
    .step-panel { width: 100%; }

    .pedagogical-info-card { flex-direction: column; text-align: center; }
    .pedagogical-info-card__text h3,
    .pedagogical-info-card__text p { text-align: center; }

    .account-type-options { flex-direction: column; align-items: stretch; }
    .account-type-option { max-width: 100%; padding: 0; }
    .account-type-option .option-content { height: auto; padding: 16px; }
}

@media (max-width: 480px) {
    .login-fullscreen-back {display: none;}
    .login-fullscreen-header-nav {justify-content: flex-end;}
    .step-indicator { margin-bottom: 24px; gap: 8px; }
    .step-dot { width: 7px; height: 7px; }
}

@media (max-height: 800px) {
    .step-indicator { margin-bottom: 20px; gap: 8px; }
    .step-dot { height: 8px; width: 8px; }
    .step-dot.active { width: 28px; height: 10px; }

    .register-step h3 { font-size: 18px; margin-bottom: 4px; }
    .register-step p  { font-size: 13px; }
    .account-type-options { gap: 8px; margin: 16px 0; }
    .account-type-option .option-content { padding: 12px 14px; }
    .option-content h4 { font-size: 14px; margin-bottom: 4px; }
    .option-content p  { font-size: 12px; line-height: 1.3; }
}

@media (max-width: 768px) and (max-height: 800px) {
    .step-indicator { margin-bottom: 12px; gap: 5px; }
    .step-dot { height: 5px; width: 5px; }
    .step-dot.active { width: 18px; height: 7px; }
    .register-step h3 { font-size: 15px; }
    .register-step p  { font-size: 11px; }
    .option-content h4 { font-size: 12px; margin-bottom: 0; }
}
