/* =========================================
   VARIABLES & BASE
   ========================================= */
:root {
    --pink: #ff2a85;
    --purple: #8a2be2;
    --dark: #0a0514;
    --surface: rgba(255, 255, 255, 0.05);
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --btn-grad: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
    --btn-glow: 0 0 15px rgba(255, 42, 133, 0.4);
    --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--dark);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    line-height: 1.6;
}
/* =========================================
   BOUTONS PREMIUM
   ========================================= */
button, .btn-submit, .btn-explore, .btn-add-cart, .btn-info, .btn-checkout {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    padding: 14px 22px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}

/* Style spécifique pour le bouton Vider le panier */
.btn-clear {
    background: #800020; /* Rouge bordeaux / Lie de vin */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

.btn-clear:hover {
    background: #a50021; /* Un rouge un peu plus vif au survol */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(128, 0, 32, 0.5);
    color: white;
}
.btn-explore, .btn-add-cart, .btn-checkout, .btn-submit {
    background: var(--btn-grad);
    box-shadow: var(--btn-glow);
}
.btn-explore:hover, .btn-add-cart:hover, .btn-checkout:hover, .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 42, 133, 0.6);
}
.btn-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}
.btn-info:hover { border-color: var(--pink); color: var(--pink); }
.btn-disabled {
    background: #222 !important;
    color: #555 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}
/* =========================================
   NAVIGATION & HERO
   ========================================= */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(10, 5, 20, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-container { max-width: 1200px; margin: 0 auto; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-size: 1.5rem; text-decoration: none; font-weight: 700; color: var(--pink); }
.nav-links a { color: var(--text-main); text-decoration: none; margin-left: 20px; font-size: 0.8rem; text-transform: uppercase; opacity: 0.7; }
.hero {
    height: 85vh; display: flex; align-items: center; justify-content: center; text-align: center;
    background: radial-gradient(circle at center, #1f0d3d 0%, var(--dark) 100%);
    padding: 20px;
}
.main-title { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem, 6vw, 5rem); margin: 0; }
.neon-pink { color: #fff; text-shadow: 0 0 10px var(--pink), 0 0 20px var(--pink); }
.hero-badge { display: inline-block; padding: 6px 15px; border: 1px solid var(--purple); border-radius: 50px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; }
.hero-tagline { font-weight: 300; font-style: italic; font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }
/* =========================================
   BOUTIQUE (CARDS & SCROLL)
   ========================================= */
.section-oeuvres { padding: 80px 0; }
.scroll-container { display: flex; overflow-x: auto; gap: 25px; padding: 20px 40px 40px; scroll-snap-type: x mandatory; }
.scroll-container::-webkit-scrollbar { height: 6px; }
.scroll-container::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 10px; }
.card-oeuvre {
    flex: 0 0 280px; background: var(--surface); border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05); transition: 0.4s;
    display: flex; flex-direction: column;
}
.card-oeuvre:hover { transform: translateY(-10px); border-color: var(--pink); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.img-container { height: 280px; padding: 20px; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.2); border-radius: 20px 20px 0 0; }
.img-container img { max-height: 100%; border-radius: 5px; box-shadow: 0 10px 20px rgba(0,0,0,0.4); }
.card-body { padding: 20px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.price-tag { color: var(--pink); font-weight: bold; font-size: 1.2rem; margin: 10px 0; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* =========================================
   MODALS (SYSTÈME COMPLET)
   ========================================= */
.custom-modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; 
    width: 100%; height: 100%; background: rgba(0,0,0,0.92);
    align-items: center; justify-content: center; backdrop-filter: blur(12px);
    padding: 20px;
}
.modal-content {
    background: #111; padding: 35px; width: 100%; max-width: 750px;
    border-radius: 25px; border: 1px solid var(--purple); position: relative;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 0 50px rgba(138, 43, 226, 0.2);
}
.modal-content.large { max-width: 950px; }
.close { position: absolute; right: 25px; top: 20px; font-size: 1.8rem; cursor: pointer; color: #fff; opacity: 0.5; transition: 0.3s; z-index: 10; }
.close:hover { opacity: 1; color: var(--pink); }
/* Détails Modal Grid */
.details-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
.details-img img { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
/* Panier Floating Button */
#cart-floating-btn {
    position: fixed; bottom: 30px; right: 30px; width: 65px; height: 65px;
    background: var(--btn-grad); border-radius: 50%; display: flex;
    align-items: center; justify-content: center; color: white;
    font-size: 1.5rem; cursor: pointer; z-index: 1500;
    box-shadow: 0 0 30px rgba(255, 42, 133, 0.5); border: 2px solid rgba(255,255,255,0.2);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#cart-count {
    position: absolute; top: -5px; right: -5px; background: #fff;
    color: var(--pink); width: 26px; height: 26px; border-radius: 50%;
    font-size: 0.8rem; font-weight: bold; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
/* Items Panier */
.cart-item { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.item-info { flex-grow: 1; }
.item-qty { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.4); padding: 6px 12px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1); }
.item-qty button { width: 28px; height: 28px; padding: 0; background: var(--surface); border-radius: 50%; color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-del { background: rgba(255, 68, 68, 0.1); color: #ff4444; width: 40px; height: 40px; border-radius: 12px; }
/* =========================================
   FORMULAIRES & MONDIAL RELAY
   ========================================= */
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.form-control {
    width: 100%; padding: 16px; background: #000; border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius); color: #fff; font-family: inherit; font-size: 1rem;
    transition: 0.3s;
}
.form-control:focus { border-color: var(--pink); outline: none; box-shadow: 0 0 10px rgba(255, 42, 133, 0.2); }
/* Mondial Relay Modal Fix */
#modalRelais { z-index: 3000; } /* Toujours au dessus de checkout */
#Zone_Widget { width: 100% !important; border-radius: 15px; overflow: hidden; min-height: 500px; background: #fff; }
/* =========================================
   MOBILE ADAPTATION (OPTIMISÉE MODALS)
   ========================================= */
@media (max-width: 768px) {
    .nav-container { padding: 12px 15px; }
    .hero { height: 75vh; }
    .scroll-container { padding: 15px; gap: 15px; }
    .card-oeuvre { flex: 0 0 260px; }
    /* --- MODALS MOBILE (Floating Style) --- */
    .custom-modal {
        padding: 15px; /* Marge extérieure pour que le modal ne touche pas les bords */
        align-items: center; /* Centre verticalement */
    }
    /* On cible les modals SAUF celui du Mondial Relay */
    .custom-modal:not(#modalRelais) .modal-content {
        padding: 25px 20px;
        border-radius: 20px;
        max-height: 80vh; /* Prend 80% de l'écran max au lieu de 95% */
        width: 100%;
        box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    }
    /* Ajustement des textes internes pour gagner de la place */
    .details-grid { 
        grid-template-columns: 1fr; 
        gap: 15px; 
        text-align: center; 
    }
    .details-img { 
        max-width: 150px; /* Image plus petite sur mobile */
        margin: 0 auto; 
    }
    .details-txt h2 { font-size: 1.3rem; }
    .details-txt p { font-size: 0.85rem; line-height: 1.4; }
    .form-grid-2 { grid-template-columns: 1fr !important; gap: 5px !important; }
    .cart-item { gap: 10px; padding: 10px 0; }
    .cart-item img { width: 45px; height: 60px; }
    .item-info h4 { font-size: 0.9rem; margin-bottom: 2px; }
    /* Bouton flottant ajusté */
    #cart-floating-btn { width: 55px; height: 55px; bottom: 20px; right: 20px; font-size: 1.2rem; }
    /* Boutons plus compacts sur mobile */
    button, .btn-submit, .btn-info { padding: 12px 15px; font-size: 0.7rem; }
}
/* On garde le modal Relay très large car le widget en a besoin */
#modalRelais .modal-content {
    width: 100%;
    height: auto;
    max-height: 90vh;
    padding: 15px;
}
/* =========================================
   FOOTER DISCRET & CENTRÉ
   ========================================= */
footer {
    padding: 60px 20px 40px; /* Plus d'espace au-dessus pour décoller du contenu */
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Ligne de séparation très fine */
    margin-top: 50px;
}
footer p {
    margin: 0 0 10px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.admin-link {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.3; /* Très discret par défaut */
    transition: all 0.3s ease;
}
.admin-link:hover {
    opacity: 1; /* Devient visible au survol */
    color: var(--pink);
}
/* =========================================
   EFFETS SPÉCIAUX (HARMONIE)
   ========================================= */
/* 1. Animation du fond du menu */
.nav-bg-animation {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.1), transparent);
    background-size: 200% 100%;
    animation: moveGradient 8s linear infinite;
    z-index: -1;
}
@keyframes moveGradient {
    0% { background-position: 100% 0%; }
    100% { background-position: -100% 0%; }
}
/* 2. Livres flottants dans le Header */
.floating-books {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.floating-books i {
    position: absolute;
    font-size: 2.5rem;
    color: var(--pink);
    opacity: 0.1; /* Très discret */
    animation: floatAnim 15s linear infinite;
}
@keyframes floatAnim {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.1; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
/* 3. Effet de bordure magique (Border Glow) */
.border-glow {
    position: relative;
    padding: 2px; /* Largeur de la bordure */
    overflow: hidden;
    border-radius: 50px; /* Par défaut arrondi pour les badges */
    display: inline-block;
}
/* On adapte pour le titre H2 qui est moins arrondi */
h2.border-glow { border-radius: 15px; padding: 3px; margin: 0 auto; }
.border-glow::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(transparent, var(--pink), var(--purple), transparent 30%);
    animation: rotateBorder 4s linear infinite;
}
/* Le contenu au dessus de l'animation */
.border-glow span {
    position: relative;
    z-index: 1;
    background: var(--dark); /* Cache l'intérieur pour ne laisser que le bord */
    display: block;
    padding: 10px 25px;
    border-radius: inherit;
    color: white;
}
@keyframes rotateBorder {
    100% { transform: rotate(360deg); }
}
/* Harmonisation du Hero */
.hero { position: relative; overflow: hidden; }
.hero-content { position: relative; z-index: 2; }
/* Ajustement spécifique pour le titre de section */
.title-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}
/* =========================================
   ANIMATION DU SLOGAN (EFFET ONIRIQUE)
   ========================================= */
.hero-tagline {
    perspective: 1000px;
    margin-top: 20px;
}
.hero-tagline span {
    display: inline-block;
    margin: 0 4px;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    animation: revealWord 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards,
               floatWord 4s ease-in-out infinite alternate;
}
/* Apparition : du flou vers la clarté */
@keyframes revealWord {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}
/* Flottaison douce et aléatoire */
@keyframes floatWord {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-8px) rotate(1deg); color: white; text-shadow: 0 0 8px var(--pink); }
}
/* Optimisation de la brillance des titres avec bordures */
.border-glow span {
    background: #0a0514; /* Doit correspondre exactement à var(--dark) */
    font-weight: 600;
    letter-spacing: 1px;
}
/* =========================================
   SITE LOADER : CORRECTIF "MUR OPAQUE"
   ========================================= */
#site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0a0514; /* Fond de sécurité total */
    z-index: 99999; /* On passe au dessus de TOUT */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    visibility: visible;
    opacity: 1;
}
/* Les panneaux noirs (Les Rideaux) */
.loader-panel {
    position: absolute;
    top: 0;
    width: 51%; /* 51% pour éviter la fissure blanche au milieu */
    height: 100%;
    background-color: #0a0514; /* Noir pur Adeline Ridel */
    z-index: 1;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}
