/* ============================================
   ARME - DESIGN MINIMALISTE & ÉLÉGANT
   Inspiré de designs modernes et épurés
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fix pour le scroll horizontal */
html {
    overflow-x: hidden;
    max-width: 100%;
}

section {
    overflow-x: hidden;
}

/* ===== CARROUSEL MINIMALISTE ===== */

.carousel-wrapper {
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

/* Slide avec plusieurs images (défilement à l'intérieur du slide) */
.carousel-slide .slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.carousel-slide .slide-bg.active {
    opacity: 1;
}

/* ===== TEXTES DYNAMIQUES DU CARROUSEL (Alignement Gauche) ===== */

.carousel-text-container {
    position: relative;
    min-height: 420px; /* Ajusté pour le nouveau layout */
    width: 100%;
}

.carousel-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Prend toute la largeur du parent (50% de l'écran) */
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    pointer-events: none;
    visibility: hidden;
}

.carousel-text.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
}

/* S'assurer que les textes ne débordent pas */
.carousel-text h1,
.carousel-text h2,
.carousel-text p {
    max-width: 100%;
    word-wrap: break-word;
}

/* Dots Navigation */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.dot.active {
    width: 32px;
    border-radius: 4px;
    background: white;
}

/* ===== NAVIGATION ===== */

#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

/* ===== TYPOGRAPHY ===== */

h1 {
    letter-spacing: 0.05em;
}

/* ===== ANIMATIONS SUBTILES ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE (Alignement Gauche) ===== */

@media (max-width: 1024px) {
    .carousel-text-container {
        min-height: 400px; /* Augmenté pour tablettes */
    }
    
    .carousel-text h1 {
        font-size: 2.25rem !important;
    }
    
    .carousel-text p {
        font-size: 1.125rem !important;
    }
}

@media (max-width: 768px) {
    .carousel-slide {
        background-position: 60% center;
    }
    
    .carousel-text-container {
        min-height: 350px; /* Augmenté pour petits écrans */
    }
    
    .carousel-text h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .carousel-text h2 {
        font-size: 0.75rem !important;
    }
    
    .carousel-text p {
        font-size: 1rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.6 !important; /* Meilleur espacement */
    }
    
    .carousel-text a {
        padding: 0.625rem 1.5rem !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 640px) {
    .carousel-text-container {
        min-height: 420px; /* Ajusté pour mobile - permet au texte complet de s'afficher */
    }
    
    .carousel-text h1 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }
    
    .carousel-text h2 {
        font-size: 0.65rem !important;
        margin-bottom: 0.875rem !important;
    }
    
    .carousel-text p {
        font-size: 1rem !important; /* Taille lisible */
        line-height: 1.65 !important; /* Bon espacement pour la lecture */
        margin-bottom: 1.5rem !important;
    }
    
    .carousel-text .w-12 {
        width: 2rem !important;
    }
    
    .carousel-text a {
        padding: 0.75rem 1.75rem !important;
        font-size: 0.75rem !important;
    }
}

/* ===== EVENT MODALS ===== */

/* Overlay du modal */
.event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.event-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Container du modal */
.modal-content {
    background: white;
    border-radius: 0;
    max-width: 1100px;
    width: 100%;
    height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Bouton fermer */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Section images (gauche) */
.modal-images {
    position: relative;
    background: #fff;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-carousel {
    position: relative;
    width: 100%;
    flex: 1;
    background: #fff;
    overflow: hidden;
    padding: 1.5rem;
}

.modal-slide {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-slide.active {
    opacity: 1;
}

.modal-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dots navigation */
.modal-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 1rem 0;
    background: #fff;
}

.modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-dot:hover {
    background: #999;
}

.modal-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #333;
}

/* Section détails (droite) */
.modal-details {
    padding: 2rem;
    overflow-y: auto;
    height: 100%;
}

.modal-details h2 {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #111;
}

.modal-info {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #666;
    font-size: 0.7rem;
    white-space: nowrap;
}

.info-item i {
    color: #f7931e;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.info-item span {
    color: #333;
    font-size: 0.7rem;
}

.modal-description {
    color: #444;
    line-height: 1.7;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 95vh;
    }
    
    .modal-images {
        height: 300px;
    }
    
    .modal-details {
        padding: 1.5rem;
    }
    
    .modal-details h2 {
        font-size: 1.5rem;
    }
    
    .modal-info {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===== TEAM SCROLL ===== */

.team-scroll {
    scrollbar-width: thin;
    scrollbar-color: #f7931e transparent;
    scroll-behavior: smooth;
}

.team-scroll::-webkit-scrollbar {
    height: 8px;
}

.team-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.team-scroll::-webkit-scrollbar-thumb {
    background: #f7931e;
    border-radius: 10px;
}

.team-scroll::-webkit-scrollbar-thumb:hover {
    background: #2f61d2;
}

/* Snap scrolling */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* ===== YEAR TABS ===== */

.year-tab {
    background: transparent;
    color: #666;
    cursor: pointer;
    border: none;
    outline: none;
}

.year-tab.active {
    background: white;
    color: #f7931e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.year-tab:hover:not(.active) {
    color: #333;
}

/* ===== SCROLL INDICATOR ===== */

@keyframes lineGrow {
    0% {
        height: 0;
    }
    50% {
        height: 100%;
    }
    100% {
        height: 0;
    }
}

/* ===== HOVER STATES ===== */

a {
    transition: all 0.3s ease;
}

button {
    transition: all 0.3s ease;
}

/* Scrollbar par défaut du navigateur */

/* ===== PERFORMANCE ===== */

.carousel-slide {
    will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
