/* assets/css/style.css */
/* Styles CSS pour DOH'SOHLA - Version avec corrections documents */

:root {
    /* Couleurs principales */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0891b2;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --white: #ffffff;
    
    /* Couleurs grises */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Couleurs spéciales DOH'SOHLA */
    --doh-orange: #f97316;
    --doh-green: #22c55e;
    --doh-blue: #3b82f6;
    --doh-purple: #8b5cf6;
    
    /* Dimensions */
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typographie */
    --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
}

/* Reset et base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

/* =================================
   HEADER STYLES
   ================================= */

.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo et brand */
.header-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.header-brand .brand-link:hover {
    transform: scale(1.05);
}

.brand-logo {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.brand-text .brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.brand-text .brand-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1;
}

/* Barre de recherche */
.header-search {
    flex: 1;
    max-width: 600px;
}

.search-input-group {
    display: flex;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.875rem 1.25rem;
    font-size: var(--font-size-base);
    outline: none;
    background: transparent;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-button {
    background: var(--doh-orange);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background: #ea580c;
    transform: translateX(-2px);
}

/* Actions utilisateur */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-user {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-user:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.user-avatar {
    font-size: 1.5rem;
}

.user-info {
    text-align: left;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
}

.user-type {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.auth-buttons .btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.auth-buttons .btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

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

/* =================================
   NAVIGATION STYLES
   ================================= */

.main-navigation {
    background: white;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

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

.nav-sections {
    display: flex;
    gap: 2rem;
}

.nav-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-600);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav-section:hover {
    color: var(--primary-color);
    background: var(--gray-100);
    transform: translateY(-2px);
}

.nav-section.active {
    color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.nav-section.active::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--primary-color);
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.nav-actions .btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}

.nav-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =================================
   BANNIÈRE PUBLICITAIRE
   ================================= */

.advertising-banner {
    background: linear-gradient(45deg, var(--doh-orange), var(--doh-green));
    color: white;
    padding: 1rem 0;
    overflow: hidden;
    position: relative;
}

.banner-slider {
    position: relative;
    height: 60px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
    transform: translateY(0);
}

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

.banner-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.banner-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

/* =================================
   ANNONCES DÉFILANTES
   ================================= */

.scrolling-announcements {
    background: var(--gray-800);
    color: white;
    padding: 0.75rem 0;
    overflow: hidden;
}

.announcement-ticker {
    white-space: nowrap;
    overflow: hidden;
}

.announcement-content {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
}

.announcement-item {
    display: inline-block;
    margin-right: 3rem;
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* =================================
   CONTENU PRINCIPAL
   ================================= */

.main-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.content-section {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
    transition: var(--transition);
}

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

.section-header {
    background: linear-gradient(135deg, var(--gray-50), white);
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.section-actions .btn {
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.section-body {
    padding: 1.5rem;
}

.section-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* =================================
   SECTION LIVREURS
   ================================= */

.livreurs-section .section-title i {
    color: var(--doh-blue);
}

.livreurs-grid {
    display: grid;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.livreur-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: white;
}

.livreur-card:hover {
    border-color: var(--doh-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.livreur-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--doh-blue), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.online {
    background: var(--success-color);
}

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

.livreur-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--gray-800);
}

.livreur-location {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.livreur-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars {
    display: flex;
    gap: 1px;
}

.stars i {
    font-size: 0.75rem;
    color: var(--gray-300);
}

.stars i.rated {
    color: var(--warning-color);
}

.rating-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}

.livreur-vehicle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.livreur-actions {
    flex-shrink: 0;
}

.livreur-actions .btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* =================================
   SECTION SERVICES
   ================================= */

.services-section .section-title i {
    color: var(--doh-green);
}

.services-grid {
    display: grid;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: white;
}

.service-card:hover {
    border-color: var(--doh-green);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--gray-100);
    flex-shrink: 0;
}

.service-content {
    flex: 1;
    min-width: 0;
}

.service-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--gray-800);
}

.service-description {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin: 0 0 0.5rem 0;
}

.service-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--doh-green);
}

.service-actions {
    flex-shrink: 0;
}

.service-actions .btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =================================
   SECTION PUBLICITÉS
   ================================= */

.advertising-section .section-title i {
    color: var(--doh-orange);
}

.media-section {
    margin-bottom: 2rem;
}

.media-section:last-child {
    margin-bottom: 0;
}

.media-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.media-title i {
    color: var(--doh-orange);
}

/* Vidéos */
.video-grid {
    display: grid;
    gap: 1rem;
}

.video-item {
    cursor: pointer;
    transition: var(--transition);
}

.video-item:hover {
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--gray-200);
    margin-bottom: 0.5rem;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    color: white;
    font-size: 2rem;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.video-item:hover .video-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-800);
    font-size: 1.25rem;
    transform: scale(0.8);
    transition: var(--transition);
}

.video-item:hover .play-button {
    transform: scale(1);
}

.video-info h6 {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--gray-800);
}

.video-info p {
    font-size: 0.7rem;
    color: var(--gray-600);
    margin: 0;
}

/* Images */
.images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.image-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
    color: var(--gray-600);
    font-size: 1.5rem;
    text-align: center;
}