.panel-left { left: 0; }
.panel-right { right: 0; }
/* LA LIGNE NÉON (Le Fil de l'Imaginaire) */
.loader-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, transparent, var(--pink), var(--purple), var(--pink), transparent);
    box-shadow: 0 0 15px var(--pink), 0 0 30px var(--purple);
    transform: translate(-50%, -50%);
    z-index: 3; /* Devant les panneaux */
    opacity: 0;
}
/* Animation du tracé (pendant que le site charge) */
#site-loader:not(.loaded) .loader-line {
    animation: traceVertical 1.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 0.2s;
}
@keyframes traceVertical {
    0% { height: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { height: 100%; opacity: 1; }
}
/* Contenu central (Livre + Texte) */
.loader-content {
    position: relative;
    z-index: 4;
    text-align: center;
    transition: all 0.6s ease;
}
/* =========================================
   L'OUVERTURE (ÉTAT .LOADED)
   ========================================= */
/* On dégage les rideaux */
#site-loader.loaded .panel-left { transform: translateX(-100%); }
#site-loader.loaded .panel-right { transform: translateX(100%); }
/* On fait disparaître le conteneur principal après l'ouverture */
#site-loader.loaded {
    background-color: transparent;
    pointer-events: none; /* Pour pouvoir cliquer sur le site derrière */
    transition: background-color 0.5s ease 0.5s;
}
#site-loader.loaded .loader-line {
    opacity: 0;
    transition: opacity 0.3s ease;
}
#site-loader.loaded .loader-content {
    opacity: 0;
    transform: scale(1.3);
    filter: blur(15px);
}
/* =========================================
   FOOTER : BADGES & LIENS
   ========================================= */
