@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* GLOBAL */
:root {
    --em-primary: #102234;
    --em-secondary: #FFD412;
    --em-light-gray: #f1f5f9;
    --em-gray: #e2e8f0;
    --em-text-primary: #102234;
    --em-text-secondary: #556677;
    --em-danger: #dc2626;
    --em-danger-bg: #fff5f5;
    --em-danger-border: #fecaca;
}

.em-dashboard-container { 
    display: grid !important; 
    grid-template-columns: 260px 1fr !important; 
    gap: 30px !important; 
    max-width: 1250px !important; 
    margin: 40px auto !important; 
    font-family: 'Inter', sans-serif !important; 
    color: var(--em-text-primary) !important; 
    align-items: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.em-dashboard-container > * {
    box-sizing: border-box !important;
}

@media (max-width: 900px) { 
    .em-dashboard-container { 
        grid-template-columns: 1fr !important; 
        gap: 20px !important; 
    } 
}

/* SIDEBAR */
.em-sidebar { 
    background: #ffffff; 
    padding: 25px 20px; 
    border-radius: 16px; 
    position: sticky; 
    top: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    display:flex; 
    flex-direction:column; 
}
.em-user-profile { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid var(--em-gray); 
}
.em-avatar img { 
    border-radius: 50%; 
    border: 2px solid var(--em-primary); 
    width: 48px;
    height: 48px;
    display: block;
}
    .woocommerce-MyAccount-content .eqx-password-input-wrap {
        position: relative;
    }
    .woocommerce-MyAccount-content .eqx-password-input-wrap input {
        padding-right: 92px !important;
    }
    .woocommerce-MyAccount-content .eqx-password-toggle {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        border: 1px solid #cbd5e1;
        background: #ffffff;
        color: #1c355a;
        border-radius: 6px;
        padding: 5px 9px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }
    .woocommerce-MyAccount-content .eqx-password-toggle:hover {
        background: #f8fafc;
    }
    .woocommerce-MyAccount-content .eqx-password-strength {
        margin-top: 10px;
        margin-bottom: 6px;
    }
    .woocommerce-MyAccount-content .eqx-password-strength-bar {
        height: 8px;
        border-radius: 999px;
        background: #e2e8f0;
        overflow: hidden;
    }
    .woocommerce-MyAccount-content .eqx-password-strength-bar span {
        display: block;
        height: 100%;
        width: 0;
        transition: width 0.2s ease;
        background: #94a3b8;
    }
    .woocommerce-MyAccount-content .eqx-password-strength-bar span.eqx-strength-1,
    .woocommerce-MyAccount-content .eqx-password-strength-bar span.eqx-strength-2 {
        background: #dc2626;
    }
    .woocommerce-MyAccount-content .eqx-password-strength-bar span.eqx-strength-3 {
        background: #f59e0b;
    }
    .woocommerce-MyAccount-content .eqx-password-strength-bar span.eqx-strength-4 {
        background: #16a34a;
    }
    .woocommerce-MyAccount-content .eqx-password-strength-text {
        margin-top: 8px;
        color: #334155;
        font-size: 12px;
        font-weight: 600;
    }
    .woocommerce-MyAccount-content .eqx-password-criteria {
        margin: 8px 0 0;
        padding-left: 18px;
        color: #64748b;
        font-size: 12px;
    }
    .woocommerce-MyAccount-content .eqx-password-criteria li {
        margin: 3px 0;
    }
    .woocommerce-MyAccount-content .eqx-password-criteria li.is-met {
        color: #166534;
    }
.em-hello { 
    font-size: 10px; 
    text-transform: uppercase; 
    color: #64748b; 
    font-weight: 600; 
    letter-spacing: 1px; 
    display:block; 
    margin-bottom:2px; 
}
.em-username { 
    margin: 0; 
    font-size: 15px; 
    font-weight: 600; 
    color: #102234; 
    line-height: 1.2; 
}
.em-navigation { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
}
.em-nav-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%; 
    background: transparent; 
    border: none; 
    padding: 12px 15px; 
    cursor: pointer; 
    text-align: left; 
    border-radius: 8px; 
    color: var(--em-text-secondary); 
    font-weight: 500; 
    font-size: 14px; 
    transition: all 0.2s ease; 
    letter-spacing: 0.5px; 
}
.em-nav-item > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.em-nav-item:hover { 
    color: var(--em-primary); 
    background-color: var(--em-light-gray); 
}
.em-nav-item.active { 
    background-color: #1c355a; 
    color: #ffd412; 
    font-weight: 700; 
    box-shadow: 0 4px 12px rgba(28, 53, 90, 0.4);
}
.em-icon { 
    font-size: 18px; 
    width: 20px; 
    text-align: center; 
    flex-shrink: 0;
}

/* Tab Content Styles */
.em-tab-content {
    width: 100% !important;
}

.em-welcome-header {
    margin-bottom: 30px;
}

.em-welcome-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #102234;
}

.em-welcome-header p {
    margin: 0;
    color: #556677;
    font-size: 14px;
}

/* Show WooCommerce navigation (styled to match dashboard menus) */
.woocommerce-MyAccount-navigation,
nav.woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-navigation {
    display: flex !important;
}

/* Force em-navigation to be vertical */
.em-navigation {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.em-nav-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.em-mt-auto { 
    margin-top: auto !important; 
    border-top: 1px solid var(--em-gray); 
    padding-top: 20px; 
    border-radius: 0; 
}

/* Collapsible sidebar styles */
.em-dashboard-container { transition: all 0.25s ease; position: relative; }
.em-sidebar { width: 260px; min-width:260px; transition: width 0.28s ease, padding 0.28s ease, opacity 0.2s ease; }
.em-dashboard-container.em-sidebar-collapsed { grid-template-columns: 0 1fr !important; }
.em-dashboard-container.em-sidebar-collapsed .em-sidebar { width: 0 !important; min-width: 0 !important; padding: 0 !important; opacity: 0; overflow: hidden; }
.em-dashboard-container.em-sidebar-collapsed .em-content-area { width: 100%; }
.em-dashboard-container.em-sidebar-collapsed + .em-expand-btn { display: flex !important; }

/* Collapse toggle inside sidebar */
.em-collapse-toggle {
    position: absolute;
    top: 50%;
    right: -18px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--em-light-gray);
    border: 1px solid var(--em-gray);
    box-shadow: 0 6px 18px rgba(16,34,52,0.08);
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, right 0.18s ease;
    font-weight: 700;
    font-size: 16px;
    color: var(--em-primary);
}
.em-collapse-toggle:hover { transform: translateY(-50%) translateX(4px); }

/* Floating expand button when sidebar collapsed */
.em-expand-btn {
    position: fixed;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    z-index: 1200;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--em-secondary);
    color: var(--em-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 36px rgba(16,34,52,0.18);
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.em-expand-btn:hover { transform: translateY(-50%) scale(1.03); box-shadow: 0 16px 48px rgba(16,34,52,0.22); }
.em-dashboard-container:not(.em-sidebar-collapsed) + .em-expand-btn { display: none; }

/* Make sure sidebar remains accessible on small screens */
@media (max-width: 800px) {
    .em-sidebar { position: relative; }
    .em-collapse-toggle { right: 8px; }
}

/* CONTENT */
.em-content-area { 
    background: #ffffff; 
    min-height: 600px; 
    padding: 40px; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
}
.em-content-area h2, .em-content-area h3, .em-content-area h4 { 
    color: var(--em-text-primary) !important; 
    margin-top: 0; 
}
.em-section-title { 
    font-size: 18px; 
    font-weight: 800; 
    margin-bottom: 30px; 
    padding-bottom: 15px; 
    border-bottom: 2px solid var(--em-light-gray); 
}
.em-welcome-header {
    text-align: center;
    margin-bottom: 40px;
}

/* GRIDS & CARDS */
.em-stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-bottom: 40px; 
}
.em-stat-card { 
    background: #fff; 
    border-radius: 12px; 
    padding: 20px; 
    border: 1px solid var(--em-gray); 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    border-left: 4px solid var(--em-primary); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); 
}
.em-icon-circle { 
    background: var(--em-light-gray); 
    color: var(--em-primary); 
    width: 48px; 
    height: 48px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 22px; 
    flex-shrink: 0; 
}
.em-stat-value { 
    font-size: 24px; 
    font-weight: 800; 
    margin-bottom: 4px; 
}
.em-stat-label { 
    font-size: 11px; 
    color: #64748b; 
    font-weight: 700; 
    text-transform: uppercase; 
}

.em-tools-grid, .em-actions-grid, .em-poles-grid {
    display: grid;
    gap: 20px;
}
.em-tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Espace Responsable & Municipales: fond bleu léger sur les cartes principales */
#content-responsable .em-tools-grid .em-tool-card:nth-child(-n+3),
#content-municipales .em-tools-grid .em-tool-card:nth-child(-n+2) {
    background: #dce6f5;
    border-color: #b3d4f5;
}

.em-tools-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.em-actions-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); justify-content: center; }

.em-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid var(--em-gray);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.2s;
    color: inherit;
    text-decoration: none !important;
}

button.em-tool-card {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--em-gray);
    background: #fff;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.em-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #ffd412;
}

