/* ========================================
   Espace Pro - etang-de-peche.fr
   Design inspire de resaadmin
   ======================================== */

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

/* ========================================
   CSS Variables
   ======================================== */

:root {
    /* Couleurs principales */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-dark: #1e40af;

    /* Couleurs de statut */
    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --info: #0ea5e9;
    --info-light: #f0f9ff;

    /* Couleurs neutres (Slate) */
    --dark: #0f172a;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;

    /* Layout */
    --sidebar-width: 260px;

    /* Bordures et ombres */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-3xl: 24px;

    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ========================================
   Reset & Base
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--slate-600);
    background-color: var(--slate-50);
    min-height: 100vh;
}

/* Fond avec motif subtil (pages auth) */
body.auth-body {
    display: block;
    background-color: var(--slate-50);
    background-image: radial-gradient(var(--slate-200) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

body.auth-body .main {
    min-height: 100vh;
}

.nowrap {
    white-space: nowrap;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* ========================================
   Layout avec Sidebar
   ======================================== */

body {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-x: hidden;
}

/* ========================================
   Sidebar Dark
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    margin-bottom: 40px;
    padding: 0 12px;
    margin-left: -15px;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.sidebar-logo-img {
    max-height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sidebar-logo-text {
    font-size: 16px;
    font-weight: 700;
}

.sidebar-logo-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-link {
    color: var(--slate-300);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-link:hover {
    background: var(--primary);
    color: var(--white);
}

.sidebar-link.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-link i,
.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-link-danger {
    color: #fca5a5;
}

.sidebar-link-danger:hover {
    background: var(--danger);
    color: var(--white);
}

.sidebar-logout {
    margin-top: 24px;
}

.sidebar-section-title {
    padding: 32px 15px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate-500);
    list-style: none;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--white);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 11px;
    color: var(--slate-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px;
    color: var(--white);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    z-index: 10;
}

.sidebar-close:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Top Bar (mobile)
   ======================================== */

.topbar {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--slate-900);
    border-bottom: none;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.mobile-burger {
    padding: 8px;
    color: var(--white);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-burger:hover {
    background: var(--slate-100);
}

.mobile-burger svg,
.mobile-burger i {
    width: 24px;
    height: 24px;
}

/* ========================================
   Page Header
   ======================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.page-title p {
    margin: 5px 0 0;
    color: var(--slate-500);
}

/* ========================================
   Stats Cards
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon svg,
.stat-icon i {
    width: 22px;
    height: 22px;
}

.stat-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-info h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--slate-500);
    font-weight: 500;
}

.stat-info p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

/* ========================================
   Tables
   ======================================== */

.table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.table-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background: var(--slate-50);
    padding: 15px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.95rem;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background 0.15s;
}

.table tbody tr:hover {
    background: var(--slate-50);
}

.table-compact th,
.table-compact td {
    padding: 10px 8px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* User cell dans table */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--slate-700);
}

/* Action buttons dans table */
.action-btns {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-200);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-600);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--slate-50);
    color: var(--primary);
}

.btn-icon svg,
.btn-icon i {
    width: 16px;
    height: 16px;
}

/* ========================================
   Badges
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-neutral {
    background: var(--slate-100);
    color: var(--slate-600);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn svg,
.btn i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
}

.btn-secondary {
    background: var(--slate-100);
    color: var(--slate-700);
}

.btn-secondary:hover {
    background: var(--slate-200);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--slate-300);
    color: var(--slate-700);
}

.btn-outline:hover {
    background: var(--slate-100);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #047857;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert svg,
.alert i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

/* Animation shake pour erreurs */
.error-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--slate-500);
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Forms
   ======================================== */

.form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

/* Libelle masque a l'ecran mais lu par les lecteurs d'ecran */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-700);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--slate-800);
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--slate-400);
}

.form-input.error,
.form-select.error {
    border-color: var(--danger);
}

/* Input avec icone */
.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    pointer-events: none;
}

.input-icon svg,
.input-icon i {
    width: 20px;
    height: 20px;
}

.input-icon-wrapper .form-input {
    padding-left: 48px;
}

.form-hint {
    font-size: 13px;
    color: var(--slate-500);
}

.form-error {
    font-size: 13px;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Checkbox et Radio */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--slate-600);
    user-select: none;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 24px;
}

/* Form sections */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--slate-200);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
}