footer {
    background: linear-gradient(to top, #05020a, transparent);
    padding: 80px 20px 40px;
    border-top: 1px solid rgba(255, 42, 133, 0.1);
}
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}
.trust-badges i { color: var(--pink); font-size: 1.2rem; }
.footer-links { margin-bottom: 20px; }
.footer-links a { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-size: 0.8rem; 
    transition: 0.3s;
}
.footer-links a:hover { color: var(--pink); }
.copyright { font-size: 0.75rem; opacity: 0.4; margin-bottom: 30px; }
.admin-zone { margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.03); padding-top: 20px; }
.admin-link { font-size: 0.65rem !important; opacity: 0.15 !important; }
.admin-link:hover { opacity: 0.8 !important; }
/* =========================================
   BANNIÈRE COOKIES
   ========================================= */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 5, 20, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid var(--purple);
    padding: 15px 25px;
    border-radius: 50px;
    z-index: 5000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    width: 90%;
    max-width: 600px;
}
.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}
.cookie-content p { font-size: 0.8rem; margin: 0; color: var(--text-main); }
.cookie-content button { padding: 8px 20px; font-size: 0.7rem; }
/* =========================================
   PAGE LÉGALE
   ========================================= */
.legal-content {
    max-width: 800px;
    margin: 120px auto 80px;
    padding: 0 25px;
}
.legal-content section { margin-bottom: 40px; }
.legal-content h2 { color: var(--pink); font-size: 1.2rem; margin-bottom: 15px; }
.legal-content p, .legal-content li { color: var(--text-muted); line-height: 1.8; }
@media (max-width: 768px) {
    .cookie-banner { border-radius: 20px; bottom: 20px; }
    .cookie-content { flex-direction: column; text-align: center; }
    .trust-badges { gap: 20px; flex-direction: column; }
}
/* =========================================
   DESIGN ADMIN PREMIUM
   ========================================= */