.em-tool-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.em-tool-info {
    margin-bottom: 20px;
}

.em-tool-info h4 {
    font-size: 15px;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.em-tool-info p {
    font-size: 13px;
    color: var(--em-text-secondary);
    margin: 0;
    line-height: 1.4;
}

.em-tool-action, .em-tool-card .em-btn {
    margin-top: auto;
}

/* BUTTONS */
.em-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none !important;
    box-sizing: border-box;
    text-transform: uppercase !important;
}

.em-submit-btn, .em-btn-modal {
    background-color: #ffd412 !important;
    color: #1c355a !important;
    border: 1px solid #ffd412 !important;
    border-radius: 8px;
}
.em-submit-btn:hover, .em-btn-modal:hover {
    background-color: #1c355a !important;
    color: #ffd412 !important;
    border-color: #ffd412 !important;
}

.em-btn-link, .em-btn-ghost {
    background-color: white !important;
    color: var(--em-text-secondary) !important;
    border: 1px solid var(--em-gray) !important;
}
.em-btn-link:hover, .em-btn-ghost:hover {
    background-color: var(--em-light-gray) !important;
    color: var(--em-primary) !important;
    border-color: var(--em-light-gray) !important;
}
.em-btn-danger {
    background: var(--em-danger-bg) !important;
    color: var(--em-danger) !important;
    border-color: var(--em-danger-border) !important;
}
.em-btn-danger:hover {
    background: #fee2e2 !important;
}

.em-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.em-btn-small {
    padding: 6px 12px !important;
    font-size: 0.9em !important;
    white-space: nowrap;
}

.em-tool-action {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    text-transform: uppercase;
    display: inline-block;
    background-color: transparent !important;
    color: var(--em-text-secondary) !important;
    border: none !important;
    font-weight: 700;
}
.em-tool-action:hover {
    color: #1c355a !important;
    text-decoration: underline;
}
span.em-btn-link, span.em-btn-modal {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    text-transform: none;
}

/* Harmonize button appearance inside the card section (Accueil) */
.em-card-section .em-btn, .em-card-section a.em-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 24px !important;
    line-height: 1 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    background-color: #ffd412 !important;
    color: #1c355a !important;
    border: 1px solid #ffd412 !important;
    border-radius: 8px !important;
}
.em-card-section .em-btn:hover, .em-card-section a.em-btn:hover {
    background-color: #1c355a !important;
    color: #ffd412 !important;
    border-color: #ffd412 !important;
}
.em-card-section .em-btn > span, .em-card-section a.em-btn > span {
    margin-right: 8px !important;
    line-height: 1 !important;
    font-size: 1.2em !important;
}


/* FORM */
.em-form-container { padding: 30px; max-width: 600px; margin: 0 auto; box-sizing: border-box; }
.em-form-group { margin-bottom: 20px; } 
.em-form-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline; } 
.em-form-group.half { flex: 1; min-width: calc(50% - 10px); }
.em-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--em-text-primary); }
.em-form-group input:not([type="checkbox"]), .em-form-group select, .em-form-group textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s; }
.em-form-group input:not([type="checkbox"]):focus, .em-form-group select:focus, .em-form-group textarea:focus { outline: none; border-color: var(--em-primary, #3b82f6); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.em-conditional-group { padding: 15px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; margin-bottom: 20px; }
.em-form-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; }

.em-questionnaire-section {
    margin-top: 18px;
    padding: 0;
    max-width: 920px;
}

#template-formulaire-questionnaire .em-form-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
}

#template-formulaire-questionnaire .em-form-container #success-message-questionnaire {
    min-height: 300px;
}

.em-questionnaire-head {
    padding: 24px 30px 0 30px;
}

.em-questionnaire-intro {
    margin: 10px 0 12px 0;
    color: var(--em-text-secondary);
    line-height: 1.55;
}

.em-questionnaire-status {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--em-text-secondary);
}

.em-questionnaire-status:empty {
    display: none;
}

.em-questionnaire-status.is-ready { color: #1d4ed8; }
.em-questionnaire-status.is-complete { color: #15803d; }
.em-questionnaire-status.is-error { color: #b91c1c; }

.em-questionnaire-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    padding: 24px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    border: 0;
    color: #334155;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.em-questionnaire-loading .em-loader-big {
    width: 38px;
    height: 38px;
    border-width: 3px;
    margin: 0;
}

.em-questionnaire-loading-text {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.eqx-questionnaire-modal {
    padding: 0;
    position: relative;
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
}

.eqx-questionnaire-standalone-template,
.eqx-questionnaire-standalone-template .em-form-container {
    background: #fff;
    border-radius: 16px;
}

#questionnaire-form-wrapper {
    padding: 18px 0 0 0;
    flex: 1 1 auto;
    overflow-y: auto;
}

.eqx-questionnaire-modal #baserow-questionnaire-form {
    padding: 0 0 30px 0;
}

.eqx-questionnaire-modal #baserow-questionnaire-form > .em-form-group,
.eqx-questionnaire-modal #baserow-questionnaire-form > .em-form-actions,
.eqx-questionnaire-modal #baserow-questionnaire-form > #questionnaire-status,
.eqx-questionnaire-modal #baserow-questionnaire-form > #questionnaire-loading {
    padding-left: 45px;
    padding-right: 45px;
}

.eqx-checklist-grid {
    display: block;
}

.eqx-checklist-grid .em-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.eqx-checklist-grid .em-checkbox-wrapper input[type="checkbox"] {
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
    margin: 2px 0 0 0;
    border-radius: 4px;
    box-sizing: border-box;
}

.eqx-checklist-grid .em-checkbox-wrapper label {
    margin: 0;
    line-height: 1.45;
    display: block;
    font-weight: 500;
}

#questionnaire_field_3310279[readonly] {
    background: #f8fafc;
    color: #475569;
    cursor: not-allowed;
}

#questionnaire_mandate_details_group {
    transition: max-height .25s ease, opacity .25s ease, margin .25s ease;
}

#questionnaire_mandate_details_group .eqx-checklist-grid {
    margin-top: 0;
}

#success-message-questionnaire {
    display: none;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    padding: 48px 30px 56px 30px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-top: 1px solid #bbf7d0;
    animation: slideIn 0.4s ease-out;
}

#success-message-questionnaire .em-success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease-out;
}

#success-message-questionnaire h3 {
    font-size: 28px;
    font-weight: 700;
    color: #16a34a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

#success-message-questionnaire p {
    font-size: 16px;
    color: #166534;
    margin: 0 0 30px 0;
    line-height: 1.55;
    max-width: 620px;
}

#template-formulaire-questionnaire .em-questionnaire-intro,
#template-formulaire-questionnaire .em-questionnaire-status,
#template-formulaire-questionnaire .em-questionnaire-loading,
#template-formulaire-questionnaire .em-help-text,
#template-formulaire-questionnaire label {
    color: var(--em-text-primary);
}

#template-formulaire-questionnaire .em-questionnaire-intro {
    color: var(--em-text-secondary);
}

@media (max-width: 768px) {
    #questionnaire-form-wrapper {
        margin-top: 14px;
    }

    .eqx-questionnaire-modal #baserow-questionnaire-form > .em-form-group,
    .eqx-questionnaire-modal #baserow-questionnaire-form > .em-form-actions,
    .eqx-questionnaire-modal #baserow-questionnaire-form > #questionnaire-status,
    .eqx-questionnaire-modal #baserow-questionnaire-form > #questionnaire-loading {
        padding-left: 24px;
        padding-right: 24px;
    }

    .eqx-checklist-grid {
        display: block;
    }

}

.em-form-message.success {
    color: #15803d;
    font-weight: 600;
    padding: 16px 20px;
    border: 1px solid #22c55e;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.em-form-message.success::before {
    content: '✅';
    font-size: 20px;
    flex-shrink: 0;
}

.em-form-message.error {
    color: #991b1b;
    font-weight: 600;
    padding: 16px 20px;
    border: 1px solid #ef4444;
    border-radius: 8px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.em-form-message.error::before {
    content: '⚠️';
    font-size: 20px;
    flex-shrink: 0;
}

/* Password modal */
.em-passwords-modal {
    max-width: 720px;
}

.em-passwords-title {
    margin-top: 0;
}

.em-passwords-list {
    margin-bottom: 20px;
}

.em-password-item {
    background: #fff;
    border: 1px solid var(--em-gray);
    border-left: 4px solid var(--em-secondary);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}

.em-password-access-name {
    margin: 0 0 10px 0;
    font-weight: 700;
    color: var(--em-text-primary);
}

.em-passwords-modal .em-passwords-title,
.em-passwords-modal .em-password-access-name,
.em-passwords-modal .em-password-note,
.em-passwords-modal .em-password-note strong,
.em-passwords-modal .em-password-empty,
.em-passwords-modal .em-password-item,
.em-passwords-modal .em-password-item p,
.em-passwords-modal .em-password-item span {
    color: var(--em-text-primary) !important;
}

.em-password-value {
    background: var(--em-light-gray);
    border: 1px solid var(--em-gray);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.em-password-value code {
    font-family: 'Courier New', monospace;
    color: var(--em-primary);
    font-size: 14px;
    line-height: 1.45;
    word-break: break-all;
}

.em-password-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.em-password-send,
.em-password-copy,
.em-password-close {
    width: auto;
}

.em-password-send {
    min-width: 190px;
}

.em-password-copy {
    min-width: 120px;
}

.em-password-note {
    background: var(--em-light-gray);
    border: 1px solid var(--em-gray);
    border-left: 4px solid var(--em-secondary);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9em;
    color: var(--em-text-primary);
    margin-bottom: 15px;
}

.em-password-empty {
    text-align: center;
    color: var(--em-text-secondary);
}

.em-password-footer {
    text-align: center;
    margin-top: 20px;
}

@media (max-width: 640px) {
    .em-password-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .em-password-send,
    .em-password-copy,
    .em-password-close {
        width: 100%;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fullscreen success message for contact GL - similar to #success-message */
#success-message-gl-resp {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    animation: slideIn 0.4s ease-out;
}

#success-message-gl-resp.open {
    display: flex !important;
}

#success-message-gl-resp .em-success-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounce 0.6s ease-out;
}

#success-message-gl-resp h3 {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

#success-message-gl-resp p {
    font-size: 16px;
    color: #15803d;
    margin: 0 0 30px 0;
    line-height: 1.5;
    max-width: 400px;
}