/* Checkbox grid (pour formulaires avec options multiples) */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.checkbox-grid .checkbox-label {
    padding: 12px 16px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.checkbox-grid .checkbox-label:hover {
    background: var(--slate-100);
    border-color: var(--slate-300);
}

.checkbox-grid .checkbox-label:has(input:checked) {
    background: var(--primary-light);
    border-color: var(--primary);
}

.checkbox-grid .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Grid tarifs */
.tarifs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix .form-input {
    padding-right: 40px;
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-500);
    font-weight: 500;
}

/* ========================================
   Auth Pages (Login, Inscription)
   ======================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    width: 100%;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo-img {
    max-width: 180px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 24px;
}

.auth-left .logo-img {
    max-width: 180px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--slate-500);
    font-weight: 500;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-3xl);
    padding: 32px;
    box-shadow: var(--shadow-xl), 0 4px 20px rgba(148, 163, 184, 0.15);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--slate-500);
}

.auth-footer a {
    font-weight: 600;
}

/* Auth Split Layout (Inscription) */
body.auth-page {
    display: flex;
    min-height: 100vh;
    background: var(--slate-50);
}

body.auth-page .main {
    display: flex;
    flex: 1;
    min-height: 100vh;
}

.auth-left {
    /*flex: 1;*/
    flex: 0 0 auto;
    width: 520px; /* largeur fixe : sinon la colonne s'etire selon la longueur des textes */
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.auth-left .auth-logo {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    display: block;
    margin-bottom: 40px;
}

.auth-left .auth-logo .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.auth-left .auth-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
}

.auth-left .auth-logo .logo-badge {
    background: var(--primary);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.auth-left .auth-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 35px;
}

.auth-left .auth-subtitle {
    font-size: 16px;
    color: var(--slate-500);
    margin-bottom: 32px;
}

.auth-right {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.auth-promo {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
    max-width: 450px;
}

.promo-badge {
    display: inline-block;
    background: #22c55e;
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 8px 22px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.auth-promo h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.promo-subtitle {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 32px;
}

.promo-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.promo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.promo-stat-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.promo-stat-label {
    font-size: 14px;
    opacity: 0.8;
}

.promo-benefits {
    list-style: none;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    backdrop-filter: blur(4px);
}

.promo-benefits li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.promo-benefits li:last-child {
    border-bottom: none;
}

.promo-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: 700;
}

/* Cacher le footer sur les pages auth split */
body.auth-page .footer-auth {
    display: none;
}

/* Bloc promo mobile (caché par défaut) */
.promo-mobile,
.promo-mobile-line {
    display: none;
}

@media (max-width: 1024px) {
    .auth-right {
        display: none;
    }

    .auth-left {
        width: 100%;
        max-width: 100%;
        padding: 20px 16px;
        align-items: center;
    }

    .auth-left .logo-img {
        margin-bottom: 20px;
    }

    .auth-left .auth-title,
    .auth-left .auth-subtitle {
        text-align: center;
    }

    .auth-left .auth-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .auth-left .auth-subtitle {
        margin-bottom: 8px;
    }

    .promo-mobile-line {
        display: block;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        color: #16a34a;
        margin-bottom: 24px;
    }

    .auth-left .form {
        width: 100%;
    }

    .promo-mobile {
        display: block;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-radius: var(--radius-lg);
        padding: 20px;
        margin-bottom: 24px;
        text-align: center;
        color: var(--white);
    }

    .promo-mobile .promo-badge {
        margin-bottom: 12px;
    }

    .promo-mobile h2 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .promo-mobile-subtitle {
        font-size: 14px;
        opacity: 0.9;
        margin: 0;
    }

    .promo-mobile-stats {
        display: flex;
        justify-content: center;
        gap: 24px;
    }

    .promo-mobile-stat {
        font-size: 14px;
    }

    .promo-mobile-stat strong {
        display: block;
        font-size: 22px;
        font-weight: 700;
        margin-bottom: 2px;
    }
}

/* ========================================
   Verification Page
   ======================================== */

.verification-container {
    max-width: 440px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.verification-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--primary);
}

.verification-icon svg,
.verification-icon i {
    width: 40px;
    height: 40px;
}

.verification-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.verification-text {
    color: var(--slate-500);
    margin-bottom: 32px;
}

.verification-code-input {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.code-digit {
    width: 56px;
    height: 64px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--slate-300);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.code-digit:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--slate-300);
    transition: all 0.2s;
}

.step-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.step-dot.completed {
    background: var(--success);
}

