:root {
    --primary: #7B2CBF;
    --secondary: #F72585;
    --accent:  #5B2245;
    --light: #F7F9F9;
    --dark: #191919;
}

/* Correction principale : surcharger les classes Bootstrap */
.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--secondary);
    --bs-btn-hover-border-color: var(--secondary);
    --bs-btn-active-bg: var(--secondary);
    --bs-btn-active-border-color: var(--secondary);
}

.alert-primary {
    --bs-alert-bg: rgba(123, 44, 191, 0.1);
    --bs-alert-border-color: var(--primary);
    --bs-alert-color: var(--primary);
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    overflow-x: hidden;
    background-color: var(--light);
    line-height: 1.6;
}

h1, h2, h3, h4, .nav-link {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    color: var(--primary);
    text-decoration: underline;
}

/* Styles pour le logo */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    border-radius: 8px;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 3px;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
}

/* Ajustement du texte de la marque */
.brand-text {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
    transition: all 0.3s;
}

.brand-highlight {
    color: var(--primary);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .logo-img {
        width: 40px;
        height: 40px;
    }

    .brand-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .logo-img {
        width: 35px;
        height: 35px;
    }

    .brand-text {
        font-size: 1.3rem;
    }
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: white !important;
}

.navbar-brand span {
    color: var(--primary);
}

.nav-link {
    color: white !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--accent) !important;
    transform: translateY(-2px);
}

.navbar {
    transition: all 0.3s;
    background-color: rgba(0, 0, 0, 0.8);
}

.navbar.scrolled {
    background-color: rgba(42, 42, 42, 0.95) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.language-switcher{display:flex;gap:10px;margin-left:20px;align-items:center;}
.language-link{display:flex;align-items:center;gap:5px;text-decoration:none;color:white;font-weight:500;padding:8px 12px;border-radius:8px;transition:all 0.3s ease;}
.language-link:hover{background:rgba(122,6,6,0.1);color:var(--primary);}
.language-link.active{background:var(--primary);color:white !important;}
.language-flag{width:20px;height:15px;object-fit:cover;border-radius:2px;}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/image01.jpg');
    background-size: cover;
    background-position: top center;
    min-height: 100vh;
    color: white;
    display: flex;
    align-items: center;
    background-attachment: fixed;
}

.transition-section-1 {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/image01.jpg');
    background-size: cover;
    min-height: 25vh;
    background-position: top center;
    background-attachment: fixed;
}

.transition-section-2 {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/image02.jpg');
    background-size: cover;
    min-height: 25vh;
    background-position: top center;
    background-attachment: fixed;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
}

.location-badge {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    display: inline-block;
    margin-top: 15px;
    font-size: 1.1rem;
}

.btn-primary {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 30px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-primary:hover, .back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--dark);
}

.section {
    padding: 100px 0;
}

.section-title {
    position: relative;
    margin-bottom: 60px;
    text-align: center;
    color: var(--secondary) !important;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--primary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.about-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.class-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    margin-bottom: 30px;
    max-height: 100%;
    border: 2px solid transparent;
}

.class-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.class-img {
    height: 350px;
    width: 100%;
    /* object-fit: cover; */
    object-position: top;
}

.class-body {
    padding: 25px;
}

/* Styles pour le filtre */
.filter-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    color: white;
}

/* Solution CSS Grid pour l'affichage des cours */
.classes-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    width: 100%;
}

.class-item {
    transition: all 0.5s ease;
    width: 100%;
}

.class-item.hidden {
    display: none;
}

.class-item:not(.hidden) {
    animation: fadeIn 0.5s ease forwards;
}

.schedule-day {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.schedule-day:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 15px;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
}

.back-to-top.show {
    opacity: 1;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Styles pour le système "Lire la suite" */
.course-description {
    position: relative;
    overflow: hidden;
}

.description-text {
    margin-bottom: 10px;
    transition: max-height 0.3s ease;
}

.description-text.truncated {
    max-height: 100px; /* Hauteur pour environ 3 lignes de texte */
    overflow: hidden;
}

.read-more-btn {
    display: inline-block;
    margin-top: 5px;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
}

.read-more-btn:hover {
    text-decoration: underline;
}

.read-more-btn::after {
    content: ' ▼';
    font-size: 0.8em;
}

.read-more-btn.expanded::after {
    content: ' ▲';
}

/* Dégradé pour indiquer qu'il y a plus de texte (optionnel) */
.description-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), white 100%);
    pointer-events: none;
}

/* Gallery Coming Soon Styles */
.placeholder-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.placeholder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.placeholder-card:hover .placeholder-overlay {
    opacity: 1 !important;
}

.placeholder-image {
    transition: all 0.3s ease;
}

.placeholder-card:hover .placeholder-image {
    background-color: rgba(123, 44, 191, 0.1) !important;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Gallery grid (real images from Google Drive) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.gallery-grid:empty {
    display: none;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    transition: opacity 0.2s;
}

.gallery-lightbox-close:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for placeholders */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.placeholder-card:nth-child(1) .placeholder-image {
    animation: pulse 3s infinite;
}

.placeholder-card:nth-child(2) .placeholder-image {
    animation: pulse 3s infinite 0.5s;
}

.placeholder-card:nth-child(3) .placeholder-image {
    animation: pulse 3s infinite 1s;
}

.placeholder-card:nth-child(4) .placeholder-image {
    animation: pulse 3s infinite 1.5s;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    .section {
        padding: 70px 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }

    .classes-grid-container {
        grid-template-columns: 1fr;
    }

    .filter-menu {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 80%;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .section {
        padding: 50px 0;
    }
    .calendly-inline-widget {
        min-height: 800px;
    }
}