/* Ensure container has proper layout */
#template-contact-gl-resp .em-form-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
}

#template-contact-gl-resp .em-form-container #success-message-gl-resp {
    min-height: 300px;
}

#success-message-pole {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    animation: slideIn 0.4s ease-out;
    min-height: 300px;
}

#success-message-pole.open {
    display: flex !important;
}

#success-message-pole .em-success-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounce 0.6s ease-out;
}

#success-message-pole h3 {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

#success-message-pole p {
    font-size: 16px;
    color: #15803d;
    margin: 0 0 30px 0;
    line-height: 1.5;
    max-width: 400px;
}


.em-is-conditional {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    transition: all 0.3s ease;
}
.em-is-conditional.is-visible {
    max-height: none;
    opacity: 1;
    border-width: 1px;
    overflow-y: auto;
}
.em-form-group.em-is-conditional.is-visible, .em-conditional-group.em-is-conditional.is-visible {
    margin-bottom: 20px !important;
}
.em-conditional-group.em-is-conditional.is-visible {
    padding: 15px !important;
}

#field_periodicite_container {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
}
#field_format_container {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
}
.em-checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.em-checkbox-wrapper:last-child {
    margin-bottom: 0;
}
.em-checkbox-wrapper input[type="checkbox"] {
    margin-right: 10px;
    appearance: none;
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: all 0.2s;
}
.em-checkbox-wrapper input[type="checkbox"]::before {
    content: '✔';
    font-size: 14px;
    color: white;
    transform: scale(0);
    transition: transform 0.2s;
}
.em-checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--em-primary);
    border-color: var(--em-primary);
}
.em-checkbox-wrapper input[type="checkbox"]:checked::before {
    transform: scale(1);
}
.em-checkbox-wrapper label {
    margin-bottom: 0;
    font-weight: 500;
}

.em-help-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #4b5c6d;
    line-height: 1.4;
}

#field_documents_upload {
    text-align: center;
    text-align-last: center;
}

#field_documents_upload::file-selector-button {
    display: block;
    margin: 0 auto 8px;
    text-align: center;
}

#field_documents_upload::-webkit-file-upload-button {
    margin: 0 auto 8px;
    text-align: center;
}

#field_documents_info a {
    color: var(--em-primary);
    text-decoration: underline;
}

.em-doc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.em-doc-item,
.em-doc-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fbff;
}

.em-doc-item a,
.em-doc-item span,
.em-doc-new strong {
    overflow-wrap: anywhere;
}

.em-doc-remove-btn,
.em-doc-remove-new {
    border: 1px solid #d0d9e3;
    background: #ffffff;
    color: #334155;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 9px;
    cursor: pointer;
    white-space: nowrap;
}

.em-doc-remove-btn:hover,
.em-doc-remove-new:hover {
    border-color: #ef4444;
    color: #b91c1c;
}


/* MODAL & OTHERS */
.em-modal-overlay { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: rgba(16, 34, 52, 0.75); z-index: 99999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); overscroll-behavior: contain; }
.em-modal-container { width: 90%; max-width: 800px; height: 85dvh; background: white; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); position: relative; display: flex; flex-direction: column; overflow: hidden; }
.em-modal-open { overflow: hidden; }
.em-modal-container.em-modal-baserow { width: 96%; max-width: 1280px; }
.em-modal-container h3 {
    color: var(--em-primary) !important;
}

.em-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: var(--em-primary);
    border: 2px solid var(--em-secondary);
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.em-modal-close::before,
.em-modal-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 3px;
    background-color: var(--em-secondary);
    transition: background-color .2s ease;
}

.em-modal-close::before {
    transform: rotate(45deg);
}

.em-modal-close::after {
    transform: rotate(-45deg);
}

.em-modal-close:hover {
    background: var(--em-secondary);
    border-color: var(--em-primary);
    transform: rotate(90deg);
}

.em-modal-close:hover::before,
.em-modal-close:hover::after {
    background-color: var(--em-primary);
}
.em-modal-content { flex-grow: 1; overflow-y: auto; overflow-x: hidden; position: relative; background: #fff; display: flex; flex-direction: column; }

.em-modal-content #success-message-gl-resp {
    flex-grow: 1;
}
#em-loading-screen, #delete-confirmation-modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.95); display: none; flex-direction: column; align-items: center; justify-content: center; z-index: 50; }
.em-loader-big { width: 50px; height: 50px; border: 4px solid var(--em-light-gray); border-top: 4px solid var(--em-primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
.em-confirm-box { text-align: center; max-width: 300px; padding: 30px; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* CALENDAR */
.em-calendar-wrapper { 
    border: 1px solid #e2e8f0; 
    border-radius: 16px; 
    display:flex; 
    flex-direction: column; 
    position: relative;
    min-height: 600px; 
    background: white; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}
.em-calendar-header { 
    display: flex; 
    flex-direction: column;
    justify-content: flex-start; 
    align-items: stretch; 
    padding: 20px 25px; 
    border-bottom: 1px solid #f1f5f9; 
    background: #fff;
    gap: 14px;
}
.em-cal-nav-row,
.em-cal-controls-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}
.em-cal-nav-row {
    justify-content: center;
}
.em-cal-controls-row {
    justify-content: flex-start;
    flex-wrap: nowrap;
}
.em-cal-nav { display: flex; align-items: center; gap: 15px; flex-grow: 1; }
.em-cal-nav button {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--em-text-secondary);
    transition: all 0.2s;
    font-weight: bold;
}
.em-cal-nav button:hover {
    border-color: var(--em-primary);
    color: var(--em-primary);
    background: #f8fafc;
}
.em-cal-nav button:focus {
    outline: 2px solid var(--em-primary);
    outline-offset: 2px;
}
.em-calendar-header h4 { 
    margin: 0; 
    font-size: 18px; 
    font-weight: 700; 
    color: var(--em-primary); 
    min-width: 0;
    flex: 1 1 auto;
    text-align: center;
    text-transform: none;
}
.em-cal-views { 
    display: flex; 
    gap: 5px;
    background: #f1f5f9; 
    padding: 4px; 
    border-radius: 10px; 
    flex: 0 0 auto;
}
.em-view-btn { 
    border: none; 
    background: transparent; 
    padding: 8px 16px; 
    border-radius: 8px; 
    font-size: 13px; 
    font-weight: 600; 
    color: var(--em-text-secondary); 
    cursor: pointer; 
    transition: all 0.2s;
}
.em-view-btn:focus {
    outline: 2px solid var(--em-primary);
    outline-offset: 2px;
}
.em-view-btn.active { 
    background: white; 
    color: var(--em-primary); 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}
.em-calendar-header .em-cal-views button { width: auto; height: auto; border: none; }

.em-cal-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.em-cal-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}
.em-cal-filter-select {
    border: 1px solid #dbe2ea;
    background: #ffffff;
    color: #102234;
    border-radius: 9px;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    min-width: 150px;
    flex: 0 0 170px;
    box-shadow: 0 1px 2px rgba(16, 34, 52, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.em-cal-filter-select:focus {
    outline: none;
    border-color: var(--em-primary);
    box-shadow: 0 0 0 3px rgba(16, 34, 52, 0.12);
}
.em-cal-create-row {
    display: flex;
    justify-content: center;
}
.em-cal-create-btn {
    width: auto;
    min-width: 220px;
    text-transform: uppercase !important;
}

.em-calendar-grid-header { 
    display: grid; 
    grid-template-columns: repeat(7, minmax(0, 1fr)); 
    text-align: center; 
    padding: 15px 0; 
    background: #f8fafc; 
    font-size: 11px; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b; 
    border-bottom: 1px solid #e2e8f0; 
}

.em-calendar-grid { 
    display: grid; 
    grid-template-columns: repeat(7, minmax(0, 1fr)); 
    flex-grow: 1; 
    background: #f1f5f9; /* Couleur des lignes de la grille */
    gap: 2px; /* Crée les lignes */
    border-bottom: 1px solid #e2e8f0;
    padding: 2px;
}

.em-calendar-day { 
    background: white; 
    min-height: 80px; 
    padding: 6px; 
    cursor: pointer; 
    position: relative; 
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-top: 3px solid transparent;
}
.em-calendar-day:hover { 
    background: #f8fafc;
    border-top-color: #e2e8f0;
}
.em-calendar-day:focus {
    outline: none;
    box-shadow: none;
}
.em-calendar-day:focus-visible {
    outline: none;
    box-shadow: none;
}
.em-calendar-day[data-has-events="true"] {
    border-top-color: var(--em-secondary);
    background: rgba(255, 212, 18, 0.02);
}

.em-calendar-day.em-day-week {
    height: 360px;
    overflow-y: auto;
    gap: 5px;
    min-height: auto;
}

.em-day-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--em-text-primary);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 4px;
}

