/* Variables de couleurs pour faciliter les modifications */
:root {
    --bg-color: #121212; /* Noir très profond, presque gris */
    --text-color: #E0E0E0; /* Blanc cassé pour ne pas fatiguer les yeux */
    --accent-color: #c23307; /* Cuivre / Doré pour la touche Fantasy */
    --title-color: #d18726;
    --link-color: #af8639;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--link-color); /* Blanc cassé / Gris très clair défini dans :root */
    text-decoration: none; /* Enlève le soulignement éventuel */
    transition: color 0.3s, transform 0.2s;
}

a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Navigation */
/* Logo Dragon en masque CSS */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none; /* Retire le soulignement du lien */
}

.logo-dragon {
    display: inline-block;
    width: 50px; /* Largeur du logo (à ajuster selon vos préférences) */
    height: 50px; /* Hauteur du logo */
    background-color: var(--text-color); /* Applique automatiquement votre rouge brique */
    
    /* Utilise l'image PNG comme pochoir */
    -webkit-mask: url('assets/logo-dragon.png') no-repeat center / contain;
    mask: url('assets/logo-dragon.png') no-repeat center / contain;
    
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Effet au survol de la souris */
.logo:hover .logo-dragon {
    transform: scale(1.1);
    background-color: #ffffff; /* Le dragon devient blanc au survol */
}

header {
    background-color: rgb(0, 0, 0);
    padding: 0.5rem 2rem;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between; /* Espace le logo à gauche, le menu au centre, les réseaux à droite */
    align-items: center; /* Centre verticalement */
    max-width: 1200px; /* Optionnel : empêche le header d'être trop large sur grand écran */
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
}

.menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.menu a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.menu a:hover, .menu a.active {
    color: var(--accent-color);
}

.social-header {
    display: flex;
    gap: 1.2rem; /* Espace entre les icônes */
    align-items: center;
}

.social-header a {
    color: var(--text-color); /* Blanc cassé / Gris très clair défini dans :root */
    font-size: 1.4rem; /* Icônes plus grandes */
    text-decoration: none; /* Enlève le soulignement éventuel */
    transition: color 0.3s, transform 0.2s;
}

/* Au survol, elles prennent la couleur d'accent (rouge) et grossissent légèrement */
.social-header a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Sections principales */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    border-bottom: 1px solid #222;
}

.hero h1 {
    font-size: 3rem;
    margin: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--title-color);
    margin-bottom: 2rem;
}

.hero-home {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 500px;
    padding: 4rem 2rem;
    overflow: hidden;
    border-bottom: 1px solid #333;
    text-align: left;
}

.hero-home::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(18, 18, 18, 0.82) 0%, rgba(18, 18, 18, 0.58) 42%, rgba(18, 18, 18, 0.08) 100%);
}

.hero-art {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: min(100%, 1120px);
    margin: 0 auto;
}

.hero-kicker {
    color: var(--title-color);
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
}

.hero-home h1 {
    color: #fff;
    font-size: 3.5rem;
    margin: 0;
}

.hero-home .subtitle {
    max-width: 34rem;
    color: #f0e9df;
    font-size: 1.25rem;
    margin: 0.75rem 0 1.75rem;
}

.hero-home .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

/* Boutons */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: #121212;
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
}


.btn-primary:hover {
    background-color: var(--accent-color);
    color: #121212;
    size: scale(1.1);
}

/* Actualités */
.news {
    padding: 0rem 2rem;
    max-width: 90%;
    margin: 0 auto;
}

.news-cards {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr 1fr 1fr;
}

.featured-works {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2rem;
}