.image-placeholder span {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* =================================
   DOCUMENTS JUSTIFICATIFS - NOUVEAU
   ================================= */

.document-upload-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    position: relative;
}

.document-capture-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    min-height: 200px;
}

.document-capture-zone:hover {
    border-color: #007bff;
    background-color: #f8f9ff;
}

.document-capture-zone.completed {
    border-color: #28a745;
    background-color: #d4edda;
}

.document-capture-zone.pending-validation {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.document-capture-zone.validated {
    border-color: #28a745;
    background-color: #d4edda;
}

.capture-container {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-placeholder {
    text-align: center;
    padding: 30px;
    width: 100%;
}

.capture-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.capture-buttons .btn {
    min-width: 140px;
    padding: 10px 20px;
    font-weight: 600;
}

.image-preview {
    position: relative;
    text-align: center;
    width: 100%;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.image-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Modal caméra amélioré */
#cameraModal {
    z-index: 9999 !important;
}

#cameraModal .modal-dialog {
    max-width: 90vw;
    margin: 1.75rem auto;
}

#cameraModal .modal-content {
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#cameraModal .modal-body {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

#camera-stream {
    width: 100%;
    max-width: 600px;
    height: auto;
    min-height: 300px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    background: #000;
    /* CORRECTION: Assurer la visibilité totale */
    opacity: 1 !important;
    filter: none !important;
    z-index: 1000;
    display: block !important;
    position: relative;
    margin: 0 auto;
}

#camera-canvas {
    display: none !important;
}