.em-day-other-month { 
    background: #fcfcfc; 
    color: #cbd5e1; 
}
.em-day-other-month .em-day-number { color: #94a3b8; }

.em-day-today .em-day-number {
    background: var(--em-primary);
    color: white;
    box-shadow: 0 0 0 3px rgba(16, 34, 52, 0.1);
}

.em-day-selected { 
    background: #dce6f5 !important;
    border-left: 1px solid rgba(16, 34, 52, 0.08) !important;
    box-shadow: inset 0 0 0 1px rgba(16, 34, 52, 0.08);
}

/* Dots in month view */
.em-cal-dots {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 4px;
    margin-top: 4px;
}
.em-cal-dot {
    width: 6px;
    height: 6px;
    background-color: var(--eqx-event-dot, var(--em-secondary));
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-block;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s;
}
.em-cal-dot:focus,
.em-cal-dot:focus-visible {
    outline: none;
    box-shadow: none;
}
.em-calendar-day:hover .em-cal-dot {
    transform: scale(1.3);
}
.em-cal-dot:hover {
    transform: scale(1.75);
    box-shadow: 0 0 0 4px rgba(16, 34, 52, 0.12);
}
.em-cal-dot-more {
    font-size: 10px;
    color: #64748b;
    line-height: 6px;
    font-weight: 600;
}
.em-calendar-day[data-event-count]:hover::before {
    content: attr(data-event-count);
    position: absolute;
    bottom: 4px;
    right: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--em-primary);
    background: white;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--em-secondary);
    white-space: nowrap;
}

/* Week view events */
.em-cal-mini-event { 
    font-size: 11px; 
    background: var(--eqx-event-bg, #e0f2fe); 
    color: var(--eqx-event-text, #0369a1); 
    padding: 8px 10px; 
    border-radius: 4px; 
    margin-top: 0; 
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
    border-left: 3px solid var(--eqx-event-border, #0284c7);
    font-weight: 500;
    cursor: pointer;
    white-space: normal;
    overflow: hidden;
    line-height: 1.5;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.em-cal-mini-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.12);
    filter: saturate(1.08);
}
.em-cal-mini-event:focus,
.em-cal-mini-event:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Event popup */
.em-cal-popup-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.42);
    z-index: 10;
    padding: 20px;
}
.em-cal-popup-card {
    position: relative;
    width: min(640px, 96%);
    max-height: 85%;
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25);
}
.em-cal-popup-card #em-calendar-popup-content {
    padding-top: 8px;
}
.em-cal-popup-description {
    flex-basis: 100%;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}
.em-cal-popup-section {
    flex-basis: 100%;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}
.em-cal-popup-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    color: #475569;
}
.em-cal-popup-docs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.em-cal-popup-docs a,
.em-cal-popup-section a {
    word-break: break-word;
}
.em-cal-popup-agenda {
    white-space: pre-wrap;
    line-height: 1.5;
    color: #334155;
}
.em-cal-popup-card .em-cal-event-item {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding-right: 8px;
}
.em-cal-popup-card .em-cal-event-title,
.em-cal-popup-card .em-cal-event-meta,
.em-cal-popup-card .em-cal-popup-description {
    flex-basis: 100%;
}
.em-cal-popup-card .em-cal-event-meta {
    white-space: normal;
    text-align: left;
}
.em-cal-popup-card .em-btn.em-submit-btn {
    margin-top: 4px;
    align-self: flex-start;
}
.em-cal-popup-card .em-cal-ics-btn,
.em-form-actions .em-ics-btn {
    width: auto;
    margin-top: 4px;
}
.em-cal-event-item { 
    display: flex;
    align-items: center;
    gap: 12px;
    background: white; 
    border: 1px solid #e2e8f0; 
    padding: 12px 16px; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    border-left: 4px solid var(--eqx-event-border, var(--em-primary)); 
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.em-cal-event-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--eqx-event-text, var(--em-primary));
    background: var(--eqx-event-bg, #eef2ff);
    border: 1px solid var(--eqx-event-border, #cbd5e1);
}
.em-cal-event-type-secondary {
    color: #334155;
    background: #f8fafc;
    border-color: #dbe2ea;
}
.em-cal-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.em-cal-event-title {
    font-weight: 700;
    color: #102234;
    flex-grow: 1;
}
.em-cal-event-meta {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    text-align: right;
}

/* RESPONSIVE CALENDAR */
@media (max-width: 768px) {
    .em-cal-nav-row,
    .em-cal-controls-row {
        flex-wrap: wrap;
    }
    .em-cal-nav {
        width: 100%;
    }
    .em-cal-filters {
        width: auto;
        margin-left: 0;
        justify-content: flex-start;
        overflow-x: auto;
    }
    .em-cal-filter-label {
        font-size: 11px;
    }
    .em-cal-filter-select {
        min-width: 130px;
        flex: 0 0 140px;
    }
    .em-cal-create-btn {
        width: 100%;
        min-width: 0;
    }
    .em-calendar-day {
        min-height: 70px;
        padding: 4px;
        font-size: 13px;
    }
    .em-day-number {
        font-size: 11px;
        width: 24px;
        height: 24px;
    }
    .em-day-today::after {
        display: none;
    }
    .em-calendar-day.em-day-week {
        height: 280px;
    }
    .em-cal-mini-event {
        font-size: 10px;
        padding: 7px 8px;
        min-height: 34px;
        line-height: 1.45;
    }
    .em-calendar-grid-header {
        font-size: 10px;
        padding: 10px 0;
    }
    .em-calendar-events-list {
        padding: 0;
        height: auto;
    }
    .em-cal-event-item {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }
    .em-cal-event-title {
        flex-basis: 100%;
    }
    .em-cal-event-meta {
        flex: 1;
        min-width: 150px;
    }
    .em-cal-popup-overlay {
        padding: 12px;
    }
    .em-cal-popup-card {
        width: 100%;
        max-height: 90%;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .em-calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 1px;
        padding: 1px;
    }
    .em-calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    .em-day-number {
        font-size: 10px;
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
    }
    .em-day-today::after {
        display: none;
    }
    .em-calendar-day.em-day-week {
        height: 220px;
    }
    .em-calendar-events-list {
        padding: 12px 15px;
        height: 250px;
    }
    .em-cal-event-item {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px 10px;
    }
    .em-cal-event-title {
        flex-basis: auto;
    }
    .em-cal-event-meta {
        text-align: left;
    }
    .em-btn.em-submit-btn {
        width: 100% !important;
    }
}

/* LIST & ATTENDEES */
.em-event-card { width: 100%; padding: 20px; background: #fff; border-radius: 12px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid var(--em-light-gray); box-sizing: border-box; }
.em-event-date-box { min-width: 80px; text-align: center; margin-right: 20px; padding-right: 20px; border-right: 1px solid var(--em-light-gray); flex-shrink: 0; }
.em-event-day { font-size: 26px; font-weight: 800; color: var(--em-primary); line-height: 1; }
.em-event-month { font-size: 12px; text-transform: uppercase; color: #64748b; font-weight: 700; margin-top: 4px; }
.em-event-year { font-size: 11px; color: #94a3b8; font-weight: 600; margin-top: 2px; }
.em-event-info { flex-grow: 1; min-width: 0; margin-right: 20px; }
.em-event-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--em-primary) !important; }
.em-event-meta { font-size: 13px; color: #666; }
.em-event-actions { display: flex; flex-direction: column; gap: 8px; width: 140px; flex-shrink: 0; }

#em-my-events-list h4 {
    color: var(--em-primary) !important;
}

.em-attendees-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.em-attendee-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid #dbe4ee; border-radius: 12px; box-shadow: 0 2px 8px rgba(16,34,52,0.04); transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.em-attendee-card:hover { border-color: #b9cbe0; box-shadow: 0 6px 16px rgba(16,34,52,0.08); transform: translateY(-1px); }
.em-attendee-icon { width: 32px; height: 32px; background: var(--em-primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.em-attendee-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--em-text-primary) !important; letter-spacing: 0.01em; }
#view-attendees, #attendees-content {
    color: var(--em-text-primary) !important;
}
#view-attendees h3 {
    margin: 0;
    color: var(--em-primary) !important;
}
#attendees-content {
    border: 1px solid #e2e8f0;
}
#attendees-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}
.em-search-results { position: absolute; width: 100%; max-height: 200px; overflow-y: auto; background: white; border: 1px solid #cbd5e1; border-radius: 8px; z-index: 100; top: 100%; display: none; margin-top: 5px; }
.em-search-result-item { padding: 12px 15px; cursor: pointer; font-size: 13px; color: var(--em-text-primary); border-bottom: 1px solid var(--em-light-gray); }
.em-search-result-item:hover { background-color: var(--em-light-gray); }

/* CHECKBOX & FIXES */
.em-input-like {
    height: 42px;
    display: flex;
    align-items: center;
}
.em-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.em-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.em-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}
.em-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .em-slider {
    background-color: var(--em-primary);
}
input:checked + .em-slider:before {
    transform: translateX(22px);
}
#field_ville_search { 
    border: 1px solid #cbd5e1 !important; 
}

