/* ============================================================
   GDF AUTH POPUP
   ============================================================ */

/* ─── Overlay ───────────────────────────────────────────────── */
.gdf-auth-overlay {
    visibility: hidden;
    font-size: var(--fs-base);
    font-family: var(--gdf-font-body);
}
.gdf-auth-overlay.active { visibility: visible; }

.gdf-auth-opac {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.gdf-auth-overlay.active .gdf-auth-opac {
    opacity: 0.65;
    pointer-events: auto;
}

/* ─── Modal centré ──────────────────────────────────────────── */
.gdf-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
    padding: 1.5rem;
}
.gdf-auth-overlay.active .gdf-auth-modal {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* ─── Boîte principale ──────────────────────────────────────── */
.gdf-auth-inmodal {
    position: relative;
    background: #fff;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 75rem;
    box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.32);
}

/* ─── Bouton × ──────────────────────────────────────────────── */
.gdf-auth-close {
    position: absolute;
    right: 0.875rem;
    top: 0.875rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    font-size: var(--fs-xl);
    line-height: 1;
    color: #333;
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: color 0.2s, background 0.2s;
    padding: 0;
}
.gdf-auth-close:hover { color: #c1272d; background: #fff; }

/* ─── Layout flex ───────────────────────────────────────────── */
.gdf-auth-wrap {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    min-height: 32.5rem;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.gdf-auth-sidebar {
    width: 33%;
    flex-shrink: 0;
    position: relative;
    background-image: url('../images/Photos/connexion-sidebar.webp');
    background-size: cover;
    background-position: center center;
}
.gdf-auth-sidebar-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0,86,63,0.15) 0%, rgba(0,40,28,0.5) 100%);
}