.admin-container { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
.admin-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}
/* Tableaux Premium */
.table-container-responsive { width: 100%; overflow-x: auto; border-radius: 15px; margin-top: 20px; }
.premium-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.premium-table th { background: rgba(138, 43, 226, 0.1); color: var(--pink); text-align: left; padding: 15px; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; }
.premium-table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; }
.premium-table tr:hover { background: rgba(255,255,255,0.02); }
/* Badges & Pills */
.badge-mini { display: inline-block; padding: 3px 8px; background: rgba(138, 43, 226, 0.2); border-radius: 5px; font-size: 0.7rem; margin: 2px; border: 1px solid rgba(138,43,226,0.3); }
.status-pill { padding: 5px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: bold; text-transform: uppercase; }
.status-pill.paye { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }
.status-pill.ship { background: rgba(52, 152, 219, 0.2); color: #3498db; border: 1px solid #3498db; }
.status-pill.ok { background: rgba(138, 43, 226, 0.2); color: var(--purple); border: 1px solid var(--purple); }
/* Boutons Mini Actions */
.admin-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn-mini { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: #fff; text-decoration: none; transition: 0.3s; }
.btn-mini:hover { border-color: var(--pink); color: var(--pink); transform: scale(1.1); }
.btn-mini.btn-accent { background: var(--btn-grad); border: none; }
.btn-mini.btn-del { color: #ff4444; border-color: rgba(255,68,68,0.2); }
.btn-mini.btn-del:hover { background: #ff4444; color: #fff; }
/* Accordion & Grid Catalogue */
.accordion-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding-bottom: 10px; }
.accordion-content { max-height: 0; overflow: hidden; transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.accordion-content.open { max-height: 2000px; padding-top: 20px; }
.admin-grid-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
/* Liste visuelle des livres */
.visual-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.card-book-mini { background: rgba(0,0,0,0.3); border-radius: 15px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.card-book-mini:hover { border-color: var(--pink); }
.card-book-mini img { width: 100%; height: 180px; object-fit: cover; }
.mini-info { padding: 10px; text-align: center; }
.mini-info h5 { margin: 0 0 10px; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-actions { display: flex; justify-content: center; gap: 10px; }
.btn-icon { color: var(--text-muted); font-size: 0.9rem; transition: 0.3s; }
.btn-icon:hover { color: var(--pink); }
.btn-icon.del:hover { color: #ff4444; }
/* Formulaire rows */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 992px) {
    .admin-grid-layout { grid-template-columns: 1fr; }
    .admin-section { padding: 20px; }
}

/* =========================================
   NAVIGATION MOBILE (SCROLL HORIZONTAL)
   ========================================= */
@media (max-width: 768px) {
    .nav-container {
        justify-content: flex-start; /* Aligne le logo à gauche */
        gap: 20px;
        overflow: hidden;
    }

    .nav-links {
        display: flex !important;
        overflow-x: auto; /* Active le scroll horizontal */
        white-space: nowrap; /* Empêche le retour à la ligne */
        flex: 1;
        padding: 5px 0;
        scrollbar-width: none; /* Cache la scrollbar (Firefox) */
        -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
    }

    .nav-links::-webkit-scrollbar {
        display: none; /* Cache la scrollbar (Chrome/Safari) */
    }

    .nav-links a {
        margin-left: 0 !important;
        margin-right: 20px;
        font-size: 0.7rem;
        flex: 0 0 auto; /* Empêche les liens de rétrécir */
    }
}

/* =========================================
   ADAPTATION STATS & MARGES
   ========================================= */
.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 100px; /* Augmentation de la marge basse (100px) */
}

/* Grille de stats plus flexible sur mobile */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr !important; /* 2 colonnes même sur petit mobile */
        gap: 10px !important;
    }
    
    .stat-card {
        padding: 15px !important;
    }
    
    .stat-value {
        font-size: 1.2rem !important; /* On réduit un peu la taille pour que ça rentre */
    }

    .filter-nav {
        justify-content: flex-start !important;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        scrollbar-width: none;
    }
    
    .filter-nav::-webkit-scrollbar { display: none; }
}

.admin-section {
    margin-bottom: 30px; /* Espace entre les blocs */
}

/* =========================================
   ANIMATIONS NAVBAR (LOGO & LIENS)
   ========================================= */

/* Le Logo AR : Effet de respiration et éclat au survol */
.nav-logo {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: logoPulse 4s ease-in-out infinite;
    display: inline-block;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 2px var(--pink)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 8px var(--pink)); transform: scale(1.02); }
}

.nav-logo:hover {
    transform: scale(1.1) rotate(-3deg);
    color: #fff;
    text-shadow: 0 0 20px var(--pink), 0 0 40px var(--purple);
}

/* Les Liens : Effet de trait onirique */
.nav-links a {
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

/* Création du trait magique sous les liens */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--btn-grad);
    box-shadow: 0 0 10px var(--pink);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(-50%);
    border-radius: 10px;
}