/* Contrôles caméra */
.modal-body .mt-3 {
    margin-top: 20px !important;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-body .btn {
    /* CORRECTION: Forcer l'interactivité des boutons */
    pointer-events: auto !important;
    z-index: 1001 !important;
    position: relative !important;
    user-select: none;
    cursor: pointer !important;
}

#capture-button {
    font-size: 1.3rem;
    padding: 15px 30px;
    min-width: 180px;
    font-weight: 700;
    /* CORRECTION: Styles forcés pour visibilité */
    opacity: 1 !important;
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: 2px solid #28a745 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

#capture-button:hover,
#capture-button:focus,
#capture-button:active {
    background: linear-gradient(135deg, #218838, #1e7e34) !important;
    border-color: #1e7e34 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

#capture-button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Bouton annuler */
.modal-body .btn-secondary {
    padding: 15px 25px;
    font-weight: 600;
    border: 2px solid #6c757d;
    transition: all 0.3s ease;
}

.modal-body .btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    transform: translateY(-1px);
}

/* Indicateur de progression d'upload */
.upload-progress {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid #dee2e6;
    z-index: 100;
}

.upload-progress.success {
    background: rgba(212, 237, 218, 0.95);
    border-color: #28a745;
    color: #155724;
}

.upload-progress.error {
    background: rgba(248, 215, 218, 0.95);
    border-color: #dc3545;
    color: #721c24;
}

/* États des zones de capture */
.document-capture-zone.uploading {
    border-color: #007bff;
    background: linear-gradient(45deg, #f8f9ff, #e3f2fd);
    position: relative;
}

.document-capture-zone.uploading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
    background-size: 200% 100%;
    animation: loading-wave 2s infinite;
}

@keyframes loading-wave {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Corrections pour les inputs cachés */
input[type="file"] {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Amélioration visuelle des boutons d'action image */
.image-actions .btn {
    min-width: 100px;
    font-weight: 600;
    border-radius: 25px;
}

.image-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
}

.image-actions .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

/* Animation d'apparition des zones de capture */
.document-capture-zone {
    animation: slideInUp 0.5s ease-out;
}

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

/* =================================
   FOOTER STYLES
   ================================= */

.main-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    margin-top: 3rem;
}

.footer-content {
    padding: 3rem 0 2rem;
}

.footer-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.footer-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-brand .brand-logo {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.footer-brand .brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-link.facebook { background: #1877f2; color: white; }
.social-link.twitter { background: #1da1f2; color: white; }
.social-link.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }
.social-link.linkedin { background: #0077b5; color: white; }
.social-link.whatsapp { background: #25d366; color: white; }

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-links a i {
    color: var(--primary-color);
    width: 20px;
}

/* Contact et Newsletter */
.contact-info {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.contact-item i {
    width: 20px;
    color: var(--primary-color);
    text-align: center;
}

.newsletter-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.newsletter-description {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.newsletter-form .input-group {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.newsletter-form .form-control {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1rem;
}

.newsletter-form .form-control::placeholder {
    color: var(--gray-400);
}

.newsletter-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    color: white;
}

/* Moyens de paiement */
.payment-methods-section {
    padding: 2rem 0;
    border-top: 1px solid var(--gray-700);
    border-bottom: 1px solid var(--gray-700);
}

.payment-title,
.download-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.payment-method:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.payment-logo {
    height: 25px;
    width: auto;
}

.payment-icon {
    font-size: 1.5rem;
    color: white;
}

.payment-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

/* Téléchargement d'apps */
.download-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.download-btn {
    display: block;
    transition: var(--transition);
}

.download-btn:hover {
    transform: translateY(-2px);
}

.download-img {
    height: 40px;
    width: auto;
}

/* Footer bottom */
.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid var(--gray-700);
}

.copyright p {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin: 0;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.legal-links a {
    font-size: 0.85rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

.legal-links a:hover {
    color: white;
}

/* =================================
   BOUTON RETOUR EN HAUT
   ================================= */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
}

/* =================================
   MESSAGES FLASH
   ================================= */

.flash-messages {
    padding: 1rem 0;
    background: var(--gray-50);
}

.flash-messages .alert {
    border: none;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.flash-messages .alert-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-left-color: var(--success-color);
}

.flash-messages .alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #991b1b;
    border-left-color: var(--danger-color);
}

.flash-messages .alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fed7aa);
    color: #92400e;
    border-left-color: var(--warning-color);
}

.flash-messages .alert-info {
    background: linear-gradient(135deg, #f0f9ff, #bae6fd);
    color: #1e40af;
    border-left-color: var(--info-color);
}

/* =================================
   INDICATEUR DE CHARGEMENT
   ================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-text {
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

/* =================================
   MODALES
   ================================= */

.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
    font-weight: 700;
    color: var(--gray-800);
}

.modal-body {
    padding: 2rem;
}

/* =================================
   BOUTONS PERSONNALISÉS
   ================================= */

.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #047857);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    color: white;
}

.btn-outline-success {
    border: 2px solid var(--success-color);
    color: var(--success-color);
    background: transparent;
}

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

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #c2410c);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #c2410c, #9a3412);
    color: white;
}

.btn-outline-warning {
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
    background: transparent;
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

/* =================================
   FORMULAIRES
   ================================= */

.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: var(--font-size-base);
    transition: var(--transition);
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

/* Améliorations responsive pour documents */
@media (max-width: 768px) {
    #cameraModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    #camera-stream {
        min-height: 250px;
    }
    
    #capture-button {
        font-size: 1.1rem;
        padding: 12px 20px;
        min-width: 150px;
    }
    
    .capture-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .capture-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .document-upload-section {
        padding: 15px;
    }
    
    .document-capture-zone {
        padding: 15px;
        min-height: 180px;
    }
    
    .capture-placeholder {
        padding: 20px;
    }
    
    .capture-placeholder i {
        font-size: 2rem !important;
    }
    
    .capture-placeholder h6 {
        font-size: 1rem;
    }
    
    .capture-placeholder p {
        font-size: 0.85rem;
    }
}

@media (max-width: 1200px) {
    .header-content {
        gap: 1.5rem;
    }
    
    .nav-sections {
        gap: 1.5rem;
    }
    
    .nav-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-search {
        order: -1;
        width: 100%;
        max-width: none;
    }
    
    .nav-sections {
        gap: 1rem;
    }
    
    .nav-section {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-label {
        display: none;
    }
    
    .nav-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .footer-content {
        padding: 2rem 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        gap: 0.75rem;
    }
    
    .brand-text .brand-title {
        font-size: 1.25rem;
    }
    
    .brand-text .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .search-input,
    .search-button {
        padding: 0.75rem 1rem;
    }
    
    .search-button span {
        display: none;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-sections {
        order: 2;
        width: 100%;
        justify-content: space-around;
    }
    
    .nav-actions {
        order: 1;
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .section-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .section-body {
        padding: 1rem;
    }
    
    .section-footer {
        padding: 0.75rem 1rem;
    }
    
    .livreurs-grid,
    .services-grid {
        max-height: 400px;
    }
    
    .livreur-card,
    .service-card {
        padding: 0.75rem;
    }
    
    .images-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .payment-methods {
        gap: 0.5rem;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom .row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .search-input {
        font-size: 0.9rem;
    }
    
    .announcement-item {
        font-size: 0.8rem;
        margin-right: 2rem;
    }
    
    .nav-sections {
        gap: 0.5rem;
    }
    
    .nav-section {
        padding: 0.5rem;
        min-width: 60px;
    }
    
    .nav-icon {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .section-title i {
        font-size: 1.1rem;
    }
    
    .livreur-card,
    .service-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .livreur-info,
    .service-content {
        text-align: center;
    }
    
    .images-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .payment-methods {
        justify-content: center;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* =================================
   ANIMATIONS
   ================================= */

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* =================================
   UTILITAIRES
   ================================= */

.text-muted {
    color: var(--gray-500) !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color), #047857) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.border-radius {
    border-radius: var(--border-radius) !important;
}

.border-radius-lg {
    border-radius: var(--border-radius-lg) !important;
}

/* =================================
   PRINT STYLES
   ================================= */

@media print {
    .main-header,
    .main-navigation,
    .advertising-banner,
    .scrolling-announcements,
    .section-actions,
    .back-to-top,
    .flash-messages,
    #loadingIndicator {
        display: none !important;
    }
    
    .content-section {
        box-shadow: none !important;
        border: 1px solid var(--gray-300) !important;
        page-break-inside: avoid;
    }
    
    .main-footer {
        background: white !important;
        color: var(--gray-800) !important;
    }
    
    body {
        background: white !important;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}