/* ─── Contenu scrollable ────────────────────────────────────── */
.gdf-auth-content {
    flex: 1;
    min-width: 0;
    padding: 2rem 2.5rem 2rem;
    overflow-y: auto;
    max-height: calc(92vh * var(--gdf-s));
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ─── Logo ──────────────────────────────────────────────────── */
.gdf-auth-logo {
    text-align: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.gdf-auth-logo img,
.gdf-auth-logo .xoo-el-head-img {
    max-height: 5.5rem;
    width: auto;
    display: inline-block;
}

/* ─── Tabs ──────────────────────────────────────────────────── */
.gdf-auth-tabs {
    display: flex;
    border-bottom: 0.125rem solid #e8e5e0;
    margin-bottom: 1.6rem;
    flex-shrink: 0;
}
.gdf-auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 0.1875rem solid transparent;
    margin-bottom: -0.125rem;
    padding: 0.7rem 1rem;
    font-family: var(--gdf-font-body);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: #bbb;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s, border-color 0.2s;
}
.gdf-auth-tab:hover { color: #00563f; }
.gdf-auth-tab.active {
    color: #00563f;
    border-bottom-color: #b8935f;
}

/* ─── Notice ────────────────────────────────────────────────── */
.gdf-auth-notice {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.3125rem;
    margin-bottom: 1rem;
    font-size: var(--fs-sm);
    flex-shrink: 0;
}
.gdf-auth-notice.success { background: #d4edda; color: #155724; }
.gdf-auth-notice.error   { background: #fde8e8; color: #a00; }

/* ─── Panels — hauteur stable ───────────────────────────────── */
.gdf-auth-panels-wrap {
    position: relative;
}
.gdf-auth-panel {
    width: 100%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.18s ease;
}
.gdf-auth-panel.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   ULTIMATE MEMBER — STYLES COMMUNS
   ═══════════════════════════════════════════════════════════════ */

.gdf-auth-panel .um h3.um-form-title,
.gdf-auth-panel .um-login  > .um-header,
.gdf-auth-panel .um-register > .um-header { display: none !important; }

.gdf-auth-panel .um-form { padding: 0 !important; margin: 0 !important; }
.gdf-auth-panel .um      { margin: 0 !important; }
.gdf-auth-panel .um .um-clear { display: none !important; }

/* Espacement entre champs */
.gdf-auth-panel .um .um-field {
    margin-bottom: 0.3rem !important;
}

/* Labels */
.gdf-auth-panel .um .um-field-label label {
    font-size: var(--fs-xs) !important;
    font-weight: 700 !important;
    color: #888 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    margin-bottom: 0.1875rem !important;
    display: block !important;
}

/* ── Inputs — taille et padding uniformes sur TOUS les types ── */
.gdf-auth-panel .um .um-field-area input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.gdf-auth-panel .um .um-field-area select,
.gdf-auth-panel .um .um-field-area textarea {
    background: #f9f8f6 !important;
    border: 0.0938rem solid #e4e0da !important;
    border-radius: 0.3125rem !important;
    font-family: var(--gdf-font-body) !important;
    font-size: var(--fs-sm) !important;
    color: #222 !important;
    padding: 0.55rem 0.9rem !important;
    height: 2.5rem !important;             /* hauteur fixe identique pour tous */
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s !important;
    box-sizing: border-box !important;
}
.gdf-auth-panel .um .um-field-area input:focus,
.gdf-auth-panel .um .um-field-area select:focus,
.gdf-auth-panel .um .um-field-area textarea:focus {
    border-color: #b8935f !important;
    box-shadow: 0 0 0 0.1875rem rgba(184,147,95,0.13) !important;
    background: #fff !important;
    outline: none !important;
}

/* Supprimer les flèches spinner sur input[type="number"]
   qui causent une hauteur différente selon les navigateurs */
.gdf-auth-panel .um .um-field-area input[type="number"]::-webkit-inner-spin-button,
.gdf-auth-panel .um .um-field-area input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.gdf-auth-panel .um .um-field-area input[type="number"] {
    -moz-appearance: textfield !important;
}

/* ─── Bouton submit ─────────────────────────────────────────── */
.gdf-auth-panel .um .um-button,
.gdf-auth-panel .um input[type="submit"] {
    background: #b8935f !important;
    color: #fff !important;
    font-family: var(--gdf-font-body) !important;
    font-weight: 600 !important;
    font-size: var(--fs-sm) !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    border: 0.125rem solid #b8935f !important;
    border-radius: 0.25rem !important;
    padding: 0.9rem 2rem !important;
    height: auto !important;             /* le bouton garde sa hauteur naturelle */
    width: 100% !important;
    cursor: pointer !important;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease !important;
    margin-top: 0.8rem !important;
    display: inline-block !important;
    text-align: center !important;
}
.gdf-auth-panel .um .um-button:hover,
.gdf-auth-panel .um input[type="submit"]:hover {
    background: #c1a875 !important;
    border-color: #c1a875 !important;
    transform: translateY(-0.125rem) !important;
    box-shadow: 0 0.5rem 1.25rem rgba(184,147,95,0.3) !important;
}

/* Mot de passe oublié */
.gdf-auth-panel .um .um-forgot-pw {
    font-size: var(--fs-xs) !important;
    color: #aaa !important;
    text-decoration: none !important;
    display: block !important;
    text-align: right !important;
    margin-top: 0.25rem !important;
    transition: color 0.2s !important;
}
.gdf-auth-panel .um .um-forgot-pw:hover { color: #b8935f !important; }

/* Masquer liens redondants */
.gdf-auth-panel .um .um-registration-have-account,
.gdf-auth-panel .um .um-login-have-account,
.gdf-auth-panel .um-alt-link { display: none !important; }

/* Colonnes UM */
.gdf-auth-panel .um .um-col-01,
.gdf-auth-panel .um .um-col-02 { padding: 0 0.375rem !important; }

/* Toggle password — hauteur identique aux autres champs */
.gdf-auth-panel .um .um-field-area-password {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}
.gdf-auth-panel .um .um-field-area-password input {
    padding: 0.55rem 2.5rem 0.55rem 0.9rem !important;
    height: 2.5rem !important;
}
.gdf-auth-panel .um .um-toggle-password {
    position: absolute !important;
    right: 0.625rem !important;
    color: #aaa !important;
    cursor: pointer !important;
    font-size: var(--fs-base) !important;
    transition: color 0.2s !important;
    z-index: 2 !important;
}
.gdf-auth-panel .um .um-toggle-password:hover { color: #b8935f !important; }

/* Date picker z-index */
.gdf-auth-panel .um .picker { z-index: 99999 !important; }

/* ═══════════════════════════════════════════════════════════════
   PANNEAU INSCRIPTION — DESIGN SPÉCIFIQUE
   ═══════════════════════════════════════════════════════════════ */

/* ── Titres de section um-row-heading ───────────────────────── */
.gdf-auth-panel[data-panel="register"] .um .um-row-heading {
    font-family: var(--gdf-font-body) !important;
    font-size: var(--fs-base) !important;
    font-weight: 600 !important;
    color: #00563f !important;
    letter-spacing: 0.01em !important;
    text-transform: uppercase !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 3.5rem 0 0.7rem !important;
    line-height: 1.2 !important;
}
/* Premier heading : margin-top minimal */
.gdf-auth-panel[data-panel="register"] .um .um-row-heading:first-child {
    margin-top: 0.5rem !important;
}

/* ── Rows ────────────────────────────────────────────────────── */
.gdf-auth-panel[data-panel="register"] .um .um-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 0.75rem !important;
    margin-bottom: 0 !important;
}

/* ── Colonnes 2 côte à côte ─────────────────────────────────── */
.gdf-auth-panel[data-panel="register"] .um .um-col-121,
.gdf-auth-panel[data-panel="register"] .um .um-col-122 {
    flex: 1 1 calc(50% - 0.375rem) !important;
    min-width: 8.125rem !important;
    float: none !important;
}
.gdf-auth-panel[data-panel="register"] .um .um-col-1 {
    flex: 0 0 100% !important;
    float: none !important;
}

/* ── Icône calendrier ────────────────────────────────────────── */
.gdf-auth-panel[data-panel="register"] .um .um-field-type_date .um-field-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.3125rem !important;
}
.gdf-auth-panel[data-panel="register"] .um .um-field-type_date .um-field-label i {
    font-size: var(--fs-sm) !important;
    color: #b8935f !important;
}

/* ── Honeypot hidden ─────────────────────────────────────────── */
.gdf-auth-panel .um p.um_request_name { display: none !important; }

/* ── Bouton submit wrapper ───────────────────────────────────── */
.gdf-auth-panel .um .um-col-alt {
    margin-top: 0.5rem !important;
}

/* ─── Masquer les notices UM dans les panels inactifs ──────── */
.gdf-auth-panel:not(.active) .um-notice,
.gdf-auth-panel:not(.active) .um-err-space,
.gdf-auth-panel:not(.active) .um-error {
    display: none !important;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 820px) {
    .gdf-auth-sidebar { display: none; }
    .gdf-auth-inmodal { border-radius: 0.625rem; }
    .gdf-auth-content { padding: 1.5rem 1.2rem; max-height: calc(94vh * var(--gdf-s)); }
    .gdf-auth-logo img { max-height: 4.25rem; }
    .gdf-auth-modal { padding: 0.5rem; }
    .gdf-auth-panel[data-panel="register"] .um .um-row-heading {
        font-size: var(--fs-sm) !important;
        margin: 2rem 0 0.6rem !important;
    }
}

@media (max-width: 480px) {
    .gdf-auth-tab { font-size: var(--fs-2xs); padding: 0.6rem 0.4rem; }
    .gdf-auth-panel[data-panel="register"] .um .um-col-121,
    .gdf-auth-panel[data-panel="register"] .um .um-col-122 {
        flex: 0 0 100% !important;
    }
}