.resend-link {
    color: var(--slate-500);
    font-size: 14px;
}

.resend-link a {
    font-weight: 600;
}

/* ========================================
   Back Link
   ======================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--slate-500);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg,
.back-link i {
    width: 16px;
    height: 16px;
}

/* ========================================
   Footer Auth
   ======================================== */

.footer-auth {
    padding: 20px;
    text-align: center;
    color: var(--slate-500);
    font-size: 14px;
}

/* ========================================
   Sidebar Overlay (mobile)
   ======================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Utilities
   ======================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-muted { color: var(--slate-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.hidden { display: none; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .topbar {
        display: flex;
    }

    .main-content {
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 10px;
        gap: 8px;
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .stat-icon svg,
    .stat-icon i {
        width: 16px;
        height: 16px;
    }

    .stat-info h3 {
        font-size: 0.65rem;
    }

    .stat-info p {
        font-size: 1.1rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .table th,
    .table td {
        padding: 12px 16px;
        white-space: nowrap;
    }

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

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .auth-card {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .verification-code-input {
        gap: 8px;
    }

    .code-digit {
        width: 48px;
        height: 56px;
        font-size: 20px;
    }
}

/* ========================================
   Autocomplete
   ======================================== */

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: var(--shadow-lg);
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--slate-100);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--slate-50);
}

.autocomplete-item-name {
    font-weight: 500;
    color: var(--dark);
}

.autocomplete-item-dep {
    font-size: 13px;
    color: var(--slate-500);
}

.autocomplete-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    margin-top: 8px;
}

.autocomplete-selected-name {
    flex: 1;
    font-weight: 500;
    color: var(--dark);
}

.autocomplete-selected-remove {
    background: none;
    border: none;
    color: var(--slate-500);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s;
}

.autocomplete-selected-remove:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* ========================================
   Planning Reservations (barres continues)
   ======================================== */

.pcal-headers {
    display: grid;
    grid-template-columns: 120px repeat(14, 1fr);
    background: var(--slate-700);
}

.pcal-header {
    color: white;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    grid-column: span 2;
}

.pcal-header-label {
    font-size: 11px;
    text-align: left;
    padding-left: 10px;
    display: flex;
    align-items: center;
    grid-column: 1;
}

.pcal-week {
    display: grid;
    grid-template-columns: 120px repeat(14, 1fr);
    grid-auto-rows: auto;
    align-content: start;
    border-bottom: 1px solid var(--slate-200);
    position: relative;
}

.pcal-poste-label {
    grid-column: 1;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-700);
    background: var(--slate-50);
    display: flex;
    align-items: center;
    border-right: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-100);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pcal-poste-label-dayrow {
    background: white;
    border-bottom: 1px solid var(--slate-200);
}

.pcal-day {
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-500);
    text-decoration: none;
    border-right: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-200);
}

.pcal-day-out {
    color: var(--slate-300);
    background: var(--slate-50);
    cursor: default;
}

.pcal-day-today {
    color: var(--primary);
}

.pcal-today-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 12px;
}

.pcal-cell {
    border-right: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
    min-height: 32px;
    z-index: 1;
    text-decoration: none;
}

.pcal-cell:hover {
    background: #f0f9ff;
}

.pcal-cell-today {
    background: #eff6ff;
}

.pcal-cell-out {
    background: transparent;
}

.pcal-bar {
    display: block;
    padding: 2px 6px;
    margin: 4px 2px;
    font-size: 11px;
    line-height: 1.4;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-decoration: none;
    color: var(--slate-700);
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.pcal-bar:hover {
    filter: brightness(0.92);
    color: var(--slate-700);
}

.resa-chip-euro {
    font-size: 10px;
    font-weight: 700;
    margin-left: 2px;
}

@media (max-width: 768px) {
    .pcal-headers, .pcal-week {
        grid-template-columns: 80px repeat(14, 1fr);
    }

    .pcal-header {
        padding: 8px 2px;
        font-size: 11px;
    }

    .pcal-header-label {
        font-size: 10px;
        padding-left: 6px;
    }

    .pcal-poste-label {
        font-size: 9px;
        padding: 2px 4px;
    }

    .pcal-day {
        font-size: 11px;
        padding: 4px;
    }

    .pcal-cell {
        min-height: 26px;
    }

    .pcal-bar {
        font-size: 9px;
        padding: 1px 3px;
        margin: 2px 1px;
    }

    .pcal-today-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}
