/* =================================================================
   GLOBAL STYLES - Maison Marti
   Styles de base partagés entre Admin et Public
   ================================================================= */

/* Import de la police personnalisée du logo */
@font-face {
    font-family: 'Indira K';
    src: url('../fonts/Indira_K.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* =================================================================
   VARIABLES CSS
   ================================================================= */

:root {
    /* Couleurs principales */
    --primary-brown: #3d2617;
    --dark-roast: #5A2E1A;
    --accent-gold: #c9a66b;
    --accent-gold-hover: #b8954f;
    --cream: #FFEBD6;
    --off-white: #fafafa;

    /* Couleurs texte */
    --text-dark: #2c2c2c;
    --text-light: #666;
    --smoky-gray: #545454;

    /* Couleurs système */
    --white: #ffffff;
    --border: #e0e0e0;
    --border-light: #e8e8e8;    
    --shadow: rgba(0, 0, 0, 0.1);

    /* Admin */
    --admin-bg: #f8f9fa;

    /* Spécifiques */
    --dark-coffee: #5F1A12;
    --terracotta: #A34F2F;
    --chocolate: #3d2617;

    /* Font Titres */
    --font-title: 'Indira K', serif;
    
    /* Système d'espacement unifié */
    --space-xs: 0.5rem;      /* 8px */
    --space-sm: 0.75rem;     /* 12px */
    --space-md: 1rem;        /* 16px */
    --space-lg: 1.5rem;      /* 24px */
    --space-xl: 2rem;        /* 32px */
    --space-2xl: 3rem;       /* 48px */
    
    /* Border radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;
    
    /* Ombres */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* =================================================================
   RESET & BASE
   ================================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    /* line-height: 1.6; */
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================================================
   TYPOGRAPHIE
   ================================================================= */

h1, h2, h3 {
    font-family: 'Indira K', serif;
    font-weight: normal;
    letter-spacing: 0.5px;
    color: var(--text-dark);
}

img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
}

/* =================================================================
   CONTENEURS
   ================================================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================================================================
   BOUTONS
   ================================================================= */

.btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: 0px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease;
    border: 1px solid var(--primary-brown);
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(61, 38, 23, 0.3);
    background: transparent;
    color: var(--primary-brown);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.btn-secondary:hover {
    background: var(--accent-gold);
    color: white;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Bouton icon */
.btn-icon {
    background: #f0f0f0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-icon:hover {
    transform: scale(1.1);
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}

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

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.1s ease;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--terracotta);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

/* =================================================================
   BADGES & STATUTS
   ================================================================= */

.badge, .status {
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge-success, .status-actif {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-danger, .status-inactif {
    background: #ffebee;
    color: #c62828;
}

.badge-warning, .status-brouillon {
    background: #fff8e1;
    color: #f57c00;
}

/* Statuts de commande */
.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--cream);
    color: var(--chocolate);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

.status-badge.status-en_attente,
.status-badge.status-paiement_valide {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-preparation {
    background: #cfe2ff;
    color: #084298;
}

.status-badge.status-prete {
    background: #d1e7dd;
    color: #0f5132;
}

.status-badge.status-retiree,
.status-badge.status-livree,
.status-badge.status-completed {
    background: #4CAF50;
    color: white;
}

.status-badge.status-annulee {
    background: #f8d7da;
    color: #842029;
}

.status-badge.status-active {
    background: var(--terracotta);
    color: white;
}

/* =================================================================
   ALERTES
   ================================================================= */

.alert {
    --alert-bg: rgba(141, 115, 90, 0.12);
    --alert-border: rgba(141, 115, 90, 0.25);
    --alert-color: #4a3b2d;
    padding: var(--space-md) 1.25rem;
    border-radius: 0px;
    border: 1px solid var(--alert-border);
    background: var(--alert-bg);
    color: var(--alert-color);
    font-size: 0.95rem;
    line-height: 1.45;
}

.alert strong {
    font-weight: 600;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(0, 0, 0, 0.25);
}

.alert small {
    display: block;
    margin-top: 0.35rem;
    opacity: 0.85;
}

.alert-info {
    --alert-bg: rgba(141, 115, 90, 0.12);
    --alert-border: rgba(141, 115, 90, 0.25);
    --alert-color: #4a3b2d;
}

.alert-success {
    --alert-bg: rgba(71, 140, 86, 0.12);
    --alert-border: rgba(71, 140, 86, 0.24);
    --alert-color: #285535;
}

.alert-error {
    --alert-bg: rgba(203, 63, 63, 0.12);
    --alert-border: rgba(203, 63, 63, 0.24);
    --alert-color: #7a1f1f;
}

.alert-warning {
    --alert-bg: rgba(217, 168, 60, 0.15);
    --alert-border: rgba(217, 168, 60, 0.28);
    --alert-color: #6b4a13;
}

/* =================================================================
   ÉTATS VIDES
   ================================================================= */

.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    color: var(--text-light);
}

.empty-state h2 {
    margin-bottom: var(--space-md);
    color: var(--smoky-gray);
}

.empty-state p {
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* =================================================================
   RESPONSIVE - MOBILE
   ================================================================= */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        padding: 0 15px;
    }

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

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 0.875rem var(--space-md);
    }

    .btn {
        padding: var(--space-md) var(--space-xl);
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}
