/**
 * Style Espace Client - MyLittleJourneys
 * Responsive Mobile-First
 */

/* ===============================================
   VARIABLES CSS
   =============================================== */
:root {
    /* Couleurs primaires */
    --primary: #FF8C42;
    --primary-dark: #FF5101;
    --primary-light: #FFB67A;

    /* Couleurs de statut */
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #FF8C42;

    /* Couleurs chaudes (cohérentes avec le reste du site) */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #9ca3af;
    --gray-500: #9ca3af;
    --gray-600: #757575;
    --gray-700: #4B3D2A;
    --gray-800: #3A2D1E;
    --gray-900: #2F1503;

    /* Typographie */
    --font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border radius — arrondis généreux */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;

    /* Ombres chaudes */
    --shadow-sm: 0 1px 4px rgba(47,21,3,0.04);
    --shadow-md: 0 2px 16px rgba(47,21,3,0.07);
    --shadow-lg: 0 6px 24px rgba(47,21,3,0.11);
    --shadow-xl: 0 16px 40px rgba(47,21,3,0.14);
}

/* ===============================================
   RESET & BASE
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    background: #FFF8F0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

img {
    max-width: 100%;
    height: auto;
}

address {
    font-style: normal;
    line-height: 1.8;
}

/* ===============================================
   PAGE DE CONNEXION
   =============================================== */
.login-page {
    background: #1a1a2e;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.login-container {
    max-width: 400px;
    width: 100%;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0;
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-top: 8px;
}

.login-form {
    margin-bottom: var(--spacing-lg);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.login-form .form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.login-form .form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.login-form .btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.login-form .btn:hover {
    background: var(--primary-dark);
}

.login-footer {
    text-align: center;
}

.login-footer .text-muted {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-sm);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ===============================================
   HEADER
   =============================================== */
.customer-header {
    background: white;
    box-shadow: 0 2px 12px rgba(255,140,66,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid rgba(255,140,66,0.12);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header-logo .logo-img {
    height: 40px;
    width: auto;
    display: block;
}

/* Menu mobile toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99;
}
.nav-backdrop.active { display: block; }

/* Navigation panel */
.customer-nav {
    position: fixed;
    top: 0;
    right: -310px;
    width: 290px;
    height: 100vh;
    background: white;
    box-shadow: -6px 0 32px rgba(0,0,0,0.12);
    transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0.75rem 0.75rem;
    overflow-y: auto;
    z-index: 100;
}
.customer-nav.active { right: 0; }

/* Panel header */
.nav-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0.25rem 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--gray-100);
}
.nav-panel-logo { height: 32px; width: auto; }
.nav-close {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray-500);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.nav-close:hover { background: var(--gray-200); color: var(--gray-800); }

/* Nav links */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 0.875rem;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.nav-link:hover {
    background: #FFF3E8;
    color: var(--primary);
}
.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

/* Panel footer */
.nav-panel-foot {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nav-cta {
    display: block;
    text-align: center;
    padding: 0.8rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF8C42, #FF5101);
    color: white !important;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(255,130,1,0.28);
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255,130,1,0.4);
}
.nav-link-logout {
    color: var(--error);
    justify-content: center;
    font-size: 0.88rem;
}
.nav-link-logout:hover { background: #fee2e2; color: var(--error); }

/* ===============================================
   CONTAINER & LAYOUT
   =============================================== */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--spacing-md);
    flex: 1;
}

.page-header {
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.text-muted {
    color: var(--gray-600);
    font-size: 0.92rem;
}

/* ─── Labels de section (style account.php) ─── */
.sec-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(47,21,3,0.4);
    text-transform: uppercase;
    margin-bottom: 12px;
    margin-top: 32px;
}

/* ─── Carte douce (style account.php) ─── */
.account-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
    overflow: hidden;
    margin-bottom: 12px;
}

.card-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(47,21,3,0.05);
}
.card-row:last-child { border-bottom: none; }

.row-info { flex: 1; min-width: 0; }
.row-info strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #2F1503;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row-info small { font-size: 0.78rem; color: #9ca3af; }

.row-btns { display: flex; gap: 8px; flex-shrink: 0; }
.row-btns .btn { padding: 5px 12px; font-size: 0.78rem; border-radius: 20px; }

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

