/**
 * ArchaeoFood - Améliorations CSS Globales
 * Fichier à inclure dans le layout principal pour appliquer les améliorations
 */

/* ============================================
   1. VARIABLES CSS (Design System)
   ============================================ */
:root {
    /* Couleurs principales */
    --color-primary: #c99400;
    --color-primary-dark: #a07800;
    --color-primary-light: #f0b515;
    --color-secondary: #f8f4ec;
    --color-accent: #708090;
    --color-text: #3a2e2e;
    --color-text-light: #6b5e5e;
    --color-background: #f8f4ec;
    
    /* Couleurs système */
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-info: #17a2b8;
    
    /* Espacements (système 8pt) */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 1.5rem;    /* 24px */
    --spacing-lg: 2rem;      /* 32px */
    --spacing-xl: 3rem;      /* 48px */
    --spacing-xxl: 4rem;     /* 64px */
    
    /* Bordures */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 15px;
    --radius-full: 9999px;
    
    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-primary: 'Arial', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-mono: 'Courier New', monospace;
}

/* ============================================
   2. TYPOGRAPHIE AMÉLIORÉE
   ============================================ */
body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ============================================
   3. BOUTONS AMÉLIORÉS
   ============================================ */
.btn-primary-enhanced {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-primary-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left var(--transition-slow);
}

.btn-primary-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary-enhanced:hover::before {
    left: 100%;
}

.btn-primary-enhanced:active {
    transform: translateY(0);
}

.btn-secondary-enhanced {
    background: white;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-secondary-enhanced:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   4. CARTES (CARDS) AMÉLIORÉES
   ============================================ */
.card-enhanced {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.card-enhanced:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-enhanced-header {
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--color-secondary);
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

.card-enhanced-body {
    padding: var(--spacing-md);
}

.card-enhanced-footer {
    padding: var(--spacing-md);
    background: var(--color-secondary);
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* ============================================
   5. FORMULAIRES AMÉLIORÉS
   ============================================ */
.form-control-enhanced {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.form-control-enhanced:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(201, 148, 0, 0.1);
    outline: none;
}

.form-label-enhanced {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-enhanced {
    margin-bottom: var(--spacing-md);
}

/* ============================================
   6. BADGES & TAGS
   ============================================ */
.badge-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.badge-enhanced-primary {
    background: var(--color-primary);
    color: white;
}

.badge-enhanced-secondary {
    background: var(--color-secondary);
    color: var(--color-text);
}

.badge-enhanced-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-enhanced-warning {
    background: #fff3e0;
    color: #e65100;
}

.badge-enhanced-info {
    background: #e3f2fd;
    color: #1976d2;
}

/* ============================================
   7. TOOLTIPS PERSONNALISÉS
   ============================================ */
.tooltip-enhanced {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.tooltip-enhanced::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: all var(--transition-normal);
}

.tooltip-enhanced:hover::after,
.tooltip-enhanced:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   8. LOADING STATES (Skeletons)
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-image {
    height: 200px;
    margin-bottom: 1rem;
}

/* ============================================
   9. TOAST NOTIFICATIONS
   ============================================ */
.toast-container-enhanced {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    max-width: 400px;
}

.toast-enhanced {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-enhanced-success {
    border-left: 4px solid var(--color-success);
}

.toast-enhanced-error {
    border-left: 4px solid var(--color-danger);
}

.toast-enhanced-warning {
    border-left: 4px solid var(--color-warning);
}

.toast-enhanced-info {
    border-left: 4px solid var(--color-info);
}

.toast-enhanced-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-enhanced-content {
    flex: 1;
}

.toast-enhanced-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-enhanced-message {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.toast-enhanced-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.toast-enhanced-close:hover {
    opacity: 1;
}

/* ============================================
   10. ANIMATIONS UTILITAIRES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.zoom-in {
    animation: zoomIn 0.4s ease-out;
}

/* ============================================
   11. BREADCRUMB AMÉLIORÉ
   ============================================ */
.breadcrumb-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.breadcrumb-enhanced-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-enhanced-item:hover {
    color: var(--color-primary);
}

.breadcrumb-enhanced-item.active {
    color: var(--color-text);
    font-weight: 600;
}

.breadcrumb-enhanced-separator {
    color: var(--color-text-light);
    opacity: 0.5;
}

/* ============================================
   12. RESPONSIVE UTILITIES
   ============================================ */
.hide-mobile {
    @media (max-width: 768px) {
        display: none !important;
    }
}

.hide-desktop {
    @media (min-width: 769px) {
        display: none !important;
    }
}

.stack-mobile {
    @media (max-width: 768px) {
        flex-direction: column !important;
    }
}

/* ============================================
   13. ACCESSIBILITY
   ============================================ */
.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;
}

.focus-visible:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================
   14. PRINT STYLES
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card-enhanced {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================
   15. DARK MODE SUPPORT (Optionnel)
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #1a1a1a;
        --color-text: #e0e0e0;
        --color-text-light: #b0b0b0;
    }
    
    .card-enhanced {
        background: #2a2a2a;
        border-color: rgba(255,255,255,0.1);
    }
    
    .form-control-enhanced {
        background: #2a2a2a;
        border-color: rgba(255,255,255,0.1);
        color: var(--color-text);
    }
}

