/* --- DESIGN MODERNE DARK THEME - NOLAN OFFICIEL --- */

:root {
    /* Palette de couleurs */
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary-color: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.5);

    /* Fonds */
    --bg-deep: #0a0b0e;
    /* Noir très profond */
    --bg-panel: #14161b;
    /* Gris foncé pour les cartes */
    --bg-glass: rgba(20, 22, 27, 0.7);
    /* Effet verre */

    /* Textes */
    --text-main: #f5f6fa;
    --text-muted: #b2bec3;

    /* Dégradés & Ombres */
    --gradient-main: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    --shadow-neon: 0 0 20px var(--accent-glow);
}

/* --- AJOUTS UX/UI --- */
html {
    scroll-behavior: smooth;
    background-color: var(--bg-deep);
    /* Le fond noir est appliqué ici */
}

/* Barre de défilement personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: #2d3436;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Sélection de texte */
::selection {
    background: var(--primary-color);
    color: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-muted);
    background-color: transparent;
    /* On rend le body transparent pour voir les étoiles derrière */
    position: relative;
    overflow-x: hidden;
    /* Évite les scrollbars horizontales indésirables */
}

/* --- FOND CONSTELLATION (Canvas) --- */
#constellation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* Laisse passer les clics */
}

/* --- EN-TÊTE (Header) --- */
header {
    background-color: rgba(10, 11, 14, 0.85);
    backdrop-filter: blur(12px);
    /* Effet de flou derrière le menu */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px var(--accent-glow);
    /* Petit effet néon autour du logo */
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Texte en dégradé */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary-light);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2);
}

/* Menu Burger (Mobile) */
.menu-toggle {
    display: none;
    /* Caché sur PC */
    font-size: 1.8rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* --- BANNIÈRE (Hero) --- */
.hero {
    min-height: 85vh;
    /* Hauteur minimum pour éviter le chevauchement */
    height: auto;
    padding: 6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    text-align: center;
    background: rgba(20, 22, 27, 0.6);
    backdrop-filter: blur(8px);
    padding: 3rem 4rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 900px;
    margin: 0 1rem;
    animation: fadeInUp 1s ease-out;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.tagline {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Nouvelle grille de navigation dans la bulle */
.hero-nav-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 140px;
}

.nav-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.2);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.2);
}

.nav-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.nav-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

.hero h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- BOUTONS --- */
.btn {
    display: inline-block;
    background: var(--gradient-main);
    color: #fff;
    padding: 14px 40px;
    text-decoration: none;
    border-radius: 50px;
    margin-top: 10px;
    font-weight: 700;
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.7);
    /* Gros effet glow au survol */
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-main);
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* --- SECTIONS --- */
.container {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-main);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-main);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-color);
}

.bg-light {
    background-color: transparent;
}

/* --- CARTES (Design unifié) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Grille spécifique Musiques (Flex pour adapter la taille) */
.music-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.art-card,
.book-card {
    background: var(--bg-panel);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
}

.art-card:hover,
.book-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--shadow-neon);
}

/* Spécifique Dessins */
.art-card {
    text-align: center;
}

.art-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.art-card:hover img {
    transform: scale(1.05);
}

.art-card h3,
.art-card p {
    padding: 0.8rem 1.5rem;
}

.art-card h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    font-size: 1.3rem;
    position: relative;
    /* Assure que le texte est au-dessus */
    z-index: 2;
}

/* --- ILLUSTRATIONS (Layout Horizontal Alterné) --- */
#illustrations-container,
#accueil-illustrations-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

#illustrations-container .art-card,
#accueil-illustrations-container .art-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    min-height: 300px;
}

/* Image carrée à gauche par défaut */
#illustrations-container .art-image-placeholder,
#accueil-illustrations-container .art-image-placeholder {
    width: 300px;
    /* Taille fixe et maîtrisée */
    height: 300px;
    flex-shrink: 0;
}

#illustrations-container .art-card img,
#accueil-illustrations-container .art-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Conteneur texte */
#illustrations-container .art-info,
#accueil-illustrations-container .art-info {
    padding: 2rem 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#illustrations-container .art-card h3,
#accueil-illustrations-container .art-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    padding: 0;
}

#illustrations-container .art-card p,
#accueil-illustrations-container .art-card p {
    font-size: 1rem;
    padding: 0;
    color: var(--text-muted);
}

/* Alternance : Image à droite pour les éléments pairs (2, 4, 6...) */
#illustrations-container .art-card:nth-child(even),
#accueil-illustrations-container .art-card:nth-child(even) {
    flex-direction: row-reverse;
    text-align: right;
}