/* ===============================================
   FORMULAIRES
   =============================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid rgba(47,21,3,0.12);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.2s;
    background: white;
    color: var(--gray-900);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.12);
}

.form-group input:disabled {
    background: #FFF8F0;
    cursor: not-allowed;
    color: var(--gray-500);
    border-color: rgba(47,21,3,0.07);
}

.form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.required {
    color: var(--error);
}

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

.form-section {
    margin-bottom: var(--spacing-lg);
}

.form-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: rgba(47,21,3,0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(47,21,3,0.08);
}

.form-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--spacing-lg) 0;
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(47,21,3,0.07);
}

.form-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
}

/* ===============================================
   BOUTONS
   =============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 22px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #FF8C42, #FF5101);
    color: white;
    box-shadow: 0 3px 12px rgba(255,81,1,0.28);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(255,81,1,0.4);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 1.5px solid rgba(47,21,3,0.18);
}

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

.btn-ghost {
    background: transparent;
    color: #FF8201;
    border: 1.5px solid rgba(255,130,1,0.5);
    border-radius: 20px;
    padding: 5px 12px;
    font-family: var(--font-family);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: #FF8201; color: #FF5101; }

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    border-radius: 18px;
}

/* ===============================================
   BADGES
   =============================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.25rem;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-success-dark {
    background: #059669;
    color: white;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ===============================================
   ALERTES
   =============================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* ===============================================
   STATISTIQUES (Dashboard)
   =============================================== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===============================================
   ACTIONS RAPIDES
   =============================================== */
.quick-actions {
    margin-bottom: var(--spacing-xl);
}

.quick-actions h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.action-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(47,21,3,0.10);
}

.action-icon {
    font-size: 2rem;
}

.action-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.action-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===============================================
   COMMANDES
   =============================================== */
.recent-orders {
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
}

.link-primary {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.orders-list,
.orders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.order-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
    transition: all 0.2s;
}

.order-card:hover {
    box-shadow: 0 6px 24px rgba(47,21,3,0.10);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
    gap: var(--spacing-sm);
}

.order-number strong {
    font-weight: 600;
    color: var(--gray-900);
}

.order-info {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.order-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.order-card-full {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
    overflow: hidden;
}

.order-card-header {
    background: linear-gradient(135deg, #FF8C42, #FF5101);
    color: white;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.order-card-header h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.order-date {
    font-size: 0.875rem;
    opacity: 0.9;
}

.order-card-body {
    padding: var(--spacing-md);
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.order-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.detail-value {
    font-weight: 600;
    color: var(--gray-900);
}

.tracking-badge {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.order-card-footer {
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--gray-200);
}

/* ===============================================
   DÉTAIL COMMANDE
   =============================================== */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.breadcrumb a {
    color: var(--primary);
}

.timeline-card,
.tracking-card,
.info-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
    margin-bottom: var(--spacing-md);
}

.timeline-card h2,
.tracking-card h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--spacing-md);
}

.timeline-marker {
    position: absolute;
    left: -1.4rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--gray-300);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--gray-300);
}

.timeline-item.completed .timeline-marker {
    background: var(--success);
    box-shadow: 0 0 0 2px var(--success);
}

.timeline-item.active .timeline-marker {
    background: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 2px var(--primary);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 140, 66, 0.2);
    }
}

.timeline-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.tracking-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.tracking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.tracking-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.tracking-value {
    font-weight: 600;
    color: var(--gray-900);
}

.tracking-action {
    text-align: center;
}

.order-details-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.order-items-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
}

.order-items-card h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.items-list {
    margin-bottom: var(--spacing-md);
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.item-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.item-details {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.item-price {
    font-weight: 600;
    color: var(--gray-900);
}

.order-summary {
    border-top: 2px solid var(--gray-200);
    padding-top: var(--spacing-md);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    border-top: 2px solid var(--gray-200);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-md);
}

.summary-row.discount {
    color: var(--success);
}

.order-info-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--gray-900);
}

.order-actions-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}

/* ===============================================
   ÉTATS VIDES
   =============================================== */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(47,21,3,0.06);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: var(--spacing-md);
}

/* ===============================================
   SÉCURITÉ INFO
   =============================================== */
.security-info {
    background: #FFF8F0;
    border: 1.5px solid rgba(255,140,66,0.25);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.security-info h3 {
    font-size: 0.95rem;
    color: #2F1503;
    margin-bottom: var(--spacing-sm);
}

.security-info ul {
    list-style: none;
    padding-left: 0;
}

.security-info li {
    color: #6B5D4F;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.security-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #FF8C42;
    font-weight: 700;
}

/* ===============================================
   FOOTER
   =============================================== */
.customer-footer {
    background: #fff8f0;
    border-top: 1px solid rgba(47,21,3,0.07);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.footer-content {
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--primary);
    margin: 0 0.5rem;
    font-size: 0.85rem;
}

/* ===============================================
   GALERIE APERÇUS LIVRE
   =============================================== */
.book-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.preview-item {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    background: white;
}

.preview-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1rem 0.75rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Page texte avec bordure pointillée orange */
.preview-item.text-page {
    border: 2px dashed #FFB67A;
}

/* ===============================================
   FLIPBOOK - LIVRE VIRTUEL (MODAL)
   =============================================== */
.flipbook-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.flipbook-modal-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.flipbook-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s;
    line-height: 1;
    padding: 0 10px;
}

