/* --- RESET & GLOBAL --- */
body {
    background-color: #F9F5EF;
    color: black;
    font-family: 'Mohave', sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Évite le scroll horizontal involontaire */
}

/* --- NAVBAR --- */
.navbar {
    background-color: #FFFFFF;
    height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
}

.nav-logo {
    height: 150px;
    width: auto;
    margin-top: 0;
    z-index: 100;
}

.nav-button {
    width: 140px;
    height: 40px;
    border-radius: 30px;
    border: none;
    background-color: rgba(72, 4, 4, 0.87);
    color: #FFFFFF;
    font-family: 'Mohave', sans-serif;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-button:hover,
.nav-button.active {
    border-radius: 20px;
    width: 140px;
    height: 60px;
}

/* --- HEADER & SOUS-TITRE --- */
.header-container {
    position: relative;
    width: 100%;
    margin-bottom: 60px;
}

.header-image {
    width: 100%;
    height: 500px;
    display: block;
    opacity: 0.2;
    object-fit: cover;
    object-position: center;
    filter: blur(1px);
}

.subtitle-block {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 80px;
    z-index: 10;
}

.subtitle-line {
    width: 150px;
    border-top: 2px solid #000000;
    margin-top: 170px;
    margin-bottom: 10px;
}

.subtitle-text {
    margin: 0;
    font-family: 'Mohave', sans-serif;
    font-weight: 800;
    font-size: 48px;
    line-height: 1;
    color: #000000;
    text-transform: uppercase;
}

/* --- CARROUSEL ARTICLES (NOUVEAU) --- */
.articles-section {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
    overflow: hidden;
}

.article-slider-container {
    position: relative;
    width: 80%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Style de base de la carte (adapté au slider) */
.article-slider-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 350px;
    height: 380px;
    background-color: #C5B79D;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    /* Optimisation GPU */
    transform: translate3d(-50%, -50%, 0) scale(0.8);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Carte Active (Au centre, grande) */
.article-slider-item.active {
    transform: translate3d(-50%, -50%, 0) scale(1.1);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Carte Précédente (À gauche) */
.article-slider-item.prev {
    transform: translate3d(-50%, -50%, 0) translateX(-400px) scale(0.9);
    opacity: 0.6;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
}

/* Carte Suivante (À droite) */
.article-slider-item.next {
    transform: translate3d(-50%, -50%, 0) translateX(400px) scale(0.9);
    opacity: 0.6;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
}

.article-title {
    font-size: 28px;
    margin: 0 0 10px 0;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.1;
}

.article-chapeau {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.btn-savoir {
    background-color: white;
    color: black;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.btn-savoir:hover {
    transform: scale(1.05);
}

/* Flèches de navigation spécifiques aux articles */
.article-nav-arrow {
    color: #480404;
    font-size: 40px;
    border: 2px solid #480404;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background 0.3s;
}

.article-nav-arrow:hover {
    background-color: #480404;
    color: white;
}

.article-nav-arrow.left {
    left: 5%;
}

.article-nav-arrow.right {
    right: 5%;
}


/* --- TITRE GALERIE --- */
.gallery-section-title {
    font-size: 48px;
    text-transform: uppercase;
    margin-left: 10%;
    margin-bottom: 20px;
    font-weight: 700;
    color: black;
}

/* --- SECTION GALERIE (FOND NOIR) --- */
.gallery-wrapper {
    background-color: #1E1E1E;
    padding: 60px 0;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-container {
    width: 100%;
    overflow: visible;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slider {
    position: relative;
    width: 80%;
    height: 100%;
}

/* Modification des items pour le fond noir */
.carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Utilisation de translate3d pour forcer l'accélération matérielle GPU */
    transform: translate3d(-50%, -50%, 0) scale(0.8);
    width: 500px;
    height: 300px;
    cursor: pointer;
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
        filter 0.4s ease;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: 20px;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.carousel-item.active {
    transform: translate3d(-50%, -50%, 0) scale(1.2);
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.carousel-item.prev,
.carousel-item.next {
    opacity: 0.5;
    z-index: 5;
    pointer-events: auto;
}

.carousel-item.prev {
    transform: translate3d(-50%, -50%, 0) translateX(-300px) scale(0.8);
}

.carousel-item.next {
    transform: translate3d(-50%, -50%, 0) translateX(300px) scale(0.8);
}

/* Texte caché par défaut dans la galerie */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
}

.hover-overlay p {
    color: white;
    font-family: 'Mohave', sans-serif;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.4;
    margin: 0;
}

.carousel-item img {
    transition: filter 0.4s ease, transform 0.6s ease;
}

.carousel-item:hover img {
    filter: blur(5px);
}

.carousel-item:hover .hover-overlay {
    opacity: 1;
}

/* Flèches galerie */
.nav-arrow {
    color: white;
    font-size: 30px;
    border: 1px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    position: absolute;
}

.nav-arrow.left {
    left: 5%;
}

.nav-arrow.right {
    right: 5%;
}

/* Points de navigation */
.dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    /* Optimisation pour les points */
    contain: layout;
    /* Isole le recalcul de mise en page */
}

/* Style commun pour les points */
.dot,
.article-dot {
    width: 12px;
    height: 12px;
    background-color: #555;
    border-radius: 50%;
    cursor: pointer;
    /* Transition uniquement sur les propriétés nécessaires pour éviter de tout recalculer */
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    /* Indication au navigateur pour optimiser le rendu */
    will-change: width;
}

/* Galerie (fond sombre) : Point actif gris clair */
.dot.active {
    width: 60px;
    background-color: #888;
    border-radius: 10px;
}

/* Articles (fond clair) : Point actif rouge (couleur charte) */
.article-dot.active {
    width: 60px;
    background-color: #480404;
    border-radius: 10px;
}

/* Positionnement spécifique pour les points des articles */
.articles-section .dots-container {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    margin-top: 0;
}

/* --- SECTION TEXTE FIN --- */
.intro-text-section {
    max-width: 1000px;
    margin: 80px auto;
    padding: 0 20px;
}

.intro-content {
    text-align: left;
    font-size: 20px;
    line-height: 1.5;
}

.intro-line {
    width: 200px;
    border: none;
    border-top: 2px solid black;
    margin: 30px 0;
}

.intro-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
}

.btn-webdoc {
    background-color: #C5B79D;
    color: black;
    padding: 10px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-webdoc:hover {
    background-color: #b0a186;
}

/* --- PAGE ARTICLES : STYLES SPÉCIFIQUES --- */

.articles-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px;
}

/* Section Audio Hero */
.hero-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0 100px 0;
    background-color: #F9F5EF;
    gap: 40px;
}

.audio-hero-container {
    position: relative;
    width: 80%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.audio-hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.audio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-audio-hero {
    background-color: rgba(100, 100, 100, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: white;
    padding: 10px 30px;
    font-family: 'Mohave', sans-serif;
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 10px;
    backdrop-filter: blur(2px);
    transition: background 0.3s;
}

.btn-audio-hero:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-intro-text {
    width: 80%;
    max-width: 900px;
    text-align: left;
    font-family: 'Mohave', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.4;
    color: #333;
    margin-top: 0;
}

/* Sections Articles */
.article-section {
    width: 100%;
    padding: 60px 0;
    display: flex;
    justify-content: center;
}

.bg-beige {
    background-color: #F9F5EF;
}

.bg-white {
    background-color: #FFFFFF;
}

.article-content {
    width: 80%;
    max-width: 1000px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

/* Images */
.article-img-side {
    flex: 1;
    display: flex;
}

.article-img-side img {
    width: 100%;
    max-width: 500px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Texte & Boutons */
.article-text-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.article-preview-title {
    font-family: 'Mohave', sans-serif;
    font-weight: 600;
    font-size: 64px;
    line-height: 100%;
    letter-spacing: 0%;
    margin: 0 0 30px 0;
    color: black;
    text-transform: none;
}

.article-preview-chapeau {
    font-family: 'Mohave', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.4;
    color: black;
    text-transform: none;
    margin-bottom: 40px;
}

/* Layout Alterné */
.image-right {
    flex-direction: row;
}

.image-right .article-img-side {
    justify-content: flex-end;
}

.image-right .article-text-side {
    align-items: flex-start;
    text-align: left;
    padding-right: 60px;
}

.image-left {
    flex-direction: row;
}

.image-left .article-img-side {
    justify-content: flex-start;
}

.image-left .article-text-side {
    align-items: flex-start;
    text-align: left;
    padding-left: 60px;
}

/* Bouton LIRE + */
.btn-lire {
    background-color: #C5B79D;
    color: black;
    padding: 8px 50px;
    border-radius: 20px;
    font-family: 'Mohave', sans-serif;
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-lire.btn-beige-bg {
    background-color: #C5B79D;
}

.btn-lire:hover {
    transform: scale(1.05);
}

/* Responsive Mobile */
@media (max-width: 768px) {

    .article-content,
    .image-right,
    .image-left {
        flex-direction: column-reverse;
        align-items: center;
        gap: 30px;
    }

    .article-text-side {
        padding: 0 !important;
        text-align: left !important;
    }

    .article-preview-title {
        font-size: 40px;
    }

    .article-slider-item {
        width: 300px;
    }
}

/* --- STYLE DU POP-UP (MODAL) --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-container {
    background-color: #F9F5EF;
    width: 90%;
    max-width: 1100px;
    height: 80%;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #333;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #b0a186;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #C5B79D;
    padding-bottom: 20px;
}

.modal-header h2 {
    font-family: 'Mohave', sans-serif;
    font-size: 42px;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
    text-align: center;
}

.modal-body {
    overflow-y: auto;
    padding-right: 15px;
    text-align: justify;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    line-height: 1.6;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #C5B79D;
    border-radius: 4px;
}

.modal-body h3 {
    font-family: 'Mohave', sans-serif;
    font-size: 28px;
    color: #000;
    margin-top: 30px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.modal-article-img {
    width: auto;
    max-width: 100%;
    max-height: 300px;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-intro {
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: #444;
    margin-bottom: 30px;
    border-left: 4px solid #C5B79D;
    padding-left: 15px;
}

.author-signature {
    text-align: right;
    font-family: 'Mohave', sans-serif;
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: #555;
    margin-top: 30px;
    margin-right: 20px;
}

/* --- PAGE WEBDOC --- */
.webdoc-main {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.webdoc-section {
    text-align: left;
}

.webdoc-title {
    font-family: 'Mohave', sans-serif;
    font-size: 36px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    margin: 0 0 10px 0;
}

.title-underline {
    width: 150px;
    height: 2px;
    background-color: #000;
    margin-bottom: 30px;
}

.webdoc-text {
    font-family: 'Mohave', sans-serif;
    font-size: 20px;
    line-height: 1.5;
    color: #000;
    margin-bottom: 20px;
}

.video-section {
    width: 100%;
    margin: 20px 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.details-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.text-block {
    margin-bottom: 20px;
}

/* --- PAGE AUDIO : STYLE SPÉCIFIQUE --- */

.audio-main {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 80px;
    background-color: #F9F5EF;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Section Vinyle */
.vinyl-section {
    width: 100%;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vinyl-container {
    width: 350px;
    height: 350px;
    position: relative;
    border-radius: 50%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    /* Enlève la bordure si tu veux que ton PNG fasse tout le travail */
    border: none;
}

/* --- ANIMATION ROTATION --- */
@keyframes spinRecord {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.vinyl-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* S'assure que l'image remplit le rond */
    border-radius: 50%;
    /* Rend l'image parfaitement ronde */
    display: block;

    /* Animation définie mais en PAUSE par défaut */
    animation: spinRecord 5s linear infinite;
    animation-play-state: paused;
}

/* Classe ajoutée par JS pour lancer la rotation */
.vinyl-img.playing {
    animation-play-state: running;
}

/* Petit rond central (trou du vinyle) */
.vinyl-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    /* Petit trou */
    height: 15px;
    background-color: #F9F5EF;
    /* Couleur du fond de la page */
    border-radius: 50%;
    z-index: 10;
}

/* Liste des pistes */
.audio-list-container {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
}

.audio-list-container.single-track-mode {
    margin-top: 20px;
}

.audio-track-item {
    width: 100%;
}

.track-title {
    font-family: 'Mohave', sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 10px;
    color: black;
}

/* Lecteur Audio Custom */
.custom-audio-player {
    background-color: #E0E0E0;
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    border-right: 1px solid #aaa;
    padding-right: 20px;
    margin-right: 20px;
    height: 100%;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
    color: black;
}

.play-pause-btn {
    width: 40px;
    height: 40px;
    background-color: black;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.play-pause-btn:hover {
    transform: scale(1.05);
    background-color: #333;
}

/* Waveform (Visualisation) */
.waveform-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 30px;
    overflow: hidden;
}

.waveform-bar {
    width: 3px;
    background-color: #333;
    border-radius: 2px;
    animation: wave 1.2s infinite ease-in-out;
}

/* Variation aléatoire des barres */
.waveform-bar:nth-child(odd) {
    height: 15px;
    animation-duration: 1.5s;
}

.waveform-bar:nth-child(2n) {
    height: 25px;
    animation-duration: 1.1s;
}

.waveform-bar:nth-child(3n) {
    height: 10px;
    animation-duration: 1.3s;
}

.waveform-bar:nth-child(4n) {
    height: 20px;
    animation-duration: 0.9s;
}

.waveform-bar:nth-child(5n) {
    height: 28px;
}

/* Animation en pause par défaut */
.waveform-bar {
    animation-play-state: paused;
}

/* Activation des animations quand le parent a la classe .playing */
.custom-audio-player.playing .waveform-bar {
    animation-play-state: running;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.5);
    }
}

@media (max-width: 600px) {
    .custom-audio-player {
        padding: 10px 15px;
    }

    .player-controls {
        gap: 8px;
        padding-right: 10px;
        margin-right: 10px;
    }

    .waveform-container {
        display: none;
    }

    .vinyl-container {
        width: 250px;
        height: 250px;
    }
}