/* Empêche la coupure de l'adresse mail sur mobile */
@media (max-width: 700px) {
    .flex.flex-col.items-center.bg-white.rounded-xl a[href^="mailto:"] {
        white-space: nowrap !important;
        font-size: 1.1em;
        word-break: normal !important;
        overflow-wrap: normal !important;
        max-width: 100vw;
        margin-top: 0.7em !important;
        display: inline-block;
    }
}
/* --- DOMAIN PAGE MOBILE & MAIL --- */
@media (max-width: 700px) {
    .brands-page-main {
        padding-left: 4vw !important;
        padding-right: 4vw !important;
    }
    .max-w-xl {
        padding-left: 2vw !important;
        padding-right: 2vw !important;
    }
    .page-header, .page-footer {
        padding-left: 2vw;
        padding-right: 2vw;
        font-size: 12px;
    }
}

/* Corrige la couleur du lien mail sur la page domaine */

/* Mail bien lisible, contraste élevé */
a[href^="mailto:"] {
    color: #111 !important;
    background: #fff !important;
    border: 2px solid #181830;
    border-radius: 8px;
    padding: 0.2em 0.5em;
    text-decoration: underline;
    font-weight: bold;
    box-shadow: 0 2px 8px 0 rgba(20,20,40,0.08);
    transition: background 0.2s, color 0.2s, border 0.2s;
}
a[href^="mailto:"]:hover, a[href^="mailto:"]:focus {
    background: #ffe066 !important;
    color: #181830 !important;
    border-color: #e6b800;
    outline: none;
}

/* ---- RESPONSIVE MARQUES ---- */
@media (max-width: 1100px) {
    .logo-container {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        gap: 28px;
    }

    .brands-page-main {
        padding: 10vh 2vw;
    }   

    .logo-showcase h2 {
        font-size: 2.2em;
    }
}

@media (max-width: 700px) {
    .logo-container {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .brands-page-main {
        padding: 7vh 1vw;
    }

    .logo-showcase h2 {
        font-size: 1.5em;
        margin-bottom: 32px;
    }

    .logo-item {
        max-width: 95vw;
    }

    .logo-link {
        aspect-ratio: unset;
        min-height: 120px;
    }

    .logo-link img {
        width: 70vw;
        max-width: 320px;
        height: auto;
    }

    .logo-desc {
        min-width: 0;
        max-width: 98vw;
        font-size: 0.98em;
        padding: 0.9em 0.7em;
        margin-top: 10px;
    }

    .logo-title {
        bottom: 10px;
        font-size: 1.1em;
    }
}

/* ---- BOX DESCRIPTION LOGO ---- */
.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.logo-desc {
    display: block;
    margin: 0 auto;
    margin-top: 18px;
    min-width: 220px;
    max-width: 320px;
    background: rgba(20, 20, 40, 0.97);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 1.1em 1.3em;
    font-size: 1.05em;
    opacity: 0;
    pointer-events: none;
    line-height: 1.5;
    text-align: center;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
}

.logo-item:hover .logo-desc {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1.04);
}

/* ---- VARIABLES ET STYLE DE BASE ---- */
:root {
    /* MODIFICATION : Retour à la police Cinzel */
    --font-title: 'Bebas Neue', serif;
    --font-body: 'Inter', sans-serif;
    --color-background: #101025;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-background);
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* Style de l'aura lumineuse qui suit la souris */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(40, 48, 80, 0.6),
            transparent 90%);
    transition: background 0.2s ease-out;
}


#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* ---- CADRAGE ET NAVIGATION (COMMUNS) ---- */
.page-header,
.page-footer {
    position: fixed;
    width: 100%;
    padding: 0 5vw;
    box-sizing: border-box;
    z-index: 20;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.page-header {
    top: 30px;
}

.page-footer {
    bottom: 30px;
}

.header-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
    justify-content: center;
}

.header-nav a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 5px;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.9);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.header-nav a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.header-nav a:hover::after {
    transform: scaleX(1);
}

/* ---- STYLES PAGE D'ACCUEIL (index.html) ---- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.main-title {
    font-family: var(--font-title);
    font-size: 13vw;
    font-weight: 900;
    /* Poids de police correct pour Cinzel */
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.9);
    text-shadow: 2px 2px 0 #222b44, 4px 4px 10px rgba(16, 16, 40, 0.6), 0 0 8px rgba(255, 255, 255, 0.15), -2px -2px 2px rgba(255, 255, 255, 0.4), -1px -1px 0 rgba(255, 255, 255, 0.7);
    /* SUPPRESSION : La transition pour le parallax n'est plus nécessaire */
}

.main-title>span {
    display: block;
}

.main-title>span>span {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: revealLetter 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: calc(0.05s * var(--i));
}

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

/* ---- STYLES PAGE DES MARQUES (marques.html) ---- */
.brands-page-main {
    min-height: 100vh;
    padding: 15vh 5vw;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.logo-showcase {
    width: 100%;
    max-width: 80%;
    text-align: center;
}

.logo-showcase h2 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 60px;
    opacity: 0;
    animation: slideUpFadeIn 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    animation-delay: 0.1s;
}