.featured-works h2 {
    margin: 0 0 1rem;
    color: var(--title-color);
    font-size: 1.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.featured-book {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 0.75rem;
    border-left: 3px solid var(--accent-color);
    background-color: #1a1a1a;
    color: var(--text-color);
    transition: background-color 0.2s, transform 0.2s;
}

.featured-book:hover {
    color: var(--text-color);
    background-color: #222;
    transform: translateY(-2px);
}

.featured-book img {
    display: block;
    width: 88px;
    height: 112px;
    object-fit: cover;
    border-radius: 2px;
}

.featured-copy {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.featured-kicker {
    color: var(--title-color);
    font-size: 0.78rem;
    font-weight: bold;
    text-transform: uppercase;
}

.featured-copy strong {
    font-size: 1.05rem;
    line-height: 1.3;
}

.featured-link {
    color: #ccc;
    font-size: 0.9rem;
}

.featured-book:hover .featured-link {
    color: var(--title-color);
}

.agenda-card {
    background-color: #1e1e1e;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 1.5rem;
}

.badge-event {
    color: var(--title-color);
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0;
}

.date {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin: 0;
}

/* Pied de page */
footer {
    text-align: center;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    position: static;
    width: 100%;
    background-color: var(--bg-color);
}

/* =========================================
   PAGE ROMANS - GRILLE DES UNIVERS
========================================= */

.romans-main {
    padding: 2rem;
    text-align: center;
    padding-bottom: 2rem;
}

.page-title {
    color: var(--title-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.universes-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 90%;
    margin: 0 auto;
    min-height: 60vh; /* Garantit que les zones prennent une belle hauteur à l'écran */
}

.universe-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border: 1px solid #333;
}

/* Le voile noir semi-transparent au-dessus de l'image */
.universe-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(18, 18, 18, 0.85); /* Fond très sombre par défaut */
    transition: background-color 0.4s ease;
    z-index: 1;
}

/* Images de fond pour chaque catégorie (à glisser dans le dossier assets) */
.universe-card.heroic {
    background-image: url('assets/heroic-bg.jpg');
}
.universe-card.steampunk {
    background-image: url('assets/steampunk-bg.jpg');
}
.universe-card.dark {
    background-image: url('assets/calluna-bg.jpg');
}

/* Contenu du texte (au-dessus du voile noir) */
.universe-content {
    position: relative;
    z-index: 2; 
    padding: 2rem;
    text-align: center;
}

.universe-content h2 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.universe-content p {
    color: var(--text-color);
    font-size: 1.1rem;
    text-shadow: var(--accent-color) 2px 3px 5px;
}

/* Effets au survol (Hover) */
.universe-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(194, 51, 7, 0.25); /* Lueur rouge sombre */
}

/* Le voile s'éclaircit au survol pour révéler l'image */
.universe-card:hover::before {
    background-color: rgba(18, 18, 18, 0.4); 
}

/* Annule l'effet de votre 'a:hover' global qui rendrait tout le texte de la carte rouge au survol */
.universe-card:hover .universe-content p, 
.universe-card:hover .universe-content h2 {
    transform: none;
}