/* Mobile : On repasse en colonne pour les petits écrans */
@media (max-width: 768px) {

    #illustrations-container .art-card,
    #illustrations-container .art-card:nth-child(even),
    #accueil-illustrations-container .art-card,
    #accueil-illustrations-container .art-card:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }

    #illustrations-container .art-image-placeholder,
    #accueil-illustrations-container .art-image-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }

    #illustrations-container .art-info,
    #accueil-illustrations-container .art-info {
        padding: 1.5rem;
        width: 100%;
        align-items: center;
    }
}

/* --- LIGHTBOX (Zoom Image) --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Conteneur image (pour caler le bouton play) */
.art-image-placeholder {
    position: relative;
    width: 100%;
    /* height: 100%; Supprimé pour laisser la place au texte en dessous */
}

/* Curseur loupe pour indiquer le zoom possible */
.art-image-placeholder img {
    cursor: zoom-in;
}

/* Bouton Play sur les musiques */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    padding-left: 4px;
    /* Petit ajustement optique pour centrer le triangle */
}

.art-card:hover .play-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Spécifique Livres */
.book-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.book-card {
    display: flex;
    padding: 2rem;
    gap: 2rem;
    align-items: start;
}

.book-cover img {
    width: 160px;
    height: auto;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    transition: transform 0.3s;
}

.book-card:hover .book-cover img {
    transform: rotate(-3deg) scale(1.05);
    /* Petite rotation sympa au survol */
}

.book-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.genre {
    display: inline-block;
    background: rgba(108, 92, 231, 0.15);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 600;
    border: 1px solid rgba(108, 92, 231, 0.3);
    margin-bottom: 1rem;
}

/* Conteneur pour les boutons d'action dans les cartes de livre */
.book-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.book-card-actions .btn-secondary {
    margin-top: 0;
    /* On annule la marge du bouton pour utiliser le 'gap' du conteneur */
}

/* --- CARTES MUSIQUES (Style Vinyle) --- */
.vinyl-card {
    background: var(--bg-panel);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    /* Centre le vinyle dans la carte */
    width: 250px;
    /* Taille adaptée au vinyle */
}

.vinyl-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.2);
}

/* Le Disque Vinyle */
.vinyl-record {
    width: 180px;
    /* Taille réduite (plus petit) */
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: #181818;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

/* Texture brillante par-dessus l'image pour l'effet vinyle */
.vinyl-record::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: repeating-radial-gradient(rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 2px, transparent 4px);
    pointer-events: none;
    z-index: 4;
}

/* Le macaron central (Image) */
.vinyl-label {
    width: 100%;
    /* L'image prend toute la taille du vinyle */
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.vinyl-label img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Le trou au centre */
.vinyl-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #0a0b0e;
    border-radius: 50%;
    z-index: 5;
    /* Au-dessus de la texture */
    border: 1px solid #333;
}

/* Animation de rotation */
@keyframes spinVinyl {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.vinyl-card.playing .vinyl-record {
    animation: spinVinyl 4s linear infinite;
}

.vinyl-card.paused .vinyl-record {
    animation-play-state: paused;
}

.music-info {
    text-align: center;
}

.music-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-genre {
    color: var(--primary-light);
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}

/* --- LECTEUR MUSIQUE (Fixed Bottom) --- */
.music-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 11, 14, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(108, 92, 231, 0.3);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transform: translateY(100%);
    /* Caché par défaut */
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.music-player-bar.visible {
    transform: translateY(0);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 25%;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}

.player-details h4 {
    color: var(--text-main);
    font-size: 0.9rem;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.player-details p {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin: 0;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 50%;
}

.control-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s, transform 0.2s;
}

.control-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.play-btn {
    font-size: 2rem;
    color: var(--primary-color);
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-color);
}

.player-volume {
    width: 25%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.volume-slider {
    width: 100px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* --- PIED DE PAGE (Footer) --- */
footer {
    background: linear-gradient(to top, #050507, rgba(20, 22, 27, 0.95));
    backdrop-filter: blur(10px);
    color: var(--text-main);
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(108, 92, 231, 0.3);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
    }

    .menu-toggle {
        display: block;
        /* Visible sur mobile */
    }

    nav {
        position: absolute;
        top: 100%;
        left: -1rem;
        /* Compense le padding du header */
        width: calc(100% + 2rem);
        /* Prend toute la largeur */
        background-color: rgba(10, 11, 14, 0.98);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);

        /* Animation d'ouverture */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
        opacity: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    nav.active {
        max-height: 400px;
        opacity: 1;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    nav a {
        display: block;
        padding: 1.5rem;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        border-radius: 0;
    }

    .book-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Fix Boutons Mobile */
    .book-card-actions {
        flex-direction: column;
    }

    .book-card-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    /* Adaptation Hero Mobile */
    .hero-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    /* Mobile Player */
    .music-player-bar {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        bottom: 0;
    }

    .player-info,
    .player-controls,
    .player-volume {
        width: 100%;
        justify-content: center;
    }

    .player-volume {
        display: none;
    }

    /* Cache volume sur mobile */
}