.nav-links a:hover {
    opacity: 1 !important; /* On annule l'opacité 0.7 */
    color: #fff;
    transform: translateY(-2px); /* Petit saut vers le haut */
    letter-spacing: 1px; /* Légère extension des lettres */
}

.nav-links a:hover::after {
    width: 100%; /* Le trait se déploie depuis le centre */
}

/* Petit effet de glitch discret sur le logo au clic */
.nav-logo:active {
    transform: scale(0.95);
    filter: hue-rotate(90deg);
}

/* Boutons réseaux sociaux */
.social-btn {
    min-width: 160px;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    background: var(--btn-grad);
    border-color: transparent;
    color: white !important;
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--btn-glow);
}

.social-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-btn:hover i {
    transform: rotate(15deg) scale(1.2);
}

/* Animation spécifique pour la section sociale */
.section-socials {
    background: linear-gradient(to bottom, transparent, rgba(138, 43, 226, 0.05));
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* Style pour la carte d'aperçu du blog */
.blog-preview-card {
    display: flex;
    flex-direction: row;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 42, 133, 0.1);
}

.preview-img-strip {
    width: 250px;
    min-width: 250px;
    height: auto;
}

.preview-img-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .blog-preview-card { flex-direction: column; }
    .preview-img-strip { width: 100%; height: 200px; }
}