.logo-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    gap: 40px;
}

.logo-container>* {
    opacity: 0;
    animation: slideUpFadeIn 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

.logo-container>*:nth-child(1) {
    animation-delay: 0.2s;
}

.logo-container>*:nth-child(2) {
    animation-delay: 0.3s;
}

.logo-container>*:nth-child(3) {
    animation-delay: 0.4s;
}

.logo-container>*:nth-child(4) {
    animation-delay: 0.5s;
}

/* etc... */

/* ---- EFFET HOVER POP-UP (identique) ---- */
.logo-link {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.logo-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: #1a1a3a;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.logo-link img {
    position: relative;
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.logo-title {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 3;
}


.logo-title span {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.logo-link:hover {
    transform: translateY(-10px);
}

.logo-link:hover::before {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.logo-link:hover img {
    transform: translateY(-25%) scale(0.9);
}


.logo-link:hover .logo-title span {
    opacity: 1;
    transition-delay: calc(0.04s * var(--i));
}

.logo-container:hover>*:not(:hover) {
    transform: scale(0.95);
    opacity: 0.5;
}

/* ---- STYLES PAGE DES MARQUES (marques.html) ---- */
.brands-page-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Aligne les sections verticalement */
    justify-content: center;
    align-items: center;
    padding: 15vh 0;
    gap: 80px;
    /* Espace entre les deux carrousels */
    box-sizing: border-box;
}

.showcase-container {
    width: 100%;
    max-width: 95%;
    text-align: center;
}

.showcase-container h2 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 60px;
}

/* ARCHITECTURE DU CARROUSEL */
.carousel-wrapper {
    position: relative;
}

.entities-carousel {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 20px 80px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    transition: all 0.3s ease;
    cursor: grab; 
}

.entities-carousel.is-grabbing {
    cursor: grabbing; /* Curseur pendant le glisser */
    scroll-behavior: auto; /* Important: désactive le 'smooth' pendant le drag pour une réponse immédiate */
    user-select: none; /* Empêche la sélection de texte */
}

.entities-carousel::-webkit-scrollbar {
    display: none;
}

.entity-card {
    flex: 0 0 550px;
    height: 400px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    scroll-snap-align: center;
    opacity: 0.5;
    transform: scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: transform, opacity; 
}

/* État actif de la carte au centre */
.entity-card.is-active {
    opacity: 1;
    transform: scale(1);
}

.card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
}

.entity-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(16, 16, 37, 0.95) 20%, transparent);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-info h3 {
    margin: 0 0 10px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 1px;
}

.card-info p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

/* EFFETS AU SURVOL (AVEC CORRECTION) */
.entity-card:hover {
    transform: scale(1.05) !important;
    opacity: 1 !important;
    z-index: 20;
    /* <-- CORRECTION : Met la carte au premier plan */
}

.entity-card:hover img {
    transform: scale(1.1);
}

.entity-card:hover .card-info {
    transform: translateY(0);
}

.entity-card:hover .card-info p {
    opacity: 1;
}

/* BOUTONS DE NAVIGATION */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: background-color 0.3s ease;
    line-height: 60px;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.nav-btn.prev {
    left: 15px;
}

.nav-btn.next {
    right: 15px;
}

/* AJOUT POUR LES BOUTONS DE NAVIGATION DÉSACTIVÉS */
.nav-btn.is-disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none; /* Empêche tout événement de clic */
}

/* --- AJOUT : INDICATEUR DE CLIC AU SURVOL --- */

/* On s'assure que le conteneur du lien peut positionner notre icône */
.card-link {
    position: relative; 
}

/* Création et style de l'icône de flèche */
.lienexterne .card-link::after {
    content: '\2197'; /* C'est le code unicode pour la flèche ↗ */
    position: absolute;
    top: 20px;
    right: 20px;
    
    /* Apparence du cercle */
    background-color: rgba(255, 255, 255, 0.95);
    color: #101025; /* Couleur de fond sombre du site */
    border-radius: 50%;
    width: 45px;
    height: 45px;
    
    /* Centrage de la flèche dans le cercle */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    
    /* Animation d'apparition */
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 5; /* Pour s'assurer qu'elle est au-dessus de l'image */
}

/* L'icône apparaît lorsque l'on survole la carte */
.entity-card:hover .card-link::after {
    opacity: 1;
    transform: scale(1);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
    .brands-page-main {
        gap: 60px;
    }

    .showcase-container h2 {
        font-size: 1.8em;
        margin-bottom: 40px;
    }

    .entities-carousel {
        gap: 20px;
        padding: 10px 20px;
    }

    .entity-card {
        flex-basis: 80vw;
        height: 380px;
    }

    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        line-height: 45px;
    }

    .nav-btn.prev {
        left: -10px;
    }

    .nav-btn.next {
        right: -10px;
    }
}