/* Ajustement pour les petits écrans (téléphones) */
@media (max-width: 900px) {
    header {
        padding: 0.5rem 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    nav .logo {
        flex: 0 0 100%;
        justify-content: center;
    }

    .menu {
        flex: 0 1 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.35rem 1rem;
    }

    .social-header {
        flex: 0 0 100%;
        justify-content: center;
    }

    .universes-container {
        grid-template-columns: 1fr; /* Passe sur 1 seule colonne */
    }

    .news-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .universe-card {
        min-height: 250px;
    }
}

/* =========================================
   PAGE PRESENTATION OEUVRE (CARROUSEL)
========================================= */

.book-presentation-main {
    max-width: 1200px; /* Plus resserré pour faciliter la lecture */
    margin: 0 auto;
    padding-bottom: 2rem;
}

.return-to-romans {
    margin: 1.5rem 0 0;
    text-align: center;
}

.carousel-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.book-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.author-profile {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: 3rem;
    align-items: start;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.author-portrait img {
    width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.author-bio h2 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin: 0 0 1rem;
}

.author-bio p {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0 0 1rem;
}

.bio-page .book-presentation-main {
    padding-bottom: 2rem;
}

.bio-page footer {
    position: static;
}

.calluna-detail {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    align-items: start;
}

.calluna-art img {
    max-width: none;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.calluna-release {
    color: var(--accent-color);
    font-weight: bold;
    margin: 0 0 1.5rem;
}

.calluna-section-title {
    color: var(--text-color);
    font-size: 1.3rem;
    margin: 0 0 0.75rem;
}

.calluna-lead {
    color: var(--title-color);
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.calluna-detail .synopsis {
    text-align: left;
    margin-bottom: 0;
}

.carousel-slide {
    display: none; /* Masqué par défaut */
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide.active {
    display: grid; /* Seul l'élément actif passe en grille */
}

/* Animation d'apparition en fondu */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.book-cover img {
    width: 100%;
    max-width: 300px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    display: block;
    margin: 0 auto;
}

.tag-tome {
    display: inline-block;
    background-color: #333;
    color: var(--title-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.book-info h2 {
    color: var(--accent-color);
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.book-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin: -1rem 0 1.5rem;
    padding: 0;
    list-style: none;
    color: #ccc;
    font-size: 0.95rem;
}

.synopsis {
    font-size: 1.05rem;
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
}

/* Boutons d'achat */
.book-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.soundtrack-link {
    align-self: flex-start;
}

.store-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-store {
    padding: 0.7rem 1.2rem;
    border-radius: 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

/* Couleurs spécifiques aux plateformes */
.btn-store.amazon { background-color: #FF9900; color: #000; }
.btn-store.amazon:hover { background-color: #e68a00; color: #000; }

.btn-store.kobo { background-color: #BF0000; color: #fff; }
.btn-store.kobo:hover { background-color: #990000; color: #fff; }

.btn-store.excerpt {
    background-color: #333;
    color: var(--text-color);
}

.btn-store.excerpt:hover {
    background-color: #444;
    color: #fff;
}

/* Contrôles du Carrousel (Flèches) */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--accent-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 10;
}

.carousel-control:hover {
    background-color: #e63d09;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev { left: -22px; }
.carousel-control.next { right: -22px; }

/* Indicateurs (Petits points) */
.carousel-indicators {
    text-align: center;
    margin-top: 2rem;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #444;
    border: none;
    border-radius: 50%;
    margin: 0 5px;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active, .dot:hover {
    background-color: var(--accent-color);
}

.music-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.music-feature {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.music-statement {
    color: var(--title-color);
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    margin: 0 0 1.5rem;
}

.music-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.music-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.music-video-fallback {
    text-align: right;
    margin: 0.5rem 0 0;
}

.music-channel {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.music-page footer {
    position: static;
}

.contact-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
}

.contact-panel {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.contact-intro,
.contact-note {
    color: #ccc;
}

.contact-form {
    display: grid;
    gap: 1.25rem;
}

.contact-field {
    display: grid;
    gap: 0.4rem;
}

.contact-field label,
.contact-fields legend {
    color: var(--title-color);
    font-weight: bold;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #121212;
    color: var(--text-color);
    font: inherit;
}

.contact-field textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-fields {
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid #444;
    border-radius: 4px;
}

.contact-fields[hidden] {
    display: none;
}

.order-notice {
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
    background-color: #121212;
    color: #ccc;
}

.order-notice p {
    margin: 0 0 0.5rem;
}

.order-notice p:last-child {
    margin-bottom: 0;
}

.contact-form button.btn-primary {
    justify-self: start;
    border: 0;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.contact-page footer {
    position: static;
}

.contact-note {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive pour mobile */
@media (max-width: 800px) {
    .contact-main { padding: 0 1rem 2rem; }
    .contact-panel { padding: 1.25rem; }

    .music-main { padding: 0 1rem 2rem; }
    .music-feature { padding: 1rem; }

    .author-profile {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }

    .book-detail {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .calluna-art img { aspect-ratio: 16 / 9; }
    .calluna-release { margin-bottom: 1rem; }

    .book-detail .synopsis { text-align: left; }
    .book-detail .store-links { justify-content: center; }

    .carousel-slide.active {
        grid-template-columns: 1fr; /* Image au-dessus, texte en dessous */
        text-align: center;
    }
    
    .synopsis { text-align: left; }
    
    .store-links { justify-content: center; }
    
    /* Repositionne les flèches sur mobile */
    .carousel-control { top: auto; bottom: -15px; transform: none; }
    .carousel-control:hover { transform: scale(1.1); }
    .carousel-control.prev { left: 10px; }
    .carousel-control.next { right: 10px; }
}

@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 1rem;
    }

    .hero-home {
        min-height: 460px;
        align-items: flex-end;
        padding: 3rem 1.25rem;
    }

    .hero-art {
        object-position: 38% center;
    }

    .hero-home::after {
        background: linear-gradient(0deg, rgba(18, 18, 18, 0.88) 0%, rgba(18, 18, 18, 0.38) 65%, rgba(18, 18, 18, 0.08) 100%);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-home h1 {
        font-size: 2.5rem;
    }

    .hero-home .subtitle {
        font-size: 1.1rem;
    }

    .featured-works {
        padding: 1.25rem 1rem 1.5rem;
    }

    .featured-works h2 {
        font-size: 1.3rem;
    }

    .page-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .news {
        max-width: 100%;
        padding: 0 1rem 2rem;
    }

    .news-cards {
        grid-template-columns: 1fr;
    }

    .romans-main {
        padding: 1.5rem 1rem 2rem;
    }

    .universes-container {
        max-width: 100%;
        gap: 1rem;
    }

    .universe-content {
        padding: 1.25rem;
    }

    .universe-content h2 {
        font-size: 1.6rem;
    }

    .carousel-container {
        padding: 1.5rem 1rem;
    }

    .book-detail,
    .author-profile {
        padding: 1.25rem;
        gap: 1.25rem;
    }

    .book-info h2 {
        font-size: 1.8rem;
    }

    .store-links {
        gap: 0.65rem;
    }

    .btn-primary,
    .btn-store {
        max-width: 100%;
    }
}