#success-message {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    height: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    animation: slideIn 0.4s ease-out;
}

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

#success-message .em-success-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

#success-message h3 {
    font-size: 28px;
    font-weight: 700;
    color: #22c55e;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

#success-message p {
    font-size: 16px;
    color: #15803d;
    margin: 0 0 30px 0;
    line-height: 1.5;
    max-width: 400px;
}

/* EMPTY STATES */
.em-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #dce6f5;
    border-radius: 12px;
    color: var(--em-text-secondary);
    margin-top: 20px;
}
.em-empty-icon {
    font-size: 42px;
    margin-bottom: 15px;
    opacity: 0.5;
}
.em-empty-state h4 {
    margin: 0 0 8px 0;
    color: var(--em-primary);
    font-size: 16px;
    font-weight: 700;
}
.em-empty-state p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* CONTACTS POPUP */
.em-contacts-container {
    padding: 20px 10px;
    width: 100%;
    box-sizing: border-box;
}

.em-contacts-container h3, .em-form-container h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 20px 25px 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #102234 !important;
    color: #102234 !important;
}

.em-form-container h3 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.em-contact-section {
    background: #ffffff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin: 0 20px 20px 20px !important;
}

.em-contact-section h4 {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #102234 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #ddd !important;
}

.em-contact-section ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.em-contact-section li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    border-bottom: 1px solid #eee !important;
    line-height: 1.4 !important;
}

.em-contact-section li::before {
    content: '•' !important;
    color: #102234 !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
}

.em-contact-section li:last-child {
    border-bottom: none !important;
}

.em-contact-section li strong {
    color: #102234 !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.em-contact-section a {
    color: #0073aa !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    display: block !important;
}

.em-contact-section a:hover {
    text-decoration: underline !important;
    color: #005a87 !important;
}

.em-contact-section > p {
    margin: 10px 0 0 0 !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}

.em-contact-dep-group {
    margin-top: 12px;
    padding-top: 0;
}

.em-contact-dep-group:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.em-contact-dep-group h5 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #102234 !important;
    margin: 0 0 10px 0 !important;
}

.em-contact-dep-group ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.em-contact-dep-group li {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 0 !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}

.em-contact-dep-group li::before {
    content: '•' !important;
    color: #102234 !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
}

/* Database/Members List Styles */
.em-members-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.em-members-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.em-members-search {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.em-members-search:focus {
    outline: none;
    border-color: var(--em-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.em-members-count {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
    background: white;
    padding: 6px 12px;
    border-radius: 6px;
}

.em-members-list {
    max-height: 600px;
    overflow-y: auto;
}

.em-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
}

.em-member-item:hover {
    background-color: #f9fafb;
}

.em-member-info {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.em-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.em-member-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.em-member-name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.em-member-phone {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.em-member-phone a {
    color: var(--em-primary, #3b82f6);
    text-decoration: none;
    transition: color 0.2s;
}

.em-member-phone a:hover {
    color: #1f2937;
}

.em-member-action {
    display: flex;
    gap: 8px;
}

.em-member-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.em-member-btn-call {
    background: #10b981;
    color: white;
}

.em-member-btn-call:hover {
    background: #059669;
}

.em-member-btn-email {
    background: #3b82f6;
    color: white;
}

.em-member-btn-email:hover {
    background: #2563eb;
}

.em-members-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* ============================
   DASHBOARD ACCUEIL - STATS & ACTIONS
   ============================ */

/* Stats Grid */
.em-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.em-stat-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.em-stat-card .em-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.em-stat-card .em-stat-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    text-align: left;
}

.em-stat-details .em-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #102234;
    line-height: 1;
    margin-bottom: 0;
}

.em-stat-details .em-stat-sublabel {
    font-size: 13px;
    color: #666;
    line-height: 1;
    margin-top: 0;
}

/* Tighter spacing for member counters */
#stat-membres-dept-val,
#stat-membres-fr-val {
    font-size: 24px;
    margin-bottom: 0;
}

#stat-membres-dept-label {
    font-size: 12px;
    color: #666;
    margin-top: 0;
}

.em-stat-toggle-container {
    display: none;
    margin-top: 0;
}

.em-stat-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.em-stat-toggle .toggle-label {
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

.em-stat-toggle .toggle-label.active {
    color: #102234;
    font-weight: 600;
}

/* Stat Details Layout */
.em-stat-details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.em-stat-details-left {
    display: flex;
    gap: 16px;
    align-items: center;
}

.em-stat-details-col {
    display: flex;
    flex-direction: column;
}

.em-stat-details-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Cards & Responsables */
.em-card-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.em-content-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.em-card-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.em-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.em-responsables-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 0 !important;
}

.em-responsable-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}

.em-responsable-item::before {
    content: '•' !important;
    color: #102234 !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
}

#template-mes-contacts .em-form-container h3 {
    color: #102234 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
}

.em-contacts-content {
    width: 100% !important;
    box-sizing: border-box !important;
}

.em-contacts-section {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
}

.em-contacts-section h4 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #102234 !important;
    margin: 20px 0 12px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #ddd !important;
}

.em-contacts-section h4:first-child {
    margin-top: 0 !important;
}

.em-contacts-section small {
    color: #666 !important;
    font-weight: 400 !important;
}

.em-contacts-section small a {
    color: #0073aa !important;
    text-decoration: none !important;
}

.em-contacts-section small a:hover {
    text-decoration: underline !important;
}

.em-contact-gl-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.em-contact-gl-body p {
    margin: 0;
    flex-grow: 1;
}

.em-arrow-button {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    transition: transform 0.2s;
}

.em-card-clickable:hover .em-arrow-button {
    transform: translateX(5px);
}

/* Welcome Header */
.em-welcome-header h2 {
    margin-bottom: 0;
    font-size: 36px;
    font-weight: 700;
}

.em-welcome-header p {
    margin-top: 12px;
}

/* Action Buttons Container */
.em-actions-container {
    margin: 40px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.em-action-btn {
    flex: 1;
    min-width: 250px;
}

.em-action-btn-link {
    flex: 1;
    min-width: 250px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    line-height: 1;
}

.em-action-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.em-action-icon-compact {
    font-size: 1.2em;
    margin-right: 8px;
    line-height: 1;
}

/* ===== MY ACCOUNT CUSTOM DASHBOARD ACTIONS ===== */
.woocommerce-account .eqx-my-account-actions {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.woocommerce-account .eqx-my-account-btn {
    width: auto;
    min-width: 250px;
    min-height: 48px;
    height: 48px;
    text-transform: uppercase !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    line-height: 1.25;
    text-align: center !important;
    text-decoration: none !important;
}

.woocommerce-account .eqx-my-account-btn span {
    text-align: center !important;
}

.woocommerce-account .eqx-my-account-btn:hover,
.woocommerce-account .eqx-my-account-btn:focus,
.woocommerce-account .eqx-my-account-btn:active {
    background-color: #1c355a !important;
    border-color: #ffd412 !important;
    color: #ffd412 !important;
}

.woocommerce-account .eqx-my-account-btn:hover span,
.woocommerce-account .eqx-my-account-btn:focus span,
.woocommerce-account .eqx-my-account-btn:active span {
    color: #ffd412 !important;
}

.woocommerce-account .eqx-my-account-referral a:not(.eqx-my-account-btn) {
    color: #1c355a;
}

.woocommerce-account .eqx-my-account-copy-btn {
    min-width: 180px;
}

body.eqx-modal-open {
    overflow: hidden;
}

.woocommerce-account .eqx-questionnaire-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(5px);
}

.woocommerce-account .eqx-questionnaire-modal.is-open {
    display: flex;
}

.woocommerce-account .eqx-questionnaire-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 34, 52, 0.75);
}

.woocommerce-account .eqx-questionnaire-modal__dialog {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 85vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1;
    overflow: hidden;
    --em-primary: #102234;
    --em-secondary: #ffd412;
}

.woocommerce-account .eqx-questionnaire-modal__title {
    margin: 0;
    color: var(--em-primary);
    font-size: 1.1rem;
    font-weight: 700;
    padding-right: 56px;
}

