/* =======================================================
   GARCIA ELIXIR - CSS HAUTE COUTURE v19.5 (Platinum Pro)
   Propriété : SASU Garcia | Montpellier
   Design : Minimalisme Immersif, Luxe & Performance
   ======================================================= */

/* --- 1. RESET CRITIQUE & VARIABLES --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --c-bg: #fdfcfb;          /* Crème Lin */
    --c-stone: #1c1917;       /* Anthracite */
    --c-gold: #92400e;        /* Or Ambré */
    --c-border: rgba(28, 25, 23, 0.08);
    --f-serif: 'Cormorant Garamond', serif;
    --f-sans: 'Montserrat', sans-serif;
    --nav-height: 110px;      /* Protection contre la barre fixe */
    --ease-luxe: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--c-bg);
    color: var(--c-stone);
    font-family: var(--f-sans);
    line-height: 1.8;
    overflow-x: hidden;
}

/* SÉLECTION TEXTE LUXE */
::selection {
    background-color: var(--c-gold);
    color: #ffffff;
}

/* --- 2. NAVIGATION CRISTAL --- */
.nav-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 9999;
    background: rgba(253, 252, 251, 0.85); 
    backdrop-filter: blur(24px); 
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    transition: background 0.5s ease;
}

.nav-link {
    position: relative;
    transition: color 0.4s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--c-gold);
    transition: width 0.6s var(--ease-luxe);
    transform: translateX(-50%);
}

.nav-link:hover { color: var(--c-stone); }
.nav-link:hover::after { width: 100%; }

/* --- 3. STRUCTURE DES PAGES SPA --- */
main { width: 100%; margin-top: 0 !important; }

#page-home { height: 100vh; width: 100%; padding: 0 !important; }

.page-content:not(#page-home) {
    padding-top: var(--nav-height) !important;
    min-height: 100vh;
}

.page-content {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s var(--ease-luxe), transform 0.8s var(--ease-luxe);
}

.page-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInPage 1s var(--ease-luxe) forwards;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 4. ANIMATIONS D'ACCUEIL --- */
.scale-anim {
    animation: ultraSlowZoom 40s infinite alternate linear;
    transform-origin: center center;
}

@keyframes ultraSlowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.12); }
}

.reveal-text {
    opacity: 0;
    transform: translateY(40px);
    animation: textReveal 1.8s var(--ease-luxe) forwards;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.reveal-text:nth-child(1) { animation-delay: 0.3s; }
.reveal-text:nth-child(2) { animation-delay: 0.5s; }
.reveal-text:nth-child(3) { animation-delay: 0.7s; }
.reveal-text:nth-child(4) { animation-delay: 0.9s; }

@keyframes textReveal { to { opacity: 1; transform: translateY(0); } }

/* --- 5. ANIMATIONS TIROIR (PANIER & MODALS) --- */
#cart-modal:not(.hidden) .drawer-anim {
    transform: translateX(100%);
    animation: slideInRight 0.8s var(--ease-luxe) forwards;
}

@keyframes slideInRight { to { transform: translateX(0); } }

#admin-product-modal:not(.hidden) .drawer-anim,
#admin-promo-modal:not(.hidden) .drawer-anim {
    opacity: 0;
    transform: translateY(-40px) scale(0.98);
    animation: modalDrop 0.7s var(--ease-luxe) forwards;
}

@keyframes modalDrop { to { opacity: 1; transform: translateY(0) scale(1); } }

/* --- 6. FORMULAIRES & INPUTS --- */
.input-luxe {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--c-border);
    padding: 1.5rem 0;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    outline: none;
    transition: all 0.5s var(--ease-luxe);
    color: var(--c-stone);
}

.input-luxe::placeholder { color: #a8a29e; transition: color 0.3s; }

.input-luxe:focus { 
    border-bottom-color: var(--c-gold); 
    padding-left: 15px; 
    background: rgba(253, 252, 251, 0.5);
}

.input-luxe:focus::placeholder { color: transparent; }

/* Redesign complet du bouton d'Upload natif */
input[type="file"]::file-selector-button {
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-stone);
    padding: 0.8rem 1.5rem;
    font-family: var(--f-sans);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.5s var(--ease-luxe);
    margin-right: 20px;
}

input[type="file"]::file-selector-button:hover {
    background: var(--c-stone);
    color: white;
}

/* --- 7. ADMIN DASHBOARD SPÉCIFIQUES --- */
.admin-tab-btn.active-tab {
    color: var(--c-stone);
    border-left: 2px solid var(--c-gold);
    padding-left: 15px;
}

.admin-input-stock {
    width: 70px;
    text-align: center;
    border: 1px solid var(--c-border);
    padding: 8px;
    font-family: var(--f-sans);
    font-weight: bold;
    color: var(--c-stone);
    background: transparent;
    transition: all 0.4s ease;
}

.admin-input-stock:focus { border-color: var(--c-gold); outline: none; }

/* --- 8. FINITIONS (Scrollbar & Mobile) --- */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-gold); }

@media (max-width: 768px) {
    :root { --nav-height: 80px; }
    .reveal-text { text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6); }
}