/* ============================================
   ONBOARDING PAGE - CAHIER STYLE FINAL
   Utilise les variables de theme.css
   ============================================ */

/* Variables spécifiques onboarding (RGB pour animations) */
:root {
    --first-color: var(--color-primary-rgb);
    --second-color: 220, 38, 38;
    --third-color: 147, 197, 253;
    --fourth-color: 252, 165, 165;
    --fifth-color: 255, 255, 255;

    --pointer-color: 59, 130, 246;
    --size: 80%;
    --blending-value: multiply;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sniglet', sans-serif;
    font-weight: 400;
}

body {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: var(--color-bg-secondary);
    color: var(--color-primary-dark);
}

/* ============================================
   BACKGROUND ANIMATION + SEYÈS GRID
   ============================================ */

.bg-container {
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: white;
    z-index: 0;
}

/* Le quadrillage Seyès en pleine page (UNE SEULE FEUILLE RÉALISTE) */
/* Le quadrillage Seyès en pleine page (EXACT MATCH LANDING) */
.bg-container::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    /* TODO (Plan 4A): This gradient duplicates the Seyes pattern. Replace with .seyes-background class in HTML
       and remove this background-image block once the shared class from app.css is applied. */
    /* Carreaux de 32px - IDENTIQUE LANDING */
    background-image:
        /* Lignes horizontales principales (tous les 32px) */
        repeating-linear-gradient(to bottom,
            transparent,
            transparent 31px,
            #b8d4e8 31px,
            #b8d4e8 32px),
        /* Lignes horizontales secondaires fines (tous les 8px) */
        repeating-linear-gradient(to bottom,
            transparent,
            transparent 7px,
            #d8e8f4 7px,
            #d8e8f4 8px),
        /* Lignes verticales (tous les 32px) */
        repeating-linear-gradient(to right,
            transparent,
            transparent 31px,
            #c8dce8 31px,
            #c8dce8 32px);

    background-size: 100% 100%;
    /* S'adapte au conteneur */
    /* Pour garder la proportion exacte, on pourrait forcer un background-size fixe si besoin, mais 100% 100% sur un div absolute fill donne le même résultat que sur landing */
    /* Cependant sur landing c'est 100% 100% de la page (document height). Ici c'est 100vh fixés. */
    /* Pour éviter la distorsion si width != height, on préfère souvent laisser le gradient se répeter naturellement ou utiliser background-size: 32px 32px pour grid */
    /* MAIS le code de landing utilise background-size: 100% 100% sur gradients. */

    background-attachment: fixed;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* Les Blobs colorés (derrière le quadrillage) */
.gradients-container {
    display: none !important;
    /* Tâches supprimées */
    filter: url(#blurMe) blur(40px);
    width: 100%;
    height: 100%;
    opacity: 0.5;
    position: relative;
    z-index: 1;
}

.gradient-blob {
    position: absolute;
    width: var(--size);
    height: var(--size);
    top: calc(50% - var(--size) / 2);
    left: calc(50% - var(--size) / 2);
    mix-blend-mode: var(--blending-value);
}

/* Animations lentes */
.animate-first {
    background: radial-gradient(circle at center, rgba(var(--first-color), 0.8) 0, rgba(var(--first-color), 0) 50%) no-repeat;
    transform-origin: center center;
    animation: moveVertical 60s ease infinite;
}

.animate-second {
    background: radial-gradient(circle at center, rgba(var(--second-color), 0.6) 0, rgba(var(--second-color), 0) 50%) no-repeat;
    transform-origin: calc(50% - 400px);
    animation: moveInCircle 50s reverse infinite;
}

.animate-third {
    background: radial-gradient(circle at center, rgba(var(--third-color), 0.8) 0, rgba(var(--third-color), 0) 50%) no-repeat;
    transform-origin: calc(50% + 400px);
    animation: moveInCircle 80s linear infinite;
}

.animate-fourth {
    background: radial-gradient(circle at center, rgba(var(--fourth-color), 0.7) 0, rgba(var(--fourth-color), 0) 50%) no-repeat;
    transform-origin: calc(50% - 200px);
    animation: moveHorizontal 70s ease infinite;
}

.animate-fifth {
    background: radial-gradient(circle at center, rgba(var(--fifth-color), 1) 0, rgba(var(--fifth-color), 0) 50%) no-repeat;
    transform-origin: calc(50% - 800px) calc(50% + 200px);
    animation: moveInCircle 40s ease infinite;
}

.interactive {
    background: radial-gradient(circle at center, rgba(var(--pointer-color), 0.8) 0, rgba(var(--pointer-color), 0) 50%) no-repeat;
    width: 100%;
    height: 100%;
    top: -50%;
    left: -50%;
    opacity: 0.7;
}

@keyframes moveVertical {
    0% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(50%);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes moveInCircle {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes moveHorizontal {
    0% {
        transform: translateX(-50%) translateY(-10%);
    }

    50% {
        transform: translateX(50%) translateY(10%);
    }

    100% {
        transform: translateX(-50%) translateY(-10%);
    }
}

/* ============================================
   CONTENT LAYOUT
   ============================================ */

.onboarding-wrapper {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Aligné en haut pour stabilité */
    padding: 20px;
    padding-top: 5px;
    /* Espace minimal depuis le haut */

    /* Animation gérée par JS (slide-enter-from-right ou slide-enter-from-left) */
}

/* STYLE PTIT COCHON RECTANGULAIRE */
.back-link {
    position: absolute;
    top: 20px;
    left: 40px;
    color: #2563EB;
    text-decoration: none;
    font-family: 'Sniglet', sans-serif;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    background: white;
    padding: 10px 22px;
    border-radius: 16px;
    border: 2px solid #2563EB;
    box-shadow: none;
}

.back-link:hover {
    background: #2563EB;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.back-link:active {
    transform: translateY(0);
    box-shadow: none;
}

.onboarding-header {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 10;
}

/* Titre principal "Mon profil" */
.onboarding-main-title {
    font-family: 'Sniglet', sans-serif;
    font-size: 3rem;
    font-weight: 400;
    color: #1e3a8a;
    text-decoration: underline;
    text-decoration-color: #93c5fd;
    text-underline-offset: 8px;
    text-decoration-thickness: 3px;
    letter-spacing: 1px;
    margin: 0;
    margin-bottom: 10px;
    margin-top: 10px;
}

/* LOGO STYLING - Ajusté et redressé */
.onboarding-logo {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.15));
    margin-bottom: -25px;
    /* Remonte la carte de ~1cm visuellement en chevauchant ou collant */
    margin-top: 0;
    transform: none;
    transition: transform 0.3s ease;
}

.onboarding-logo:hover {
    transform: scale(1.05);
}

/* TITRE AMÉLIORÉ */
.onboarding-title {
    font-size: 4.5rem;
    color: #1e3a8a;
    margin: 0;
    line-height: 1.1;
    text-shadow:
        3px 3px 0 white,
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transform: rotate(-2deg);
    /* Légère rotation ludique */
}

.onboarding-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 300;
}

/* ============================================
   CARD DESIGN (Plus compacte)
   ============================================ */

.onboarding-card {
    background: white;
    border: 3px solid #1e3a8a;
    border-radius: 28px;
    padding: 30px;
    width: 100%;
    max-width: 800px;
    min-height: 500px;
    box-shadow: 0 8px 30px rgba(30, 58, 138, 0.12);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-title {
    font-family: 'Sniglet', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    color: #2563EB;
    text-align: center;
    margin-bottom: 25px;
}

/* ============================================
   USER TYPE CARDS
   ============================================ */

.user-type-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.type-card {
    background: white;
    border: 3px solid #1e3a8a;
    border-radius: 28px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.1);
}

.type-card:hover {
    border-color: #3b82f6;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.type-card.selected {
    background: #EFF6FF;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px #2563EB inset, 0 8px 30px rgba(37, 99, 235, 0.15);
}

.type-icon {
    font-size: 3.5rem;
}

.type-label {
    color: #2563EB;
    font-weight: 400;
    font-size: 1.8rem;
    font-family: 'Sniglet', sans-serif;
}

/* ============================================
   FORMS
   ============================================ */

.form-step {
    display: none;
    animation: slideIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.form-label {
    display: block;
    color: #1e3a8a;
    margin-bottom: 8px;
    font-size: 1.8rem;
    font-weight: 400;
    font-family: 'Sniglet', sans-serif;
    padding-left: 5px;
}

.form-input,
.form-select {
    width: 100%;
    background: #fff;
    border: 2px solid #93c5fd;
    border-radius: 8px;
    padding: 12px 18px;
    color: #1e3a8a;
    font-size: 1.6rem;
    font-weight: 400;
    font-family: 'Sniglet', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 3px 3px 0 rgba(147, 197, 253, 0.2);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 3px 3px 0 rgba(96, 165, 250, 0.3);
    transform: translate(-1px, -1px);
}

.form-select option {
    background: #111;
}

.form-select option[disabled] {
    color: #93c5fd;
}

.form-input::placeholder {
    color: #93c5fd;
}

/* Select showing placeholder (disabled selected) */
.form-select:invalid,
.form-select:has(option[disabled]:checked) {
    color: #93c5fd;
}

/* ============================================
   COUNTRY "AUTRE" MODAL
   ============================================ */
.autre-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 58, 138, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.autre-modal-card {
    background: white;
    border: 3px solid #1e3a8a;
    border-radius: 24px;
    padding: 35px 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(30, 58, 138, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.autre-modal-title {
    font-family: 'Sniglet', sans-serif;
    font-size: 2rem;
    color: #1e3a8a;
    text-align: center;
    margin-bottom: 20px;
}

.autre-modal-input {
    width: 100%;
    margin-bottom: 15px;
}

.autre-modal-info {
    font-family: 'Sniglet', sans-serif;
    font-size: 1.3rem;
    color: #60a5fa;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(147, 197, 253, 0.15);
    border-radius: 12px;
}

.autre-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.autre-modal-btn {
    padding: 12px 30px;
    border-radius: 12px;
    font-family: 'Sniglet', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.autre-modal-btn.cancel {
    background: white;
    border: 2px solid #93c5fd;
    color: #60a5fa;
}

.autre-modal-btn.cancel:hover {
    background: #f0f7ff;
    border-color: #60a5fa;
}

.autre-modal-btn.confirm {
    background: #1e3a8a;
    border: none;
    color: white;
    box-shadow: 4px 4px 0 rgba(30, 58, 138, 0.3);
}

.autre-modal-btn.confirm:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(30, 58, 138, 0.3);
}

/* ============================================
   AVATAR SELECTOR (Curio)
   ============================================ */
.avatar-selector-onboarding {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-items: center;
}

.avatar-btn-onboarding {
    width: 110px;
    height: 110px;
    border: 3px solid #E5E7EB;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.avatar-btn-onboarding img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-btn-onboarding:hover {
    border-color: #8B5CF6;
    transform: scale(1.1);
}

.avatar-btn-onboarding.selected {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.3);
}

/* ============================================
   BUTTONS (Style PTIT COCHON)
   ============================================ */

.btn-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.btn-next,
.btn-submit {
    background: #2563EB;
    /* Bleu Roi */
    color: white;
    border: 2px solid #1E40AF;
    border-radius: 16px;
    /* Quasi rectangulaire */
    padding: 12px 40px;
    font-family: 'Sniglet', sans-serif;
    /* POLICE PTIT COCHON */
    font-size: 1.8rem;
    /* Un peu plus grand pour cette police */
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: none;
    /* Ombre solide foncée marquee */
    transform: translate(0, 0);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-next:hover,
.btn-submit:hover {
    background: #1D4ED8;
    transform: translateY(-2px);
    /* Effet d'enfoncement */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-next:disabled,
.btn-submit:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    border-color: #9CA3AF;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    background: white;
    border: 2px solid #1e3a8a;
    color: #1e3a8a;
    border-radius: 16px;
    padding: 12px 35px;
    font-family: 'Sniglet', sans-serif;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    text-transform: uppercase;
}

.btn-back:hover {
    background: #F3F4F6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
}

.btn-back:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ============================================
   DECORATIVE
   ============================================ */

.step-indicator {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(30, 58, 138, 0.2);
    transition: all 0.3s ease;
}

.dot.active {
    background: #2563EB;
    width: 35px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .onboarding-wrapper {
        padding: 15px;
        padding-top: 10px;
        min-height: 100vh;
        justify-content: flex-start;
    }

    .back-link {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 10px;
        padding: 8px 16px;
        font-size: 1.1rem;
        align-self: flex-start;
    }

    .onboarding-header {
        margin-bottom: 10px;
    }

    .onboarding-main-title {
        font-size: 2.2rem;
        margin-bottom: 8px;
        margin-top: 8px;
    }

    .onboarding-logo {
        max-width: 150px;
        margin-bottom: -15px;
    }

    .onboarding-title {
        font-size: 2.2rem;
        transform: none;
    }

    .onboarding-card {
        max-width: 100%;
        padding: 20px 15px;
        min-height: auto;
        border-radius: 20px;
    }

    .step-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .user-type-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .type-card {
        padding: 15px 10px;
        border-radius: 16px;
        gap: 8px;
    }

    .type-icon {
        font-size: 2.2rem;
    }

    .type-label {
        font-size: 1.2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-label {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .form-input,
    .form-select {
        padding: 10px 14px;
        font-size: 1.2rem;
    }

    .avatar-selector-onboarding {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .avatar-btn-onboarding {
        width: 65px;
        height: 65px;
    }

    .btn-container {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .btn-next,
    .btn-submit {
        width: 100%;
        padding: 12px 25px;
        font-size: 1.3rem;
        justify-content: center;
    }

    .btn-back {
        width: 100%;
        padding: 10px 20px;
        font-size: 1.2rem;
    }

    .step-indicator {
        bottom: -35px;
        gap: 10px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .dot.active {
        width: 25px;
    }

    .cgu-container {
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .cgu-label {
        font-size: 1rem;
    }

    .cgu-custom-checkbox {
        width: 20px;
        height: 20px;
    }

    .cgu-text {
        font-size: 0.9rem;
    }

    /* Modal mobile */
    .autre-modal-card {
        padding: 25px 20px;
        max-width: 90%;
    }

    .autre-modal-title {
        font-size: 1.5rem;
    }

    .autre-modal-info {
        font-size: 1.1rem;
        padding: 12px;
    }

    .autre-modal-btn {
        padding: 10px 20px;
        font-size: 1.2rem;
    }
}

/* ============================================
   CHECKBOX CGU STYLE
   ============================================ */
.cgu-container {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    width: 100%;
}

.cgu-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #4b5563;
    font-family: 'Sniglet', sans-serif;
    user-select: none;
    text-align: center;
}

/* Hide default checkbox */
.cgu-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox */
.cgu-custom-checkbox {
    height: 24px;
    width: 24px;
    background-color: #fff;
    border: 2px solid #1e3a8a;
    border-radius: 16px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0 rgba(30, 58, 138, 0.1);
}

.cgu-label:hover .cgu-custom-checkbox {
    border-color: #2563EB;
    box-shadow: 3px 3px 0 rgba(37, 99, 235, 0.2);
}

/* Checked State */
.cgu-input:checked~.cgu-custom-checkbox {
    background-color: #2563EB;
    border-color: #1e3a8a;
}

/* Checkmark */
.cgu-custom-checkbox::after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.cgu-input:checked~.cgu-custom-checkbox::after {
    display: block;
}

.cgu-text {
    font-family: 'Sniglet', sans-serif;
    font-size: 1.05rem;
    line-height: 1.4;
    color: #93c5fd;
    font-weight: 400;
}

.cgu-link {
    color: #2563EB;
    text-decoration: underline;
    font-weight: 400;
}

.cgu-link:hover {
    color: #1e40af;
}

/* ==================================
   TRANSITION CLASSES (SHARED LOGIC)
   ================================== */
/* Note: Onboarding uses same keyframes logic but needs its own classes if we want to separate files */

/* Vers la droite (Retour Landing) */
/* Transitions removed */
/* ============================================
   RESPONSIVE - TABLET (1024px)
   ============================================ */

@media (max-width: 1024px) {
    .main-container {
        max-width: 100%;
        padding: 20px;
    }

    .notebook-card {
        max-width: 600px;
        padding: 30px;
    }

    .step-content {
        padding: 20px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (768px)
   ============================================ */

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }

    .bg-container {
        position: fixed;
    }

    .main-container {
        padding: 15px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .notebook-card {
        max-width: 100%;
        padding: 25px 20px;
        margin: 10px;
        border-radius: 20px;
    }

    /* Logo mobile */
    .logo-section {
        margin-bottom: 20px;
    }

    .logo-section img {
        height: 50px;
    }

    /* Title mobile */
    .title-section h1 {
        font-size: 1.6rem;
    }

    .title-section p {
        font-size: 1rem;
    }

    /* Form mobile */
    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select {
        padding: 12px 15px;
        font-size: 1rem;
    }

    /* Buttons mobile */
    .btn-primary,
    .btn-secondary,
    .btn-google {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
    }

    .btn-google {
        justify-content: center;
    }

    .btn-google img {
        width: 20px;
        height: 20px;
    }

    /* Steps indicator mobile */
    .steps-indicator {
        gap: 8px;
        margin-bottom: 20px;
    }

    .step-dot {
        width: 10px;
        height: 10px;
    }

    /* Avatar selection mobile */
    .avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .avatar-option {
        width: 70px;
        height: 70px;
    }

    /* Level selection mobile */
    .level-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .level-option {
        padding: 12px;
        font-size: 0.95rem;
    }

    /* Divider mobile */
    .divider {
        margin: 20px 0;
    }

    .divider span {
        font-size: 0.85rem;
        padding: 0 10px;
    }

    /* Links mobile */
    .auth-link {
        font-size: 0.9rem;
    }

    /* Error/Success messages */
    .error-message,
    .success-message {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (480px)
   ============================================ */

@media (max-width: 480px) {
    .onboarding-wrapper {
        padding: 10px;
        padding-top: 8px;
    }

    .back-link {
        padding: 6px 12px;
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .onboarding-logo {
        max-width: 120px;
        margin-bottom: -10px;
    }

    .onboarding-title {
        font-size: 1.8rem;
    }

    .onboarding-card {
        padding: 15px 12px;
        border-radius: 16px;
    }

    .step-title {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .user-type-container {
        gap: 10px;
        margin-bottom: 15px;
    }

    .type-card {
        padding: 12px 8px;
        border-radius: 14px;
        gap: 6px;
    }

    .type-icon {
        font-size: 1.8rem;
    }

    .type-label {
        font-size: 1rem;
    }

    .form-label {
        font-size: 1.1rem;
    }

    .form-input,
    .form-select {
        padding: 10px 12px;
        font-size: 1rem;
    }

    .avatar-selector-onboarding {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .avatar-btn-onboarding {
        width: 55px;
        height: 55px;
    }

    .btn-container {
        margin-top: 15px;
        gap: 8px;
    }

    .btn-next,
    .btn-submit {
        padding: 10px 20px;
        font-size: 1.1rem;
    }

    .btn-back {
        padding: 8px 16px;
        font-size: 1rem;
    }

    .step-indicator {
        bottom: -30px;
    }

    .cgu-label {
        font-size: 0.9rem;
    }

    .cgu-text {
        font-size: 0.85rem;
    }

    .autre-modal-card {
        padding: 20px 15px;
    }

    .autre-modal-title {
        font-size: 1.3rem;
    }

    .autre-modal-btn {
        padding: 8px 16px;
        font-size: 1rem;
    }

    /* Additional mobile overrides */
    .onboarding-header h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
        margin-top: 10px;
    }

    .onboarding-card {
        padding: 20px 15px;
        min-height: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   RESPONSIVE - SMALL MOBILE (480px) - Final overrides
   ============================================================================= */
@media (max-width: 480px) {
    .onboarding-main-title {
        font-size: 1.8rem;
        margin-bottom: 6px;
        margin-top: 5px;
        text-underline-offset: 5px;
        text-decoration-thickness: 2px;
    }

    .onboarding-header {
        margin-bottom: 8px;
    }

    .onboarding-card {
        padding: 15px 12px;
    }

    /* Réduire taille des labels de formulaire */
    .form-label {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }

    /* Boutons de grade plus compacts */
    .grade-btn, .program-btn {
        padding: 10px 16px;
        font-size: 1rem;
    }
}
