/*
Theme Name: Les Indépendances
Description: Thème minimaliste pour la troupe de théâtre Les Indépendances
Author: Votre Nom
Version: 2.0
*/

/* Reset et base optimisé */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    height: 100vh;
    overflow-y: auto;
    /* Optimisations pour de meilleures performances */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Optimisations générales pour les animations */
* {
    /* Utiliser transform et opacity pour les animations (GPU-accelerated) */
    will-change: auto;
}

/* Réduire les animations si l'utilisateur préfère */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Header simplifié - complètement supprimé */
.site-header {
    display: none !important;
}

/* Navigation en bas d'écran */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.site-title-bottom {
    font-size: 2rem;
    font-weight: 300;
    text-decoration: none;
    color: #000;
    letter-spacing: 0.5px;
}

.site-title-bottom:hover {
    opacity: 0.7;
}

.bottom-nav-links {
    display: flex;
    gap: 2rem;
}

.bottom-nav-links a {
    color: #000;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    transition: opacity 0.3s ease;
}

.bottom-nav-links a:hover {
    opacity: 0.7;
}

/* Container principal - Homepage fullscreen */
.homepage-container {
    height: 100vh;
    padding-bottom: 6rem; /* Espace pour la navigation en bas */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Container pour toutes les autres pages */
.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 6rem; /* Espace pour la navigation en bas */
    min-height: 100vh;
    overflow-y: auto;
}

/* Carousel fullscreen */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background-color: transparent;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    /* Optimisations GPU */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: opacity;
}

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

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Navigation du carousel - simplifiée */
.carousel-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.carousel-dot.active {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Flèches simplifiées */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
}

.carousel-arrow.prev {
    left: 30px;
}

.carousel-arrow.next {
    right: 30px;
}

/* Container pour toutes les autres pages */
.main-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 6rem; /* Espace pour la navigation en bas */
    min-height: 100vh;
    overflow-y: auto;
}

/* Page calendrier - même style que homepage mais avec scroll */
.calendar-container {
    height: 100vh;
    padding: 2rem;
    padding-bottom: 6rem;
    overflow-y: auto;
}

/* Suppression de tous les styles spécifiques aux pages intérieures */
/* Toutes les pages utilisent maintenant la navigation en bas */

/* Événements dans le calendrier - style minimaliste */
.calendar-event-minimal a:hover {
    color: #000 !important;
}

.calendar-event-minimal a[style*="color: #666"]:hover {
    color: #000 !important;
}

/* Pages */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    color: #000;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Événements */
.calendar-event {
    margin-bottom: 2rem;
}

.event-date {
    font-weight: 400;
    color: #000;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    font-weight: 400;
}

.event-venue {
    color: #666;
    font-weight: 300;
}

/* Liens */
.home-link {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #000;
    color: white;
    text-decoration: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 300;
    transition: opacity 0.3s ease;
    letter-spacing: 0.3px;
}

.home-link:hover {
    opacity: 0.8;
}

/* Footer simplifié */
.site-footer {
    background-color: #f8f9fa;
    color: #666;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
    .homepage-container {
        padding: 1rem;
        padding-bottom: 5rem;
    }
    
    .main-container {
        padding: 1rem;
        padding-bottom: 5rem;
    }
    
    .calendar-container {
        padding: 1rem;
        padding-bottom: 5rem;
    }
    
    .bottom-navigation {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .bottom-nav-links {
        gap: 1rem;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .carousel-arrow.prev {
        left: 15px;
    }
    
    .carousel-arrow.next {
        right: 15px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    /* Page calendrier responsive */
    .calendar-event-minimal div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .calendar-event-minimal div[style*="min-width: 120px"] {
        min-width: auto !important;
    }
}

/* Creations page */
.creations-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.creations-page__intro {
    margin-bottom: 40px;
}

.creations-page__list {
    column-count: 3;
    column-gap: 40px;
    column-fill: balance;
}

.creations-page__item {
    border-top: 5px solid black;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 40px;
    display: inline-block;
    width: 100%;
    text-decoration: none;
}

.creations-page__item:hover > .creations-page__item-title {
    text-decoration: underline;
    text-decoration-color: #000;
}

.creations-page__item-image-wrapper {
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;
    margin-top: 15px;
    background-color: #f5f5f5;
    position: relative;
    /* Aspect ratio avec fallback pour anciens navigateurs */
    padding-bottom: 75%; /* 4:3 aspect ratio */
    height: 0;
}

/* Support moderne pour aspect-ratio */
@supports (aspect-ratio: 4 / 3) {
    .creations-page__item-image-wrapper {
        padding-bottom: 0;
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

.creations-page__item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.4s ease;
}

/* Placeholder pendant le chargement - fade in progressif */
.creations-page__item-image[loading="lazy"] {
    opacity: 0;
}

.creations-page__item-image[loading="lazy"].loaded,
.creations-page__item-image:not([loading="lazy"]) {
    opacity: 1;
}

.creations-page__item-title {
    font-size: 1.2rem;
    line-height: 1.5;
    color: black;
    margin-bottom: 5px;
}

.creations-page__item-date {
    font-size: 0.95rem;
    color: rgb(56, 56, 56);
    font-weight: 500;
}

.creations-page__item-carousel {
    margin-bottom: 20px;
}

.creations-page__excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0;
}

.creation__container {
    border-top: 5px solid black;
    margin-top: 10px;
    padding-top: 10px;
    display: flex;
    gap: 20px;
}

.creation__sidebar {
    width: 30%;
}

.creation__content {
    width: 70%;
}
.creation__title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.creation__distribution > p:first-child {
    font-size: 0.95rem;
    color: rgb(0, 0, 0);
    font-weight: 600;
    margin-bottom: 5px;
}

.creation__distribution > p:last-child {
    font-size: 0.90rem;
    color: rgb(0, 0, 0);
    font-weight: 500;
}

.creation__date {
    font-size: 0.95rem;
    color: rgb(0, 0, 0);
    font-weight: 500;
    margin-bottom: 10px;
}

.creation__carousel {
    height: 500px;
}
.creation__video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.creation__video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.creation__back {
    margin-bottom: 20px;
}

.creation__back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navigation.pagination {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.3rem;
}