.woocommerce-account .eqx-questionnaire-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    background: var(--em-primary) !important;
    border: 2px solid var(--em-secondary) !important;
    border-radius: 50% !important;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    appearance: none;
    -webkit-appearance: none;
    transform: rotate(0deg);
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close::before,
.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 3px;
    background-color: var(--em-secondary);
    transition: background-color .2s ease;
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close::before {
    transform: rotate(45deg);
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close::after {
    transform: rotate(-45deg);
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:hover,
.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:focus:hover {
    background: var(--em-secondary) !important;
    border-color: var(--em-primary) !important;
    transform: rotate(90deg);
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:hover::before,
.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:hover::after,
.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:focus:hover::before,
.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:focus:hover::after {
    background-color: var(--em-primary);
}

.woocommerce-account .eqx-questionnaire-modal__close.em-modal-close:focus-visible {
    outline: 2px solid var(--em-secondary);
    outline-offset: 2px;
}

.woocommerce-account .eqx-questionnaire-modal__close .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.woocommerce-account .eqx-questionnaire-modal__iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
}

@media (max-width: 900px) {
    .woocommerce-account .eqx-my-account-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .woocommerce-account .eqx-my-account-btn,
    .woocommerce-account .eqx-my-account-copy-btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        height: 48px;
    }

    .woocommerce-account .eqx-questionnaire-modal {
        padding: 12px;
    }

    .woocommerce-account .eqx-questionnaire-modal__dialog {
        width: 100%;
        height: 92vh;
        max-height: 92vh;
        padding: 16px 14px 12px;
    }

    .woocommerce-account .eqx-questionnaire-modal__title {
        font-size: 1rem;
    }
}

/* ===== MON GL DASHBOARD RESPONSIVE ===== */
@media (max-width: 1024px) {
    .em-dashboard-mon-gl {
        gap: 16px !important;
        margin: 20px auto !important;
    }

    .em-dashboard-mon-gl .em-content-area {
        padding: 24px !important;
    }

    .em-dashboard-mon-gl .em-welcome-header h2 {
        font-size: 30px !important;
    }
}

@media (max-width: 900px) {
    .em-dashboard-mon-gl {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin: 14px auto !important;
    }

    .em-dashboard-mon-gl .em-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        position: relative !important;
        top: auto !important;
        padding: 18px 16px !important;
    }

    .em-dashboard-mon-gl .em-collapse-toggle,
    .em-dashboard-mon-gl + .em-expand-btn {
        display: none !important;
    }

    .em-dashboard-mon-gl.em-sidebar-collapsed {
        grid-template-columns: 1fr !important;
    }

    .em-dashboard-mon-gl.em-sidebar-collapsed .em-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        padding: 18px 16px !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .em-dashboard-mon-gl .em-content-area {
        min-height: 0 !important;
        padding: 18px 16px !important;
    }

    .em-dashboard-mon-gl .em-welcome-header {
        margin-bottom: 22px !important;
    }

    .em-dashboard-mon-gl .em-welcome-header h2 {
        font-size: 26px !important;
    }

    .em-dashboard-mon-gl .em-stats-grid {
        grid-template-columns: 1fr !important;
        margin-bottom: 24px !important;
    }

    .em-dashboard-mon-gl .em-stat-card {
        align-items: flex-start !important;
    }

    .em-dashboard-mon-gl .em-stat-details-row,
    .em-dashboard-mon-gl .em-stat-details-left,
    .em-dashboard-mon-gl .em-stat-details-right {
        width: 100%;
    }

    .em-dashboard-mon-gl .em-stat-details-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .em-dashboard-mon-gl .em-stat-details-right {
        align-items: flex-start;
    }

    .em-dashboard-mon-gl .em-actions-container {
        margin: 24px 0 !important;
        flex-direction: column;
    }

    .em-dashboard-mon-gl .em-action-btn,
    .em-dashboard-mon-gl .em-action-btn-link {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .em-dashboard-mon-gl .em-tools-grid {
        grid-template-columns: 1fr !important;
    }

    .em-dashboard-mon-gl .em-calendar-header {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 12px;
    }

    .em-dashboard-mon-gl .em-cal-nav {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        align-items: center;
        gap: 8px;
    }

    .em-dashboard-mon-gl .em-calendar-header h4 {
        min-width: 0;
        width: 100%;
        font-size: 16px;
        text-align: center;
        line-height: 1.25;
    }

    .em-dashboard-mon-gl .em-cal-views {
        width: 100%;
    }

    .em-dashboard-mon-gl .em-view-btn {
        flex: 1;
        text-align: center;
    }

    .em-dashboard-mon-gl .em-card-section,
    .em-dashboard-mon-gl .em-card-section iframe,
    .em-dashboard-mon-gl .em-card-section img,
    .em-dashboard-mon-gl .em-card-section svg {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 600px) {
    .em-dashboard-mon-gl .em-user-profile {
        gap: 10px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .em-dashboard-mon-gl .em-username {
        font-size: 14px;
        word-break: break-word;
    }

    .em-dashboard-mon-gl .em-nav-item {
        padding: 10px 12px !important;
        font-size: 13px;
        gap: 8px;
    }

    .em-dashboard-mon-gl .em-nav-item > div {
        gap: 8px;
        min-width: 0;
    }

    .em-dashboard-mon-gl .em-nav-item .em-arrow {
        display: none;
    }

    .em-dashboard-mon-gl .em-icon {
        font-size: 16px;
    }

    .em-dashboard-mon-gl .em-calendar-grid-header {
        font-size: 9px;
        padding: 8px 0;
    }

    .em-dashboard-mon-gl .em-calendar-events-list {
        padding: 12px;
        height: 220px;
    }
}

@media (max-width: 380px) {
    .em-dashboard-mon-gl {
        margin: 8px auto !important;
    }

    .em-dashboard-mon-gl .em-sidebar,
    .em-dashboard-mon-gl .em-content-area {
        padding: 14px 12px !important;
    }

    .em-dashboard-mon-gl .em-welcome-header h2 {
        font-size: 22px !important;
    }

    .em-dashboard-mon-gl .em-view-btn {
        padding: 7px 10px;
        font-size: 12px;
    }
}

/* ===== ACTIONS NATIONALES DASHBOARD RESPONSIVE ===== */
@media (max-width: 1024px) {
    .em-dashboard-actions-nationales {
        gap: 16px !important;
        margin: 20px auto !important;
    }

    .em-dashboard-actions-nationales .em-content-area {
        padding: 24px !important;
    }

    .em-dashboard-actions-nationales .em-welcome-header h2 {
        font-size: 30px !important;
    }
}

@media (max-width: 900px) {
    .em-dashboard-actions-nationales {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin: 14px auto !important;
    }

    .em-dashboard-actions-nationales .em-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        position: relative !important;
        top: auto !important;
        padding: 18px 16px !important;
    }

    .em-dashboard-actions-nationales .em-collapse-toggle,
    .em-dashboard-actions-nationales + .em-expand-btn {
        display: none !important;
    }

    .em-dashboard-actions-nationales.em-sidebar-collapsed {
        grid-template-columns: 1fr !important;
    }

    .em-dashboard-actions-nationales.em-sidebar-collapsed .em-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        padding: 18px 16px !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .em-dashboard-actions-nationales .em-content-area {
        min-height: 0 !important;
        padding: 18px 16px !important;
    }

    .em-dashboard-actions-nationales .em-welcome-header {
        margin-bottom: 22px !important;
    }

    .em-dashboard-actions-nationales .em-welcome-header h2 {
        font-size: 26px !important;
    }

    .em-dashboard-actions-nationales .em-tools-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .em-dashboard-actions-nationales .em-user-profile {
        gap: 10px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .em-dashboard-actions-nationales .em-username {
        font-size: 14px;
        word-break: break-word;
    }

    .em-dashboard-actions-nationales .em-nav-item {
        padding: 10px 12px !important;
        font-size: 13px;
        gap: 8px;
    }

    .em-dashboard-actions-nationales .em-nav-item > div {
        gap: 8px;
        min-width: 0;
    }

    .em-dashboard-actions-nationales .em-nav-item .em-arrow {
        display: none;
    }

    .em-dashboard-actions-nationales .em-icon {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .em-dashboard-actions-nationales {
        margin: 8px auto !important;
    }

    .em-dashboard-actions-nationales .em-sidebar,
    .em-dashboard-actions-nationales .em-content-area {
        padding: 14px 12px !important;
    }

    .em-dashboard-actions-nationales .em-welcome-header h2 {
        font-size: 22px !important;
    }
}

/* ===== Mon Compte Shortcode Styles ===== */
.em-form-section,
.em-orders-section,
.em-addresses-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

/* WooCommerce Form Overrides */
.em-form-section .woocommerce-EditAccountForm,
.em-form-section .woocommerce-form {
    max-width: 100%;
}

.em-form-section .form-row,
.em-form-section .woocommerce-form-row {
    margin-bottom: 20px;
}

.em-form-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #102234;
}

.em-form-section input[type="text"],
.em-form-section input[type="email"],
.em-form-section input[type="password"],
.em-form-section textarea,
.em-form-section select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.em-form-section input[type="text"]:focus,
.em-form-section input[type="email"]:focus,
.em-form-section input[type="password"]:focus,
.em-form-section textarea:focus,
.em-form-section select:focus {
    outline: none;
    border-color: #1c355a;
    box-shadow: 0 0 0 3px rgba(28, 53, 90, 0.1);
}

.em-form-section .form-row-wide {
    clear: both;
}

/* WooCommerce Orders Table */
.em-orders-section .shop_table,
.em-orders-section .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.em-orders-section table thead th {
    background-color: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #102234;
    border-bottom: 2px solid #e2e8f0;
}

.em-orders-section table tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.em-orders-section table tbody td {
    padding: 12px;
    color: #475569;
}

.em-orders-section table tbody tr:hover {
    background-color: #f8fafc;
}

.em-orders-section .button,
.em-orders-section .btn {
    background-color: #ffd412;
    color: #102234;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.em-orders-section .button:hover,
.em-orders-section .btn:hover {
    background-color: #1c355a;
    color: #ffd412;
}

/* Addresses Section */
.em-addresses-section .woocommerce-address {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.em-addresses-section h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #102234;
}

.em-addresses-section .edit,
.em-addresses-section a.edit {
    color: #1c355a;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.em-addresses-section .edit:hover,
.em-addresses-section a.edit:hover {
    color: #ffd412;
}

/* Form Messages */
.em-form-section .woocommerce-info,
.em-form-section .woocommerce-error,
.em-form-section .woocommerce-message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #ffd412;
}

.em-form-section .woocommerce-error {
    border-left-color: #ef4444;
    background-color: #fef2f2;
    color: #991b1b;
}

.em-form-section .woocommerce-message {
    border-left-color: #10b981;
    background-color: #f0fdf4;
    color: #065f46;
}

/* ===== WooCommerce Content Styling ===== */
/* Style WooCommerce elements within dashboard tabs */
.em-tab-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.em-tab-content table thead th {
    background-color: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #102234;
    border-bottom: 2px solid #e2e8f0;
}

.em-tab-content table tbody td {
    padding: 12px;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.em-tab-content table tbody tr:hover {
    background-color: #f8fafc;
}

/* WooCommerce buttons in tabs */
.em-tab-content .button,
.em-tab-content .btn {
    background-color: #ffd412 !important;
    color: #102234 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.em-tab-content .button:hover,
.em-tab-content .btn:hover {
    background-color: #1c355a !important;
    color: #ffd412 !important;
}

/* WooCommerce forms */
.em-tab-content .woocommerce-form,
.em-tab-content form {
    max-width: 100%;
}

.em-tab-content .form-row,
.em-tab-content .woocommerce-form-row {
    margin-bottom: 20px;
}

.em-tab-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #102234;
}

.em-tab-content input[type="text"],
.em-tab-content input[type="email"],
.em-tab-content input[type="password"],
.em-tab-content input[type="tel"],
.em-tab-content textarea,
.em-tab-content select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.em-tab-content input:focus,
.em-tab-content textarea:focus,
.em-tab-content select:focus {
    outline: none;
    border-color: #1c355a;
    box-shadow: 0 0 0 3px rgba(28, 53, 90, 0.1);
}

/* Address editing */
.em-tab-content .woocommerce-address {
    background: #fff;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 20px;
}

.em-tab-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #102234;
}

/* Dashboard description text */
.em-tab-content .woocommerce-info {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #0c4a6e;
}

/* ===== WOOCOMMERCE MY ACCOUNT - DASHBOARD STYLING ===== */

/* Container */
.woocommerce-account .site-content,
.woocommerce-account .content-area,
.woocommerce-account .site-main,
.woocommerce-account .entry-content,
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce-MyAccount {
    width: 100% !important;
    max-width: none !important;
}

.woocommerce-account .site-content .ast-container,
.woocommerce-account .woocommerce,
.woocommerce-account .entry-content > .woocommerce {
    max-width: 1250px !important;
    width: 100% !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

/* Grid wrapper created by JS */
.em-woo-dashboard-wrapper {
    display: grid !important;
    grid-template-columns: 260px 1fr !important;
    gap: 30px !important;
    align-items: start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}

.em-woo-dashboard-wrapper.em-woo-sidebar-collapsed {
    grid-template-columns: 0 1fr !important;
}

.em-woo-dashboard-wrapper.em-woo-sidebar-collapsed .woocommerce-MyAccount-navigation {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

.em-woo-dashboard-wrapper.em-woo-sidebar-collapsed .woocommerce-MyAccount-content {
    width: 100% !important;
}

.em-woo-collapse-toggle {
    right: -18px !important;
}

.em-woo-expand-btn {
    z-index: 1201;
}

.em-woo-dashboard-wrapper:not(.em-woo-sidebar-collapsed) + .em-woo-expand-btn {
    display: none !important;
}

@media (max-width: 900px) {
    .em-woo-dashboard-wrapper {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .em-woo-collapse-toggle,
    .em-woo-expand-btn {
        display: none !important;
    }
}

/* Sidebar */
.woocommerce-MyAccount-navigation {
    background: #ffffff !important;
    padding: 25px 20px !important;
    border-radius: 16px !important;
    position: sticky !important;
    top: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    list-style: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    height: fit-content !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
}

/* Stronger specificity to override theme/plugin styles */
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
}

.woocommerce-account .em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li a,
.woocommerce-account .em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link a {
    text-align: left !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link {
    border: none !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li a,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    color: var(--em-text-secondary) !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    text-decoration: none !important;
    gap: 0 !important;
    text-align: left !important;
    transition: all 0.2s ease !important;
    border-right: none !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

/* Emoji icons for WooCommerce endpoints */
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: '🏠' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--orders a::before {
    content: '🛒' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--subscriptions a::before {
    content: '🔁' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--parrainages a::before {
    content: '🤝' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--eqx-discord a::before,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--discord a::before {
    content: '💬' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--downloads a::before,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--recu_fiscal a::before {
    content: '⬇️' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--edit-address a::before,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--edit-addresses a::before {
    content: '📍' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--payment-methods a::before {
    content: '💳' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--edit-account a::before,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--mes-infos a::before {
    content: '👤' !important;
}
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: '↩️' !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li a::before {
    font-size: 16px !important;
    line-height: 1 !important;
}

/* Hide WooCommerce-added icons so only emoji remains */
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a svg,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a i,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a .dashicons,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a .ast-icon,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a .woo-icon,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a .icon {
    display: none !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li a:hover,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link a:hover {
    color: var(--em-primary) !important;
    background-color: var(--em-light-gray) !important;
    border-right: none !important;
    border-left: none !important;
    box-shadow: 0 4px 12px rgba(28, 53, 90, 0.12) !important;
    outline: none !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li.is-active a,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link.is-active a {
    background-color: #1c355a !important;
    color: #ffd412 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(28, 53, 90, 0.4) !important;
    border-right: none !important;
    border-left: none !important;
    outline: none !important;
}

/* Ensure no right border appears from theme/plugin styles */
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li a,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link a,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li.is-active a,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link.is-active a {
    border-right: none !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li.is-active,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link.is-active {
    border-right: none !important;
}

.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation-link::after,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation li::after,
.em-woo-dashboard-wrapper .woocommerce-MyAccount-navigation a::after {
    border-right: none !important;
    box-shadow: none !important;
    display: none !important;
}

/* No trailing arrow to match dashboard menus */

.woocommerce-MyAccount-navigation li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-MyAccount-navigation a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 15px !important;
    background: transparent !important;
    border-radius: 8px !important;
    color: var(--em-text-secondary) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    border: none !important;
}

.woocommerce-MyAccount-navigation a:hover {
    color: var(--em-primary) !important;
    background-color: var(--em-light-gray) !important;
}

.woocommerce-MyAccount-navigation a.is-active {
    background-color: #1c355a !important;
    color: #ffd412 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(28, 53, 90, 0.4) !important;
}

/* Content */
.woocommerce-MyAccount-content {
    background: #ffffff !important;
    min-height: 600px !important;
    padding: 40px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    color: #102234 !important;
    float: none !important;
    max-width: none !important;
}

.woocommerce-MyAccount-content a {
    color: #102234 !important;
    text-decoration: underline !important;
}

.woocommerce-MyAccount-content a:hover {
    color: #1c355a !important;
}

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3,
.woocommerce-MyAccount-content h4 {
    color: #102234 !important;
    margin-top: 0 !important;
}

.woocommerce-MyAccount-content h2:first-of-type {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
}

/* Tables */
.woocommerce-MyAccount-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 20px !important;
}

.woocommerce-MyAccount-content table thead th {
    background-color: #f8fafc !important;
    padding: 12px !important;
    text-align: left !important;
    font-weight: 600 !important;
    color: #102234 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.woocommerce-MyAccount-content table tbody td {
    padding: 12px !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.woocommerce-MyAccount-content table tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Forms */
.woocommerce-MyAccount-content label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #102234 !important;
}

.woocommerce-MyAccount-content input,
.woocommerce-MyAccount-content textarea,
.woocommerce-MyAccount-content select {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    color: #102234 !important;
    background: #ffffff !important;
}

.woocommerce-MyAccount-content input::placeholder,
.woocommerce-MyAccount-content textarea::placeholder {
    color: #64748b !important;
}

.woocommerce-MyAccount-content input:focus,
.woocommerce-MyAccount-content textarea:focus,
.woocommerce-MyAccount-content select:focus {
    outline: none !important;
    border-color: #1c355a !important;
    box-shadow: 0 0 0 3px rgba(28, 53, 90, 0.1) !important;
}

/* Buttons */
.woocommerce-MyAccount-content button,
.woocommerce-MyAccount-content .button {
    background-color: #ffd412 !important;
    color: #102234 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-MyAccount-content button:hover,
.woocommerce-MyAccount-content .button:hover {
    background-color: #1c355a !important;
    color: #ffd412 !important;
}

/* Merged My Account tab: Mes infos & coordonnées */
.woocommerce-MyAccount-content .woocommerce-EditAccountForm,
.woocommerce-MyAccount-content .eqx-account-merged-address form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(16,34,52,0.06);
}

.woocommerce-MyAccount-content .woocommerce-EditAccountForm legend,
.woocommerce-MyAccount-content .eqx-account-merged-address h2,
.woocommerce-MyAccount-content .eqx-account-merged-title {
    color: #102234 !important;
    font-weight: 700;
}

.woocommerce-MyAccount-content .eqx-account-merged-address {
    margin-top: 26px;
}

.woocommerce-MyAccount-content .eqx-account-merged-orders,
.woocommerce-MyAccount-content .eqx-account-merged-payments {
    margin-top: 26px;
}

.woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table {
    font-size: 14px;
}

.woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table th,
.woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table td {
    padding: 10px 12px !important;
}

.woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table .button {
    padding: 7px 12px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.woocommerce-MyAccount-content .eqx-account-merged-title {
    margin: 0 0 12px;
    font-size: 16px;
}

.woocommerce-MyAccount-content .eqx-account-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2744 !important;
    border-bottom: 2px solid #ffd412;
    padding-bottom: 8px;
    margin: 32px 0 20px;
}

.woocommerce-MyAccount-content .eqx-account-section-title--first {
    margin-top: 0;
}

.woocommerce-MyAccount-content .eqx-account-section-security legend {
    display: block;
    margin: 0 0 10px;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: #102234 !important;
}

.woocommerce-MyAccount-content .woocommerce-form-row label,
.woocommerce-MyAccount-content .form-row label {
    color: #102234 !important;
    font-weight: 600;
}

.woocommerce-MyAccount-content #account_display_name_description,
.woocommerce-MyAccount-content .woocommerce-address-fields p {
    color: #475569 !important;
}

@media (max-width: 768px) {
    .woocommerce-MyAccount-content .woocommerce-EditAccountForm,
    .woocommerce-MyAccount-content .eqx-account-merged-address form {
        padding: 16px;
    }

    .woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table {
        font-size: 13px;
    }

    .woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table tbody tr.woocommerce-orders-table__row {
        margin-bottom: 10px !important;
    }

    .woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table tbody tr.woocommerce-orders-table__row td,
    .woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table tbody tr.woocommerce-orders-table__row th {
        padding: 8px 10px !important;
    }

    .woocommerce-MyAccount-content .eqx-account-merged-orders .woocommerce-orders-table .button {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    .woocommerce-MyAccount-content .eqx-account-merged-title {
        font-size: 15px;
    }

    .woocommerce-MyAccount-content .eqx-account-section-title {
        font-size: 14px;
    }

    .woocommerce-MyAccount-content .eqx-account-section-security legend {
        font-size: 14px;
    }
}

/* Addresses */
.woocommerce-MyAccount-content .woocommerce-address {
    background: #f8fafc !important;
    padding: 15px !important;
    border-radius: 6px !important;
    margin-bottom: 20px !important;
}

/* Collapsed state */
.em-woo-dashboard-wrapper.em-woo-sidebar-collapsed {
    grid-template-columns: 0 1fr !important;
}

.em-woo-dashboard-wrapper.em-woo-sidebar-collapsed .woocommerce-MyAccount-navigation {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* Mobile */
@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation {
        padding: 20px 15px !important;
    }
    
    .woocommerce-MyAccount-content {
        padding: 20px !important;
    }
}

/* Mes infos form actions (save/cancel) */
.woocommerce-MyAccount-content .eqx-form-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.woocommerce-MyAccount-content .eqx-form-actions > * {
    margin: 0 !important;
}

.woocommerce-MyAccount-content .eqx-form-actions .button,
.woocommerce-MyAccount-content .eqx-primary-action-btn,
.woocommerce-MyAccount-content .eqx-cancel-changes-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 170px;
    min-height: 40px;
    height: 40px;
    padding: 8px 14px !important;
    font-size: 13px !important;
    line-height: 1.2;
    border-radius: 8px !important;
    text-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

.woocommerce-MyAccount-content .eqx-cancel-changes-btn {
    margin-left: 0 !important;
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.woocommerce-MyAccount-content .eqx-cancel-changes-btn:hover {
    background: #f8fafc !important;
    color: #102234 !important;
}

.woocommerce-MyAccount-content .eqx-cancel-changes-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.woocommerce-MyAccount-content .eqx-form-actions input[type="hidden"] {
    display: none;
}

@media (max-width: 768px) {
    .woocommerce-MyAccount-content .eqx-form-actions .button,
    .woocommerce-MyAccount-content .eqx-primary-action-btn,
    .woocommerce-MyAccount-content .eqx-cancel-changes-btn {
        min-width: 0;
        width: 100% !important;
    }
}

/* U4 — Mise en évidence rang utilisateur dans le classement */
.eqx-ranking-row--me {
    background-color: #fff8dc;
    font-weight: 700;
}
.eqx-ranking-row--me td {
    color: #1a2744;
}
.eqx-ranking-badge-me {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.75rem;
    background-color: #ffd412;
    color: #1a2744;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    vertical-align: middle;
}

/* Corrections UX G1-G5 */

/* G1 — Palette marine/jaune sur Reçus fiscaux (écrase le gradient bleu→violet inline) */
.eqx-recap-section-title {
    background: #1a2744 !important;
    background-image: none !important;
    color: #ffffff !important;
}
.eqx-recap-amount {
    color: #1a2744 !important;
}

/* G2 — Bouton Supprimer en rouge dans Moyens de paiement */
.woocommerce-MyAccount-paymentMethods .button.delete,
.woocommerce-MyAccount-paymentMethods [name="delete_payment_method"] {
    background-color: #c0392b !important;
    color: #ffffff !important;
    border-color: #c0392b !important;
    text-decoration: none !important;
}
.woocommerce-MyAccount-paymentMethods .button.delete:hover,
.woocommerce-MyAccount-paymentMethods [name="delete_payment_method"]:hover {
    background-color: #a93226 !important;
    color: #ffffff !important;
    border-color: #a93226 !important;
}

/* G3 — Suppression du soulignement hérité sur les boutons Mon Compte */
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content a.button,
.woocommerce-MyAccount-content button {
    text-decoration: none !important;
}

/* G4 — Bouton Annuler uniformisé en outlined marine */
.woocommerce-MyAccount-content .button.cancel,
.woocommerce-MyAccount-content [name="cancel"] {
    background-color: transparent !important;
    background: transparent !important;
    border: 2px solid #1a2744 !important;
    color: #1a2744 !important;
    text-decoration: none !important;
}
.woocommerce-MyAccount-content .button.cancel:hover,
.woocommerce-MyAccount-content [name="cancel"]:hover {
    background-color: #1a2744 !important;
    color: #ffffff !important;
}

/* G5 — Bouton Télécharger récapitulatif fiscal en jaune */
.eqx-fiscal-download-btn {
    background-color: #ffd412 !important;
    color: #102234 !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    border-radius: 5px !important;
    border: 1px solid #ffd412 !important;
}
.eqx-fiscal-download-btn:hover {
    background-color: #1a2744 !important;
    color: #ffd412 !important;
    border-color: #ffd412 !important;
}

/* Responsive mobile — Mon Compte */
@media (max-width: 768px) {

    /* Conteneur principal : forcer une seule colonne (déjà géré à 900px,
       on renforce ici pour les petits écrans) */
    .em-woo-dashboard-wrapper {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Sidebar : désactiver le sticky et ajuster le padding */
    .woocommerce-MyAccount-navigation {
        position: relative !important;
        top: auto !important;
        padding: 16px !important;
        margin-bottom: 8px;
    }

    /* Zone contenu : retirer le padding horizontal hérité */
    .woocommerce-MyAccount-content {
        padding: 0 !important;
    }

    /* Boutons pleine largeur (sauf dans les tableaux de classement) */
    .woocommerce-MyAccount-content .button:not(.eqx-ranking-row--me *),
    .woocommerce-MyAccount-content a.button {
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        margin-bottom: 8px;
    }

    /* Grille parrainages en colonne sur mobile */
    /* Après U3, le grid est un <div style="display:grid;..."> enfant direct de .eqx-my-account-referral */
    .eqx-my-account-referral > div[style*="grid"] {
        display: flex !important;
        flex-direction: column !important;
        max-width: 100% !important;
    }

    /* Menu navigation en colonne unique */
    .woocommerce-MyAccount-navigation ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px;
    }

    /* Padding horizontal sur le conteneur principal */
    .em-woo-dashboard-wrapper {
        padding: 0 16px !important;
    }
}
