/* ============================================================
       MISS UNASMOH — THÈME OR & NOIR
       ============================================================ */
    #register-fb {
        --void:        #fbfaf7;
        --panel:       #ffffff;
        --panel-2:     #ffffff;
        --line:        rgba(180,140,30,0.22);
        --line-strong: rgba(180,140,30,0.45);
        --gold:        #b8901f;
        --gold-light:  #c9a227;
        --gold-soft:   #9c7a1d;
        --cream:       #1c1a14;
        --muted:       #756c58;
        --danger:      #c23b2c;
        --success:     #2f8f5e;
        --radius-lg:   22px;
        --radius-md:   14px;
        --radius-sm:   10px;
        --serif: 'Playfair Display', Georgia, serif;
        --sans:  'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

    /* ── SHELL ── */
    .register-shell {
        width: 100%;
        margin: 0 auto;
        background:
            radial-gradient(1100px 480px at 15% -10%, rgba(201,162,39,0.08), transparent 60%),
            radial-gradient(900px 500px at 100% 0%, rgba(201,162,39,0.06), transparent 55%),
            var(--void);
        color: var(--cream);
        font-family: var(--sans);
        box-sizing: border-box;
        padding: 56px 24px 72px;
        /* ✅ garde-fou local : si le breakout mobile (100vw) est calculé en
           incluant la largeur de la scrollbar verticale, on évite tout
           scroll horizontal parasite, même si la page n'a pas le reset
           global html{overflow-x:hidden}. */
        overflow-x: hidden;
    }
    .register-shell * { box-sizing: border-box; }
    .register-shell ::selection { background-color: var(--gold-light); color: #ffffff; }

    .register-shell input:-webkit-autofill,
    .register-shell input:-webkit-autofill:hover,
    .register-shell input:-webkit-autofill:focus,
    .register-shell input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
        -webkit-text-fill-color: var(--cream) !important;
        caret-color: var(--cream);
        transition: background-color 5000s ease-in-out 0s;
    }

    .shell-inner { max-width: 1140px; margin: 0 auto; }

    /* ── HEADER ── */
    .header-section { text-align: center; margin-bottom: 30px; }
    .icon-wrapper {
        display: inline-flex; align-items: center; justify-content: center;
        width: 48px; height: 48px; border-radius: 50%;
        background: linear-gradient(155deg, #fdf8ec, #f6ecd1);
        border: 1px solid var(--line-strong);
        margin-bottom: 12px;
        box-shadow: 0 8px 24px rgba(184,144,31,0.14);
    }
    .icon-wrapper i { color: var(--gold-soft); font-size: 20px; }
    .header-eyebrow {
        font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
        text-transform: uppercase; color: var(--gold-soft); margin: 0 0 10px 0;
    }
    .header-section h1 {
        font-family: var(--serif); font-style: italic; font-weight: 700;
        font-size: clamp(30px, 4.5vw, 42px); letter-spacing: -0.01em;
        margin: 0; color: var(--cream);
    }
    .header-section h1 span { color: var(--gold-light); }
    .header-section p {
        font-size: 13.5px; color: var(--muted); font-weight: 500;
        margin-top: 10px; letter-spacing: 0.01em;
    }

    /* ── LAYOUT ──
       Par défaut, .register-grid garde ses 2 colonnes en réserve, mais
       .step-rules / .step-form (voir plus bas) n'en affichent qu'une à la
       fois : l'utilisateur lit/accepte les règles d'abord, puis passe au
       panneau d'inscription via #btn-go-to-register. */
    .register-grid {
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        gap: 28px;
        align-items: start;
        width: 100%;
        transition: max-width 0.25s ease;
    }

    /* ── ÉTAPES : une seule colonne visible à la fois ── */
    .register-grid.step-rules .form-column  { display: none; }
    .register-grid.step-form  .rules-column { display: none; }

    /* Desktop uniquement : quand une seule colonne est affichée, on la
       centre avec une largeur "normale" (ni trop étroite, ni pleine
       largeur du grid à 1140px) pour que la carte de règle reste lisible
       et proportionnée. En mobile, .register-shell gère déjà le
       plein-écran bord-à-bord plus bas, donc on ne touche pas la largeur
       ici. */
    @media (min-width: 861px) {
        .register-grid.step-rules {
            grid-template-columns: 1fr;
            max-width: 640px;
            margin: 0 auto;
        }
        .register-grid.step-form {
            grid-template-columns: 1fr;
            max-width: 480px;
            margin: 0 auto;
        }
    }

    /* ── PANELS (shared) ── */
    .rules-column, .form-column {
        background: var(--panel);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        padding: 30px 32px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(28,26,20,0.04), 0 16px 40px rgba(28,26,20,0.05);
    }
    .rules-column::before, .form-column::before {
        content: "";
        position: absolute; top: 0; left: 0; right: 0; height: 1px;
        background: linear-gradient(90deg, transparent, var(--gold), transparent);
        opacity: 0.55;
    }

    .panel-title {
        font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--gold-light);
        text-transform: uppercase; letter-spacing: 0.14em;
        display: flex; align-items: center; gap: 10px;
        margin: 0 0 18px 0;
    }
    .panel-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

    /* ============================================================
       RÈGLES — CARROUSEL DE CARTES
       ============================================================ */
    .rules-carousel {
        position: relative;
        border-radius: var(--radius-md);
        overflow: hidden;
    }

    .rules-track {
        display: flex;
        will-change: transform;
        transition: transform 0.45s cubic-bezier(0.65, 0.05, 0.36, 1);
        cursor: grab;
        user-select: none;
    }
    .rules-track.dragging { transition: none; cursor: grabbing; }

    .rule-card {
        flex: 0 0 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 30px 28px;
        min-height: 232px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        background: linear-gradient(160deg, #fffefb 0%, #fbf7ec 100%);
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
    }
    .rule-card.danger-card {
        background: linear-gradient(160deg, #fff6f4 0%, #fdeae7 100%);
        border-color: rgba(194,59,44,0.30);
    }

    .rule-card-top { display: flex; align-items: center; justify-content: space-between; }

    .rule-card-icon {
        width: 50px; height: 50px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        background: linear-gradient(155deg, var(--gold-light), var(--gold-soft));
        color: #ffffff; font-size: 18px; flex-shrink: 0;
        box-shadow: 0 8px 20px rgba(184,144,31,0.25);
    }
    .rule-card.danger-card .rule-card-icon {
        background: linear-gradient(155deg, #e0685a, var(--danger));
        box-shadow: 0 8px 20px rgba(194,59,44,0.25);
    }

    .rule-card-tag {
        font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
        color: var(--gold-soft); background: rgba(201,162,39,0.10);
        padding: 5px 11px; border-radius: 20px;
    }
    .rule-card.danger-card .rule-card-tag { color: var(--danger); background: rgba(194,59,44,0.10); }

    .rule-card-title {
        font-family: var(--serif); font-style: italic; font-weight: 700;
        font-size: 19px; color: var(--cream); margin: 0;
    }
    .rule-card.danger-card .rule-card-title { color: var(--danger); }

    .rule-card-text { font-size: 13.5px; line-height: 1.7; color: var(--muted); margin: 0; }
    .rule-card-text strong { color: var(--gold-light); font-weight: 700; }
    .rule-card-text strong.danger { color: var(--danger); }

    /* Barre de progression */
    .rules-progressbar {
        height: 4px; background: var(--line); border-radius: 4px;
        overflow: hidden; margin-top: 18px;
    }
    .rules-progressbar-fill {
        height: 100%; width: 16.66%;
        background: linear-gradient(90deg, var(--gold-light), var(--gold-soft));
        transition: width 0.4s ease;
    }
    .rules-progressbar-fill.danger-fill { background: linear-gradient(90deg, #e0685a, var(--danger)); }

    /* Navigation */
    .rules-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
    .rules-nav-btn {
        display: inline-flex; align-items: center; gap: 8px;
        background: #ffffff; border: 1.5px solid var(--line); color: var(--cream);
        font-weight: 700; font-size: 12px; padding: 10px 16px;
        border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s ease;
        white-space: nowrap;
    }
    .rules-nav-btn:hover:not(:disabled) { border-color: var(--line-strong); background: #fbf7ec; }
    .rules-nav-btn:disabled { opacity: 0.32; cursor: not-allowed; }
    .rules-nav-btn.primary {
        background: linear-gradient(150deg, var(--gold-light), var(--gold-soft));
        color: #ffffff; border-color: transparent;
        box-shadow: 0 6px 16px rgba(201,162,39,0.22);
    }
    .rules-nav-btn.primary:hover:not(:disabled) { filter: brightness(1.06); background: linear-gradient(150deg, var(--gold-light), var(--gold-soft)); }

    .rules-counter { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }

    /* Points de pagination */
    .rules-dots { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 16px; }
    .rules-dot {
        width: 7px; height: 7px; border-radius: 50%;
        background: var(--line-strong); cursor: pointer; border: none; padding: 0;
        transition: all 0.25s ease;
    }
    .rules-dot.active { width: 22px; border-radius: 5px; background: linear-gradient(90deg, var(--gold-light), var(--gold-soft)); }
    .rules-dot.danger-dot.active { background: linear-gradient(90deg, #e0685a, var(--danger)); }
    .rules-dot.seen { background: var(--gold-light); opacity: 0.55; }

    /* Case à cocher (verrouillée tant que les cartes ne sont pas toutes lues) */
    .terms-wrapper {
        display: flex; align-items: start;
        background: #fbf7ec;
        padding: 18px; border-radius: var(--radius-md);
        border: 1px solid var(--line);
        transition: all 0.2s ease;
        margin-top: 16px;
    }
    .terms-wrapper:hover { border-color: var(--line-strong); background: #f8f0da; }
    .terms-wrapper.field-invalid { border-color: var(--danger); background: rgba(194,59,44,0.06); }
    .terms-wrapper.terms-locked { opacity: 0.5; }
    .terms-wrapper.terms-locked .terms-checkbox,
    .terms-wrapper.terms-locked .terms-label { cursor: not-allowed; }

    .terms-checkbox {
        margin-top: 3px; width: 18px; height: 18px; cursor: pointer; flex-shrink: 0;
        accent-color: var(--gold);
    }
    .terms-label {
        margin-left: 12px; font-size: 12.5px; color: #4a4436;
        font-weight: 500; line-height: 1.55; user-select: none; cursor: pointer;
    }

    .terms-hint {
        display: flex; align-items: center; gap: 8px;
        font-size: 11.5px; color: var(--gold-soft); font-weight: 600;
        text-align: center; justify-content: center; margin-top: 8px;
    }
    .terms-hint.unlocked { color: var(--success); }

    /* ✅ Bouton "Continuer vers l'inscription" : même style que le CTA
       principal, désactivé tant que la case n'est pas cochée. */
    .continue-btn { margin-top: 14px; }

    /* ✅ Bouton "Retour aux règles" dans le panneau d'inscription : discret,
       aligné à gauche, réutilise le style des boutons de navigation des
       règles pour rester cohérent visuellement. */
    .back-to-rules-btn {
        margin-bottom: 16px;
        padding: 8px 14px;
        font-size: 11.5px;
    }

    .link-text { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0 0; }
    .link-text a { color: var(--gold-light); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--line-strong); padding-bottom: 2px; }
    .link-text a:hover { border-color: var(--gold-light); }
    .link-text.small-link { margin-top: 10px; font-size: 12px; line-height: 1.5; }

    /* ── STEPPER ── */
    .mini-stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
    .mini-step { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 600; color: var(--muted); }
    .mini-step .dot {
        width: 26px; height: 26px; border-radius: 50%;
        background: transparent; border: 1.5px solid var(--line-strong);
        display: flex; align-items: center; justify-content: center;
        font-family: var(--serif); font-size: 12px; font-weight: 700; color: var(--muted);
        transition: all 0.25s ease;
    }
    .mini-step.active { color: var(--gold-soft); }
    .mini-step.active .dot { background: linear-gradient(155deg, var(--gold-light), var(--gold-soft)); color: #ffffff; border-color: transparent; }
    .mini-step-sep { flex-grow: 1; height: 1px; background: var(--line); }

    .step-panel { display: flex; flex-direction: column; gap: 12px; }
    .hidden { display: none !important; }

    /* ── CHAMPS ── */
    .form-group { display: flex; flex-direction: column; }
    .form-group label {
        font-size: 11px; font-weight: 700; color: var(--gold-light);
        text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
    }
    .form-control {
        width: 100%; background: #fbfaf6; color: var(--cream);
        padding: 11px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
        font-size: 14px; transition: all 0.2s ease;
    }
    .form-control::placeholder { color: #a49c88; }
    .form-control:hover { border-color: var(--line-strong); }
    .form-control:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,162,39,0.15); }
    .form-control.field-invalid { border-color: var(--danger); }
    .form-control.field-invalid:focus { box-shadow: 0 0 0 3px rgba(224,104,90,0.15); }

    .field-error-msg { font-size: 11.5px; color: var(--danger); margin: 4px 0 0 0; font-weight: 500; }
    .input-subtext { font-size: 11px; color: var(--muted); margin: 4px 0 0 0; line-height: 1.35; }

    .password-container { position: relative; }
    .password-toggle-btn {
        position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
        background: none; border: none; color: var(--muted); cursor: pointer;
        padding: 4px; display: flex; align-items: center;
    }
    .password-toggle-btn:hover { color: var(--gold-light); }

    /* ── BOUTON PRINCIPAL ── */
    .btn-prime {
        width: 100%; color: #ffffff;
        background: linear-gradient(150deg, var(--gold-light), var(--gold-soft));
        padding: 13px; border: none; border-radius: var(--radius-sm); font-weight: 700;
        font-size: 12.5px; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 6px 18px rgba(201,162,39,0.22);
        margin-top: 2px;
    }
    .btn-prime:hover { filter: brightness(1.06); transform: translateY(-1px); }
    .btn-prime:active { transform: translateY(0); }
    .btn-prime:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

    /* ── ÉTAPE OTP ── */
    .center-wrapper { text-align: center; }
    .status-badge {
        display: inline-flex; align-items: center; justify-content: center;
        width: 54px; height: 54px; border-radius: 50%;
        background: rgba(76,175,125,0.1); border: 1.5px solid rgba(76,175,125,0.4); margin-bottom: 16px;
    }
    .status-badge i { color: var(--success); font-size: 20px; }
    .center-wrapper h2 { font-family: var(--serif); font-style: italic; font-size: 19px; font-weight: 700; color: var(--cream); margin: 0; }
    .center-wrapper p { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.55; }

    .otp-fields-group { display: flex; justify-content: center; gap: 14px; margin: 26px 0; }
    .otp-input {
        width: 52px; height: 60px; text-align: center; font-size: 24px; font-weight: 700;
        background: #fbfaf6; color: var(--gold-soft); border: 1.5px solid var(--line);
        border-radius: var(--radius-sm); transition: all 0.2s ease; font-family: var(--serif);
    }
    .otp-input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,162,39,0.15); background: #ffffff; }
    .otp-input.field-invalid { border-color: var(--danger); }

    .timer-text { text-align: center; font-size: 13px; color: var(--muted); margin: 12px 0; }
    .timer-count { font-weight: 700; color: var(--gold-light); }
    .btn-resend {
        background: none; border: none; font-weight: 700; color: var(--gold-light);
        font-size: 11px; text-decoration: underline; cursor: pointer; padding: 2px 6px;
    }
    .btn-resend:hover { color: var(--cream); }

    .help-box {
        background: #fbf7ec; border: 1px solid var(--line); border-radius: var(--radius-md);
        padding: 16px; font-size: 12px; color: var(--muted); line-height: 1.6; text-align: left;
    }
    .help-box p { font-weight: 700; color: var(--gold-soft); margin: 0 0 6px 0; }
    .help-box ul { margin: 0; padding-left: 18px; }

    .btn-success-otp {
        background: linear-gradient(150deg, #6fd19e, var(--success));
        box-shadow: 0 6px 18px rgba(76,175,125,0.22);
    }

    /* ── SSO ── */
    .sso-divider-section { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
    .separator-line { display: flex; align-items: center; margin-bottom: 12px; }
    .line-strut { flex-grow: 1; border-top: 1px solid var(--line); }
    .separator-text {
        margin: 0 12px; color: var(--muted); font-size: 10px;
        text-transform: uppercase; font-weight: 700; letter-spacing: 0.12em;
    }
    .sso-buttons-container { display: flex; gap: 12px; margin-bottom: 10px; align-items: center; justify-content: center; }
    .sso-btn {
        flex: 1; display: inline-flex; align-items: center; justify-content: center;
        gap: 10px; background: #ffffff; border: 1.5px solid var(--line); color: var(--cream);
        padding: 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 12px;
        cursor: pointer; transition: all 0.2s ease;
    }
    .sso-btn:hover { background: #fbf7ec; border-color: var(--line-strong); }
    .sso-btn i.fa-google { color: #b8901f; font-size: 15px; }
    .sso-btn i.fa-facebook { color: #3d6bc4; font-size: 15px; }

    .footer-legal-text { text-align: center; font-size: 11.5px; color: #a49c88; margin: 8px 0 0 0; line-height: 1.45; }

    /* ── DEBUG PANEL ── */
    .debug-panel {
        max-width: 100%; margin: 24px auto 0 auto; padding: 16px;
        background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md);
    }
    .debug-panel pre {
        font-size: 11.5px; color: #4a4436; background: #fbfaf6; padding: 12px;
        border-radius: 8px; border: 1px solid var(--line); overflow-x: auto;
        font-family: monospace; margin: 0;
    }

    /* ── RESPONSIVE ──
       Desktop : conteneur centré avec marges confortables.
       Mobile  : édge-à-édge, sans marge latérale, panneaux carrés.
       Dans les deux cas, .step-rules / .step-form (plus haut) fait qu'un
       seul panneau est visible à la fois — la logique mobile ci-dessous
       n'a donc plus besoin de gérer l'ordre d'affichage des deux colonnes,
       elle garde seulement la mise en page "carte pleine largeur". */
    @media (max-width: 1024px) {
        .register-shell { padding: 44px 18px 60px; }
        .register-grid { gap: 20px; }
        .rules-column, .form-column { padding: 26px; }
    }

    @media (max-width: 860px) {
        /* ✅ BREAKOUT MOBILE — même logique que .full-mobile-width et
           #candidates-container utilisée ailleurs sur le site. Un simple
           "padding: 0" sur .register-shell ne suffit pas si la page
           l'imbrique dans un conteneur parent avec son propre padding
           (ex: main.php max-w-7xl mx-auto px-4). Sans le calc(50% - 50vw),
           le formulaire reste inset de ~16-32px de chaque côté au lieu de
           toucher les bords de l'écran comme une carte PWA mobile.
           Fonctionne tant que les ancêtres restent centrés symétriquement
           (mx-auto + padding égal des deux côtés), comme pour les autres
           breakouts du site. */
        .register-shell {
            width: 100vw !important;
            max-width: 100vw !important;
            margin-left: calc(50% - 50vw) !important;
            margin-right: calc(50% - 50vw) !important;
            padding: 0 0 40px !important;
            box-sizing: border-box;
        }
        .shell-inner { max-width: 100%; }
        .header-section { padding: 36px 20px 0; margin-bottom: 30px; }
        .register-grid { grid-template-columns: 1fr; gap: 0; }
        /* Colonnes traitées comme des cartes PWA pleine largeur : bord à
           bord, pas de coins arrondis ni de bordures latérales — même
           traitement que .candidate-card en mode mobile. */
        .form-column { order: 1; border-radius: 0; border-left: none; border-right: none; }
        .rules-column { order: 2; border-radius: 0; border-left: none; border-right: none; border-top: none; }
        .rules-column, .form-column { padding: 24px 20px 30px; }
        .header-section h1 { font-size: 27px; }
        .footer-legal-text { padding: 0 4px; }
        .rule-card { padding: 24px 20px; min-height: 208px; }
    }

    @media (max-width: 420px) {
        .sso-buttons-container { flex-direction: column; gap: 10px; width: 100%; }
        .g_id_signin, #facebook-custom-btn { width: 100% !important; flex-grow: unset; }
        #facebook-custom-btn { height: 44px; }
        .otp-fields-group { gap: 8px; }
        .otp-input { width: 42px; height: 50px; font-size: 18px; border-radius: 8px; }
        .terms-wrapper { padding: 14px; }
        .rule-card { padding: 22px 18px; min-height: 220px; }
        .rules-nav-btn span { display: none; }
        .rules-nav-btn { padding: 10px 12px; }
    }