/* =========================================
   VARIABLES GLOBALES
========================================= */
:root {
    --gold: #d4af37;
    --gold-light: #f3d56a;
    --text-color: #e0e0e0;
    
    /* Variables pour le Glassmorphism */
    --glass-bg: rgba(20, 20, 20, 0.4); /* Fond noir très transparent */
    --glass-border: rgba(212, 175, 55, 0.3); /* Bordure dorée transparente */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5); /* Ombre douce */
}
/* =========================================
   TYPOGRAPHIE
========================================= */
h1, h2, h3, h4, .logo a {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 1px;
}

/* On applique aussi Cinzel aux boutons pour le côté luxueux */
button, .btn-read, .btn-submit {
    font-family: 'Cinzel', serif;
    /* Reste des propriétés du bouton que tu as déjà... */
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    
    /* FOND TEMPORAIRE : Un dégradé mystique en attendant la 3D */
   /* background: linear-gradient(135deg, #050505 0%, #1a1025 50%, #050505 100%);
    */
    background:transparent;
    background-attachment: fixed;
    
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* =========================================
   LA MAGIE DU GLASSMORPHISM
========================================= */
/* On applique cette classe à tout ce qui doit ressembler à du verre */
nav, 
.form-container, 
.profil-card, 
.info-box, 
.checkout-main > div {
    background: var(--glass-bg);
    
    /* C'est ici que la magie opère : le flou d'arrière-plan */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* Pour Safari */
    
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Arrondis uniquement en bas pour le menu collé en haut */
    border-radius: 0 0 12px 12px; 
    border-top: none;
}

nav .logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav ul li a {
    font-weight: 500;
    letter-spacing: 1px;
}

/* =========================================
   FORMULAIRES ET INPUTS (Style verre sombre)
========================================= */
input, select, textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

/* =========================================
   BOUTONS
========================================= */
button, .btn-read, .btn-submit {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

button:hover, .btn-read:hover, .btn-submit:hover {
    background: var(--gold);
    color: #050505;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* =========================================
   TABLEAUX (Espace Admin & Profil)
========================================= */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

th, td {
    padding: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    text-align: left;
}

th {
    color: var(--gold);
    font-weight: normal;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Effet au survol des lignes de tableau */
tbody tr:hover td {
    background: rgba(212, 175, 55, 0.05);
}
/* =========================================
   RESPONSIVE DESIGN (Mobiles & Tablettes)
========================================= */
@media screen and (max-width: 768px) {
    /* 1. Le Menu : On empile le logo et les liens au lieu de les aligner */
    header nav {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
        text-align: center;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
    }

    /* 2. Les Formulaires : On passe de 2 colonnes à 1 seule colonne */
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-group, .btn-submit {
        grid-column: span 1 !important;
    }

    /* 3. Les Marges : On réduit les espaces vides sur les petits écrans */
    .admin-main, .profil-main, .checkout-main {
        padding: 1.5rem 10px;
    }

    /* 4. Les Tableaux : On force un ascenseur horizontal s'ils sont trop larges */
    .table-container, 
    div[style*="overflow-x: auto"] {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Défilement fluide sur mobile */
        border: 1px solid rgba(212, 175, 55, 0.2);
        border-radius: 8px;
    }

    /* 5. Les Cartes d'information (Détail commande, profil) */
    .info-box {
        flex-direction: column;
        gap: 20px;
        text-align: left !important;
    }
    .info-box div {
        text-align: left !important;
    }
}
/* =========================================
   CANVAS 3D BACKGROUND
========================================= */
#glcanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; 
    pointer-events: none; /* Empêche le canvas de bloquer les clics sur tes boutons */
}
/* Section Héro (au centre de l'écran, par-dessus le cristal 3D) */
.hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.glass-box {
    padding: 3rem;
    max-width: 600px;
}

/* Grille de produits */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.product-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
}
.glass-box { animation: fadeIn 2s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* =========================================
   ANIMATIONS DES CARTES PRODUITS
========================================= */
.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    overflow: hidden; /* Important pour que l'image ne déborde pas pendant le zoom */
    
    /* Animation fluide avec effet de léger rebond */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* L'Aura lumineuse au survol */
.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2), 0 0 20px rgba(155, 89, 182, 0.3);
    border-color: var(--gold);
}

/* L'image de la pierre à l'intérieur de la carte */
.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.6s ease; /* Zoom très lent et mystique */
}

/* Le zoom de l'image se déclenche quand on survole la carte */
.product-card:hover .product-image {
    transform: scale(1.1);
}
/* =========================================
   NOTIFICATIONS MAGIQUES (TOAST)
========================================= */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none; /* Pour ne pas bloquer les clics en dessous */
}

.toast {
    background: rgba(10, 5, 15, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    border-left: 5px solid var(--gold);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    
    /* Animation d'entrée */
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Classe ajoutée par le JavaScript pour afficher la notification */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}
/* 1. On sort le canvas de la cave (z-index à 0 au lieu de -1) */
#glcanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0; 
    pointer-events: none; /* Toujours important pour ne pas bloquer les clics */
}

/* 2. On s'assure que tout le reste du site (textes, boutons, cartes) passe bien AU-DESSUS du canvas */
main, header, footer {
    position: relative;
    z-index: 10;
}