/* Style carrousel dans le modal */
.blog-carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    scroll-snap-type: x mandatory;
    margin-bottom: 10px;
}

.blog-carousel img {
    min-width: 80%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    scroll-snap-align: center;
}

/* =========================================
   CORRECTIONS DU BLOG (RESPONSIVE & SCROLL)
   ========================================= */

/* Limite l'aperçu du texte à 4 lignes avec "..." */
.article-preview-text {
    color: #d0d0d0;
    line-height: 1.6;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: justify;
}

/* Design de la nouvelle carte d'article dans le slider */
.card-blog {
    flex: 0 0 320px; /* Empêche le débordement, force la largeur à 320px */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 42, 133, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: 0.4s;
}

.card-blog:hover {
    border-color: var(--pink);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-blog .preview-img-strip {
    width: 100%;
    height: 200px; /* Contraint l'image pour qu'elle ne prenne pas toute la page */
    background: #000;
}

.card-blog .preview-img-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image proprement sans l'écraser */
}

.card-blog-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Pousse les informations de date/bouton tout en bas de la carte */
}

/* Le modal article doit respirer sur mobile */
#modalArticle .modal-content {
    padding: 35px;
}

@media (max-width: 768px) {
    .card-blog { 
        flex: 0 0 280px; /* Légèrement plus étroit sur téléphone pour voir la carte suivante */
    }
    .card-blog .preview-img-strip { 
        height: 180px; /* Image légèrement plus petite sur mobile */
    }
    #modalArticle .modal-content {
        padding: 25px 20px;
    }
    .article-preview-text {
        -webkit-line-clamp: 5; /* On autorise 1 ligne de texte en plus sur mobile */
    }
}

/* =========================================
   NOUVEAUTÉS : VOTES, LIKES & COMMENTS
   ========================================= */

/* Badge note sur la carte livre (en haut à droite) */
.corner-rating {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(10, 5, 20, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 42, 133, 0.4);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #fff;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Système de vote par étoiles (Radio Button Hack) */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}
.star-rating input {
    display: none;
}
.star-rating label {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}
/* Étoiles remplies au clic ou au survol */
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Design des blocs commentaires */
.comment-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--pink);
    padding: 15px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 10px;
}

/* =========================================
   NOUVEAUTÉ : BADGE EN AVANT (ÉPINGLÉ)
   ========================================= */
.badge-en-avant {
    position: absolute;
    top: 15px;
    left: -10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 5px 15px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    z-index: 10;
    letter-spacing: 1px;
}

/* =========================================
   NOUVEAUTÉ : ÉDITEUR WYSIWYG (DARK MODE)
   ========================================= */