.flipbook-modal-close:hover {
    color: var(--primary-light);
}

.flipbook-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 140px);
}

#flipbook {
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#flipbook .page {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#flipbook .page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flipbook-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.flipbook-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    font-family: var(--font-family);
}

.flipbook-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.flipbook-btn:active {
    transform: translateY(0);
}

.flipbook-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-counter {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    text-align: center;
    min-width: 150px;
}

.page-counter #current-page {
    color: var(--primary-light);
    font-size: 1.2rem;
}

/* Responsive flipbook modal */
@media (max-width: 768px) {
    .flipbook-modal {
        padding: 10px;
    }

    .flipbook-modal-close {
        top: 5px;
        right: 10px;
        font-size: 40px;
    }

    .flipbook-wrapper {
        max-height: calc(100vh - 120px);
    }

    .flipbook-controls {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
        padding: 10px 15px;
    }

    .flipbook-btn {
        flex: 1;
        min-width: 100px;
        padding: 0.65rem 1rem;
        font-size: 0.875rem;
    }

    .flipbook-btn span {
        font-size: 1.2rem;
    }

    .page-counter {
        width: 100%;
        order: -1;
        margin-bottom: var(--spacing-xs);
        font-size: 0.875rem;
    }

    .page-counter #current-page {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .flipbook-wrapper {
        max-height: calc(100vh - 130px);
    }
}

/* Modal aperçu */
.preview-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.preview-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.preview-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.preview-modal-close:hover {
    color: var(--primary-light);
}

.preview-modal-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: var(--spacing-md);
    text-align: center;
}

/* ===============================================
   RESPONSIVE - TABLETTE (768px+)
   =============================================== */
@media (min-width: 768px) {
    .container {
        padding: var(--spacing-lg) var(--spacing-xl);
    }

    .mobile-menu-toggle {
        display: none;
    }

    .customer-nav {
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        gap: 0.25rem;
    }

    .nav-panel-head,
    .nav-panel-foot {
        display: none;
    }

    .nav-link {
        padding: 0.45rem 0.875rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .book-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===============================================
   RESPONSIVE - DESKTOP (1024px+)
   =============================================== */
@media (min-width: 1024px) {
    .page-header h1 {
        font-size: 2rem;
    }

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

    .action-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .orders-grid {
        grid-template-columns: 1fr;
    }

    .order-details-layout {
        grid-template-columns: 2fr 1fr;
    }

    .form-actions {
        justify-content: flex-end;
    }

    .book-preview-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .digital-promo-card {
        flex-direction: row;
        align-items: center;
    }

    .digital-promo-action {
        min-width: 200px;
        text-align: center;
    }

    .share-modal-content {
        max-width: 480px;
    }
}

/* ===============================================
   LIVRE NUMERIQUE - BOUTONS D'ACTION
   =============================================== */
.digital-book-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===============================================
   CARTE PROMO LIVRE NUMERIQUE
   =============================================== */
.digital-promo-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    border: 2px solid var(--primary-light);
    position: relative;
    overflow: hidden;
}

.digital-promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.digital-promo-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.digital-promo-content h3 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.digital-promo-content p {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.digital-promo-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.digital-promo-features li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.digital-promo-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.digital-promo-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-sm);
}

/* ===============================================
   MODAL PARTAGE PAR EMAIL
   =============================================== */
.share-modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.share-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: shareModalFadeIn 0.2s ease-out;
}

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

.share-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: var(--gray-700);
}

.share-modal-content h3 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.share-form-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-md);
}

.share-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

.share-message-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 3px solid var(--success);
}

.share-message-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid var(--error);
}

/* Livres prêts à commander */
.pending-books {
    margin-bottom: var(--spacing-xl);
}

.pending-books-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.pending-book-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: linear-gradient(135deg, #FFF8F0 0%, #FFF3E0 100%);
    border: 2px solid #FF8C42;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.pending-book-cover {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    overflow: hidden;
    max-width: 70px;
    max-height: 70px;
}

.pending-book-cover img {
    width: 70px;
    height: 70px;
    max-width: 70px;
    max-height: 70px;
    object-fit: cover;
    display: block;
}

.pending-book-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: #FFE0B2;
}

.pending-book-info {
    flex: 1;
    min-width: 0;
}

.pending-book-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-book-date {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-sm);
}

.pending-book-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}
