:root {
    --intro-dyn-bg-1: #1a1a1a;
    --intro-dyn-bg-2: #49494975;
    --intro-dyn-bouton_1: #ff5100;
    --intro-dyn-accent_1: #00ffe0;
    --intro-dyn-stars: #ffdd00;
}

.intro-container {
    opacity: 0;
    transform: translateY(20px);
    margin: 20px auto;
    border-radius: 16px;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.intro-container.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- A. CARROUSEL MAILLAGE --- */

/* Conteneur relatif pour placer les flèches */
.intro-carousel-container {
    position: relative;
    margin-bottom: 30px;
    /* Padding sur les côtés pour laisser place aux flèches */
    padding: 0 40px; 
}

/* Zone scrollable */
.intro-maillage-wrapper {
    display: flex;
    flex-wrap: nowrap; /* On empêche le retour à la ligne */
    justify-content: flex-start; /* Alignement début pour le scroll */
    gap: 25px;
    overflow-x: auto; /* Active le scroll horizontal */
    scroll-behavior: smooth;
    padding-bottom: 10px; /* Espace pour éviter de couper l'ombre */
    
    /* Cacher la barre de défilement native (plus joli) */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    padding: 10px;
}

/* Cacher scrollbar Chrome/Safari/Opera */
.intro-maillage-wrapper::-webkit-scrollbar {
    display: none;
}

/* Chaque élément du carrousel */
.intro-maillage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    
    /* IMPORTANT: Empêche l'élément de rétrécir */
    flex: 0 0 auto; 
    width: 150px; 
    
    transition: transform 0.2s ease;
}


/* --- BOUTONS DE NAVIGATION (Flèches) --- */
.intro-nav-btn {
    position: absolute;
    top: 40%; /* Centré par rapport aux cercles */
    transform: translateY(-50%);
    background-color: var(--intro-dyn-bg-1);
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.2s;
}

.intro-nav-btn:hover {
    background-color: var(--intro-dyn-bg-2);
    transform: translateY(-50%) scale(1.1);
}

.intro-nav-btn.prev {
    left: 0;
}

.intro-nav-btn.next {
    right: 0;
}

/* --- CERCLES 150px --- */
.intro-maillage-circle {
    width: 150px;
    height: 150px;
    background-color: var(--intro-dyn-bg-1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.intro-maillage-circle.circle-img {
    background-color: #fff;
    padding: 5px;
}

.intro-maillage-item:hover .intro-maillage-circle {
    border-color: var(--intro-dyn-bouton_1);
    transform: scale(1.05);
}

.intro-maillage-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.intro-maillage-initial {
    color: #fff;
    font-size: 60px;
    font-weight: 800;
    text-transform: uppercase;
}

.intro-maillage-icon {
    color: var(--intro-dyn-accent_1);
    font-size: 70px;
}

.intro-maillage-item:hover .intro-maillage-icon {
    color: #fff;
}

.intro-maillage-text {
    font-size: 13px;
    color: #fff;
    text-align: center;
    line-height: 1.3;
    font-weight: 600;
    text-transform: uppercase;
    /* Pour limiter le texte à 2 lignes max si besoin */
    max-width: 100%; 
    transition: color 0.3s ease;
}

.intro-maillage-item:hover .intro-maillage-text {
    color: var(--intro-dyn-accent_1);
}

/* --- H1 --- */
.intro-h1 {
    font-size: 40px;
    color: #fff;
    margin: 0 0 20px 0;
    line-height: 1.3;
    font-weight: 700;
    text-align: center;
}

/* --- TEXTES --- */
.intro-text {
    margin-bottom: 15px;
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
}

.intro-message { color: var(--intro-dyn-bouton_1); font-style: italic; font-weight: bold; }

.intro-text strong {color: var(--intro-dyn-accent_1);}
.intro-text a {
    color: var(--intro-dyn-accent_1);
    text-decoration: underline;
    font-weight: bold;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}
.intro-text a:hover {
    color: var(--intro-dyn-accent_1);
}


/* --- BOUTONS ANCRES --- */
.intro-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.intro-btn-scroll {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--intro-dyn-bg-2);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    gap: 8px;           
    padding: 12px 16px;
    border-radius: 10px;
    min-width: 120px;
}

.intro-btn-scroll:hover {
    background: var(--intro-dyn-bouton_1);
    transform: translateY(-2px);
}

.intro-btn-icon {
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

.intro-btn-text {
    font-size: 13px;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    /* Sur mobile, on enlève le padding latéral car on swipe avec le doigt */
    .intro-carousel-container {
        padding: 0; 
    }
    
    /* On cache les boutons flèches sur mobile (le swipe est naturel) */
    .intro-nav-btn {
        display: none;
    }

    /* Le wrapper garde le comportement scrollable */
    .intro-maillage-wrapper {
        gap: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    .intro-maillage-item {
        width: 150px; /* Toujours 150px */
    }

    .intro-h1 {
        font-size: 22px;
        text-align: center;
    }

    .intro-text { font-size: 14px; text-align: left; }
    .intro-buttons { gap: 10px; }
    .intro-btn-scroll { flex: 1 1 45%; padding: 10px 8px; }
    .intro-btn-text { font-size: 12px; }
}