/* =============================================================================
 * MAPIRANDO — mapirando-auth
 * =============================================================================
 *
 * Ces règles étaient imprimées en <style> au milieu du HTML par le PHP. Les
 * sortir ici ne change rien à l'écran : mêmes règles, même ordre. Ce qu'on y
 * gagne, c'est le cache navigateur (elles repartaient dans chaque page) et un
 * fichier PHP qui ne contient plus que de la logique.
 *
 * ATTENTION À L'ORDRE DE CHARGEMENT : un <style> posé dans le corps de page
 * gagne la cascade sur tout ce qui vient de l'en-tête. Cette feuille doit donc
 * être mise en file APRÈS le thème Blocksy — voir la file en priorité 999 dans
 * mapirando-community.php. La charger normalement laisserait le thème reprendre
 * la main sur les marges et les positions.
 * -------------------------------------------------------------------------- */

/* --- Connexion / inscription
       (venait de templates/auth/auth-form.php, lignes 48-188) ------------------------------------- */
    header, footer, .site-header, .site-footer, #wpadminbar, #masthead, .ct-header { display: none !important; }
    html { margin-top: 0 !important; }
    body { margin: 0; padding: 0; font-family: 'Nunito', sans-serif; background: var(--mapi-surface, #141619); width: 100%; height: 100vh; overflow: hidden; overscroll-behavior-y: none; }

    .mapi-split-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; }
    .mapi-split-image { flex: 1; background-image: url('https://www.mapirando.fr/wp-content/uploads/2026/02/connexion-mapirando-scaled.jpg'); background-size: cover; background-position: center; position: relative; }
    .mapi-split-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2)); }

    #mapi-hero-txt { position: absolute; bottom: 60px; left: 60px; right: 60px; z-index: 10; color: white; pointer-events: none; }
    #mapi-hero-txt h1 { font-size: 3rem; line-height: 1.1; margin: 0 0 15px 0; font-weight: 900; color: white; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
    #mapi-hero-txt p { font-size: 1.2rem; font-weight: 600; color: white; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }

    .mapi-split-form { flex: 1; min-width: 500px; background: var(--mapi-surface, #141619); height: 100vh; overflow-y: auto; display: flex; flex-direction: column; position: relative; z-index: 20; }
    .mapi-split-form::before, .mapi-split-form::after { content: ""; margin: auto; }
    .mapi-form-inner { width: 100%; max-width: 450px; margin: 0 auto; padding: 40px; box-sizing: border-box; flex-shrink: 0; }

    .mapi-logo { font-size: 2rem; font-weight: 900; color: var(--mapi-text-primary, #f4f3f0); text-decoration: none; display: block; margin-bottom: 20px; text-align: center; text-transform: uppercase; letter-spacing: 2px; }
    .mapi-title { font-size: 1.5rem; font-weight: 800; color: var(--mapi-text-primary, #f4f3f0); margin: 0 0 10px 0; text-align: center; }
    .mapi-subtitle { color: #6b7683; margin: 0 0 25px 0; font-size: 0.95rem; text-align: center; line-height: 1.5; }

    .mapi-input-wrapper { position: relative; margin-bottom: 15px; }
    /* !important nécessaire : ce même template imprime en ligne 46 un <link>
       Google Fonts figé (@24,400,0,0) qui définit .material-symbols-rounded
       à 24px. Dans le HTML d'origine notre règle suivait ce <link> dans le
       même flux et gagnait par ordre — une fois sortie dans une feuille
       <head>, elle passe avant lui et perd à spécificité égale. Le reste du
       plugin traite déjà cette même fragilité de la même façon, voir
       mapirando-topo.css. */
    .mapi-field-icon { position: absolute; left: 15px; top: 13px; font-size: 22px !important; color: #9aa3ad; pointer-events: none; z-index: 5; transition: color 0.3s; }

    .mapi-input { width: 100%; padding: 14px 14px 14px 50px !important; border: 1.5px solid #e3e7ec; border-radius: 12px; font-size: 1rem; background: var(--mapi-surface, #141619); color: var(--mapi-text-secondary, #9aa3ad) !important; box-sizing: border-box; transition: all 0.2s; height: 54px !important; appearance: none; }
    .mapi-input:focus { border-color: var(--mapi-text-primary, #f4f3f0); background: var(--mapi-surface, #141619); outline: none; box-shadow: 0 0 0 3px rgba(44,62,80,0.08); }
    select.mapi-input { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; cursor: pointer; }
    .mapi-input-no-icon { padding-left: 14px !important; }

    .pseudo-status { display: none; font-size: 0.78rem; font-weight: 700; margin-top: -8px; margin-bottom: 10px; padding: 4px 10px; border-radius: 6px; display: inline-block; }
    .status-ok   { color: #15803d; background: rgba(16,185,129,0.08); border: 1px solid #bbf7d0; }
    .status-taken { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }

    .pwd-toggle-btn { position: absolute; right: 10px; top: 13px; background: transparent; border: none; color: #9aa3ad; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; z-index: 10; transition: 0.2s; }
    .pwd-toggle-btn:hover { color: var(--mapi-text-primary, #f4f3f0); }
    .pwd-input-wrap .mapi-input { padding-right: 40px !important; }

    .mapi-btn { width: 100%; padding: 16px; border: none; border-radius: 12px; background: #2c3e50; color: white; font-weight: 800; font-size: 1rem; cursor: pointer; text-transform: uppercase; margin-top: 10px; transition: 0.2s; }
    .mapi-btn:hover { background: #000; transform: translateY(-2px); }
    .mapi-btn-green { background: #16a34a; }
    .mapi-btn-green:hover { background: #15803d; }
    .mapi-btn-outline { background: transparent; border: 2px solid var(--mapi-border, rgba(255,255,255,0.1)); color: #6b7683; }
    .mapi-btn-skip { background: transparent; border: none; color: #9aa3ad; font-size: 0.85rem; cursor: pointer; text-decoration: underline; margin-top: 10px; width: 100%; padding: 8px; font-family: inherit; }
    .mapi-btn-skip:hover { color: #6b7683; }

    .mapi-google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 14px; border: 1px solid var(--mapi-border, rgba(255,255,255,0.1)); border-radius: 12px; background: var(--mapi-surface, #141619); color: #3c4043; font-weight: 700; cursor: pointer; text-decoration: none; margin-bottom: 20px; font-size: 0.95rem; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: 0.2s; }
    .mapi-google-btn:hover { background: var(--mapi-surface, #141619); transform: translateY(-1px); }

    .mapi-divider { display: flex; align-items: center; margin: 20px 0; color: #c7cdd4; font-weight: 700; font-size: 0.8rem; letter-spacing: 1px; }
    .mapi-divider::before, .mapi-divider::after { content: ''; flex: 1; height: 1px; background: var(--mapi-surface-raised, #1c1f24); }
    .mapi-divider span { padding: 0 15px; }

    .mapi-link { color: var(--mapi-text-primary, #f4f3f0); font-weight: 700; cursor: pointer; text-decoration: underline; }
    .hidden-view { display: none !important; }

    .pwd-strength-bar { height: 4px; background: var(--mapi-surface-raised, #1c1f24); border-radius: 2px; margin-top: -10px; margin-bottom: 10px; overflow: hidden; }
    .pwd-strength-fill { height: 100%; width: 0; transition: 0.3s; }
    .pwd-feedback { display: flex; justify-content: space-between; font-size: 0.75rem; color: #6b7683; margin-bottom: 15px; }

    .email-sent-box { text-align: center; padding: 25px; border-radius: 16px; }

    .mapi-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px; }
    .mapi-modal-content { background: var(--mapi-surface, #141619); padding: 30px; border-radius: 20px; max-width: 400px; width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }

    /* ============================================================
       DATE PICKER CLAIR — Temps 2 (date de naissance)
       ============================================================ */
    .mapi-light-date-wrap { position: relative; width: 100%; box-sizing: border-box; }
    .mapi-light-date-trigger {
        width: 100%; padding: 14px 14px 14px 50px; border: 1px solid var(--mapi-border, rgba(255,255,255,0.1)); border-radius: 12px;
        background: var(--mapi-surface, #141619); font-family: inherit; box-sizing: border-box; transition: all 0.2s;
        color: var(--mapi-text-secondary, #9aa3ad); font-size: 1rem; cursor: pointer; display: flex; align-items: center;
        justify-content: space-between; height: 50px; user-select: none;
    }
    .mapi-light-date-trigger:hover { border-color: var(--mapi-text-muted, #6b7683); }
    .mapi-light-date-wrap.open .mapi-light-date-trigger { border-color: var(--mapi-text-primary, #f4f3f0); background: var(--mapi-surface, #141619); box-shadow: 0 0 0 3px rgba(44,62,80,0.08); border-radius: 12px 12px 0 0; }
    .mapi-light-date-trigger-label { flex: 1; }
    .mapi-light-date-trigger-label.placeholder { color: #9aa3ad; }
    .mapi-light-date-trigger-icon { flex-shrink: 0; margin-left: 8px; opacity: 0.35; }
    .mapi-light-date-calendar {
        display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 99999;
        background: var(--mapi-surface, #141619); border: 1px solid var(--mapi-border, rgba(255,255,255,0.1)); border-top: none;
        border-radius: 0 0 12px 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        padding: 12px; box-sizing: border-box;
    }
    .mapi-light-date-wrap.open .mapi-light-date-calendar { display: block; }
    .mapi-light-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
    .mapi-light-cal-nav { background: none; border: none; color: #55606a; font-size: 1.2em; cursor: pointer; padding: 4px 10px; border-radius: 6px; transition: background 0.15s; font-family: inherit; line-height: 1; }
    .mapi-light-cal-nav:hover { background: var(--mapi-surface-raised, #1c1f24); }
    .mapi-light-cal-month-label { color: var(--mapi-text-primary, #f4f3f0); font-weight: 700; font-size: 0.95em; text-align: center; flex: 1; }
    .mapi-light-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
    .mapi-light-cal-dow { text-align: center; font-size: 0.72em; font-weight: 700; color: #9aa3ad; text-transform: uppercase; padding: 4px 0; }
    .mapi-light-cal-day { text-align: center; padding: 6px 2px; border-radius: 6px; font-size: 0.85em; color: var(--mapi-text-primary, #f4f3f0); cursor: pointer; transition: background 0.15s; }
    .mapi-light-cal-day:hover { background: var(--mapi-surface-raised, #1c1f24); }
    .mapi-light-cal-day.today { border: 1px solid #2c3e50; color: var(--mapi-text-primary, #f4f3f0); font-weight: 700; }
    .mapi-light-cal-day.selected { background: #2c3e50; color: #fff; font-weight: 700; }
    .mapi-light-cal-day.empty { cursor: default; }
    .mapi-light-cal-day.empty:hover { background: none; }
    .mapi-light-cal-clear { display: block; width: 100%; margin-top: 8px; padding: 6px 0; background: none; border: 1px solid var(--mapi-border, rgba(255,255,255,0.1)); border-radius: 6px; color: #9aa3ad; font-size: 0.82em; font-family: inherit; cursor: pointer; text-align: center; transition: all 0.15s; }
    .mapi-light-cal-clear:hover { background: var(--mapi-surface-raised, #1c1f24); color: #55606a; }
    .mapi-progress-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 25px; }
    .mapi-progress-step { flex: 1; height: 4px; border-radius: 2px; background: var(--mapi-surface-raised, #1c1f24); transition: background 0.3s; }
    .mapi-progress-step.active { background: #2c3e50; }
    .mapi-progress-step.done { background: #16a34a; }
    .mapi-progress-label { font-size: 0.75rem; color: #9aa3ad; text-align: center; margin-bottom: 20px; }

    /* Info box données privées */
    .mapi-private-box { background: rgba(16,185,129,0.08); border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 15px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; }
    .mapi-private-box span { color: #16a34a; font-size: 20px; flex-shrink: 0; margin-top: 1px; }
    .mapi-private-box p { margin: 0; font-size: 0.82rem; color: #15803d; line-height: 1.5; }

    /* Tuiles massifs — pleine largeur, cliquables */
    .mapi-massifs-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
    .mapi-massif-tile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--mapi-border, rgba(255,255,255,0.1)); border-radius: 10px; cursor: pointer; transition: all 0.15s; background: var(--mapi-surface, #141619); user-select: none; }
    .mapi-massif-tile:hover { background: var(--mapi-surface-raised, #1c1f24); border-color: #c7cdd4; }
    .mapi-massif-tile input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--mapi-text-primary, #f4f3f0); cursor: pointer; flex-shrink: 0; }
    .mapi-massif-tile label { font-size: 0.92em; color: var(--mapi-text-primary, #f4f3f0); cursor: pointer; flex: 1; font-weight: 500; }
    .mapi-massif-tile:has(input:checked) { background: rgba(16,185,129,0.08); border-color: #16a34a; }
    .mapi-massif-tile:has(input:checked) label { color: #15803d; font-weight: 700; }

    @media (max-width: 900px) {
        .mapi-split-screen { display: block; }
        .mapi-split-image { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
        #mapi-hero-txt { top: 10%; bottom: auto; text-align: center; left: 20px; right: 20px; }
        #mapi-hero-txt h1 { font-size: 2rem; margin-bottom: 8px; }
        
        .mapi-split-form { position: fixed; bottom: 0; left: 0; width: 100%; height: auto; max-height: 80vh; min-width: 0; background: var(--mapi-surface, #141619); border-radius: 25px 25px 0 0; z-index: 10; justify-content: flex-start; box-shadow: 0 -10px 40px rgba(0,0,0,0.2); }
        .mapi-split-form::before, .mapi-split-form::after { display: none; } 
        .mapi-form-inner { padding: 25px 20px 50px 20px; margin: 0 auto; }
        
        .mapi-logo { display: none; }
        .mapi-massifs-grid { grid-template-columns: 1fr; }

        body.mapi-long-view { overflow: auto !important; height: auto !important; overscroll-behavior-y: auto !important; }
        body.mapi-long-view .mapi-split-screen { display: block; min-height: 100vh; position: relative; height: auto; }
        body.mapi-long-view .mapi-split-image { position: fixed; height: 180px; top: 0; }
        body.mapi-long-view #mapi-hero-txt { top: 50px; }
        body.mapi-long-view .mapi-split-form { position: relative; max-height: none; height: auto; margin-top: 180px; border-radius: 20px 20px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,0.15); overflow-y: visible; justify-content: flex-start; }
        body.mapi-long-view .mapi-form-inner { padding: 30px 20px 80px 20px; margin: 0 auto; }
    }