/* Personnalisation de l'éditeur Quill pour s'adapter à l'administration sombre */
.ql-toolbar.ql-snow { 
    background: rgba(255,255,255,0.05); 
    border-color: rgba(255,255,255,0.2) !important; 
    border-radius: 10px 10px 0 0; 
}
.ql-container.ql-snow { 
    border-color: rgba(255,255,255,0.2) !important; 
    border-radius: 0 0 10px 10px; 
    font-family: 'Montserrat', sans-serif; 
    font-size: 1rem; 
    color: #fff; 
}
.ql-editor { 
    min-height: 250px; 
    background: rgba(0,0,0,0.5); 
}
/* Recolorisation des icônes de l'éditeur en blanc */
.ql-snow .ql-stroke { stroke: #fff; }
.ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill { fill: #fff; }
.ql-snow .ql-picker { color: #fff; }
.ql-snow .ql-picker-options { background-color: #111; border-color: rgba(255,255,255,0.2); }

/* --- CORRECTION DES ESPACES DANS LES ARTICLES --- */

/* On cible les paragraphes à l'intérieur du texte de l'article */
.article-text p, 
.article-preview-text p {
    margin-top: 0;       /* Supprime l'espace au dessus */
    margin-bottom: 8px;  /* Réduit l'espace en dessous (ajuste à ta guise) */
}

/* À ajouter à la fin de style.css */
.article-text p {
    margin-top: 0;
    margin-bottom: 1px; /* Ajuste ce chiffre (ex: 5px) pour coller plus ou moins les lignes */
}

/* Gestion des sauts de ligne forcés */
.article-text br {
    content: "";
    display: block;
    margin-bottom: 0;
}

/* =========================================
   SYSTÈME D'ANIMATIONS MAGIQUES (LIKE & LECTURE)
   ========================================= */

.magic-element {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    filter: drop-shadow(0 0 15px var(--pink));
    left: 0;
    top: 0;
    opacity: 0;
    /* L'animation dure 4.5s au total */
    animation: magicJourney 4.5s ease-in-out forwards;
}

.shooting-heart { font-size: 2.5rem; color: var(--pink); }
.shooting-eye { font-size: 2.2rem; color: var(--pink); }

@keyframes magicJourney {
    /* 0% : Départ du bouton/icône */
    0% { 
        left: var(--start-x); 
        top: var(--start-y); 
        transform: translate(-50%, -50%) scale(0); 
        opacity: 0; 
    }
    /* 10% : Apparition rapide */
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    
    /* 10% -> 50% (environ 2s) : Voyage vers le centre et grossissement */
    50% { 
        left: 50vw; 
        top: 50vh; 
        transform: translate(-50%, -50%) scale(1.8) rotate(10deg); 
        opacity: 1;
    }
    
    /* 50% -> 65% : Petite pause au centre pour l'œil */
    65% {
        left: 50vw; 
        top: 50vh; 
        transform: translate(-50%, -50%) scale(1.8) rotate(-5deg);
        opacity: 1;
    }

    /* 65% -> 100% : Envol final et disparition */
    100% { 
        left: 110vw; 
        top: -10vh; 
        transform: translate(-50%, -50%) scale(0.5) rotate(45deg); 
        opacity: 0; 
    }
}

/* Traînée (Dots) */
.magic-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--pink);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 8px var(--pink);
    animation: trailFade 0.8s ease-out forwards;
}

@keyframes trailFade {
    to { transform: scale(0); opacity: 0; }
}

/* Pulsation du bouton */
.heart-pulse { animation: heartPulse 0.4s ease-out; }
@keyframes heartPulse {
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* --- ANIMATION AJOUT PANIER --- */
.shooting-cart { 
    font-size: 1.8rem; 
    color: var(--pink); 
    /* Animation plus rapide et dynamique pour l'ajout au panier */
    animation: cartJourney 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards; 
}

@keyframes cartJourney {
    0% { 
        left: var(--start-x); top: var(--start-y); 
        transform: translate(-50%, -50%) scale(0); opacity: 0; 
    }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    /* L'élément simule un arc de cercle vers le panier */
    100% { 
        left: var(--end-x); top: var(--end-y); 
        transform: translate(-50%, -50%) scale(0.3) rotate(30deg); opacity: 0; 
    }
}