html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f9ff;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Le conteneur principal grandit pour repousser le footer en bas de page
   meme quand le contenu est court (sticky footer, sans dependre de la
   grille precedente qui ne correspondait plus a la structure reelle). */
#main-content {
    flex: 1 0 auto;
}

/* Sur les pages internes (pas la page d accueil), l en-tete est fixe et
   opaque des le chargement : on reserve donc l espace necessaire en haut
   pour que le contenu ne soit jamais cache dessous. Sur l accueil, le hero
   occupe deja 100vh sous l en-tete transparent : aucun espace ajoute. */
body:not(.is-home) #main-content {
    padding-top: 78px;
}

@media (max-width: 768px) {
    body:not(.is-home) #main-content {
        padding-top: 68px;
    }
}

.blur {
    filter: blur(8px);
    transition: 0.3s ease;
}

/* ============================================================
   SIDEBAR
============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: rgba(20, 30, 48, 0.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 5px 0 25px rgba(0,0,0,0.2);
    padding: 60px 20px;
    transition: 0.4s ease;
    z-index: 1301;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 500;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s;
}

.sidebar a {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideIn 0.5s forwards;
}

.sidebar a:nth-child(1) { animation-delay: 0.1s; }
.sidebar a:nth-child(2) { animation-delay: 0.2s; }
.sidebar a:nth-child(3) { animation-delay: 0.3s; }
.sidebar a:nth-child(4) { animation-delay: 0.4s; }
.sidebar a:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar a .nav-icon {
    width: 18px;
    text-align: center;
    opacity: 0.85;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(5px);
}

/* Lien de la page courante mis en evidence */
.sidebar a.active {
    background: rgba(255,255,255,0.22);
    font-weight: 700;
    box-shadow: inset 3px 0 0 #ffffff;
}

/* OVERLAY FLOU (arriere-plan du menu) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1300;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* LOGO SIDEBAR */
.logo-sidebar {
    width: 80px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* ============================================================
   EN-TETE (HEADER)
============================================================ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 25px;
    z-index: 1200;

    /* Par defaut (pages internes) : fond opaque et lisible des le depart */
    --header-fg: #10294d;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);

    transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

/* Sur la page d accueil : transparent par-dessus le hero, texte blanc,
   jusqu a ce que l utilisateur commence a defiler. */
body.is-home .top-header:not(.scrolled) {
    --header-fg: #ffffff;
    background: transparent;
    box-shadow: none;
}

/* Une fois le defilement commence (sur toutes les pages) : fond net + ombre */
.top-header.scrolled {
    --header-fg: #10294d;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* Masquage discret en descendant, reapparition en remontant */
.top-header.header-hidden {
    transform: translateY(-100%);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* BOUTON MENU (burger) */
.menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(77,166,255,0.15);
    color: var(--header-fg);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
    flex-shrink: 0;
}

.menu-btn:hover {
    background: rgba(77,166,255,0.3);
}

/* MARQUE (logo + nom) dans l en-tete */
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--header-fg);
    white-space: nowrap;
}

.header-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.header-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

/* NUMEROS DE CONTACT */
.contact-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--header-fg);
}

.contact-info i {
    margin-right: 5px;
}

/* SELECTEUR DE LANGUE */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(120,120,120,0.12);
    border-radius: 20px;
    padding: 3px;
}

.lang-switch a {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--header-fg);
    text-decoration: none;
    opacity: 0.7;
    transition: 0.25s;
}

.lang-switch a:hover {
    opacity: 1;
}

.lang-switch a.active {
    background: #0d6efd;
    color: #fff;
    opacity: 1;
}

/* BOUTON CONTACT */
.contact-btn {
    background: linear-gradient(45deg, #4da6ff, #007bff);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
    white-space: nowrap;
}

.contact-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,123,255,0.5);
}

@media (max-width: 860px) {
    .contact-info {
        display: none;
    }
}

@media (max-width: 576px) {
    .top-header {
        padding: 0 12px;
    }

    .header-brand-name {
        display: none;
    }

    .contact-btn {
        padding: 8px 12px;
    }

    .contact-btn-label {
        display: none;
    }

    .lang-switch a {
        padding: 5px 7px;
        font-size: 11px;
    }
}

/* ============================================================
   HERO / SLIDER D ACCUEIL
============================================================ */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.slides {
    position: absolute;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;

    animation:
        slideAnimation 28s infinite,
        zoomEffect 28s infinite;
}

@keyframes zoomEffect {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-2%, -2%); }
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 4s; }
.slide:nth-child(3) { animation-delay: 8s; }
.slide:nth-child(4) { animation-delay: 12s; }
.slide:nth-child(5) { animation-delay: 16s; }
.slide:nth-child(6) { animation-delay: 20s; }
.slide:nth-child(7) { animation-delay: 24s; }

@keyframes slideAnimation {
    0% { opacity: 0; }
    5% { opacity: 1; }
    15% { opacity: 1; }
    20% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-slider::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.4));
    top: 0;
    left: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0 20px;
}

.logo {
    width: clamp(110px, 22vw, 200px);
    margin-bottom: 20px;
    animation: zoomIn 1.5s ease;
}

.title {
    font-size: clamp(1.6rem, 5.5vw, 3rem);
    font-weight: bold;
    line-height: 1.2;
    animation: fadeDown 1.5s ease;
}

.slogan {
    font-size: clamp(0.95rem, 2.6vw, 1.2rem);
    margin-top: 10px;
    animation: fadeUp 2s ease;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================================
   ACTUALITES
============================================================ */
.news-section {
    background: #f8fbff;
}

.news-slider {
    position: relative;
    overflow: hidden;
}

.news-inner {
    display: flex;
    transition: transform 0.4s ease;
}

.news-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.news-card {
    width: 85%;
    display: flex;
    gap: 25px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;

    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);

    transition: 0.3s;
}

.news-img {
    flex: 1;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: 0.5s;
}

.news-card:hover img {
    transform: scale(1.08);
}

.news-content {
    flex: 1;
    padding: 25px;
}

.news-content span {
    font-size: 13px;
    color: #888;
}

.news-content h3 {
    margin: 10px 0;
    font-weight: bold;
}

.btn-news {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: linear-gradient(45deg, #4da6ff, #007bff);
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.news-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 10;
}

.prev { left: 10px; }
.next { right: 10px; }

.news-btn:hover {
    background: #007bff;
    color: white;
}

@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
        width: 92%;
    }

    .news-img img {
        height: 200px;
    }
}

/* ============================================================
   HISTOIRE
============================================================ */
.history-section {
    margin-top: 60px;
    padding: 0 15px;
}

.history-article {
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.history-article img {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.history-text p {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: left;
}

/* ============================================================
   EQUIPE DIRIGEANTE
============================================================ */
.team-section {
    margin-top: 80px;
    padding: 70px 0;
    background: #f8f9fa;
}

.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 20px;
}

.team-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: 0.5s;
}

.team-name {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px 10px;
    text-align: center;
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    letter-spacing: 0.5px;
}

.team-card:hover img {
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .team-card img { height: 200px; }
    .team-name { font-size: 0.8rem; padding: 10px 6px; }
}

.section-divider {
    margin: 80px auto;
    text-align: center;
    position: relative;
}

.section-divider span {
    display: inline-block;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
    border-radius: 50px;
}

/* ============================================================
   CONTACT
============================================================ */
.contact-title {
    margin: 50px 0 30px;
    font-weight: 700;
}

.contact-cards {
    row-gap: 20px;
}

.contact-card {
    background: white;
    padding: 25px 15px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s;
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 30px;
    color: #0d6efd;
    margin-bottom: 10px;
}

.contact-card p {
    word-break: break-word;
}

.contact-form {
    margin-top: 60px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
}

.contact-form button {
    background: #0d6efd;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
}

.map-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.map-section iframe {
    border-radius: 15px;
}

/* ============================================================
   BOITES SUCCES / ERREUR (popup superpose - succes.php / error.php)
============================================================ */
.success-box, .error-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    animation: popUp 0.5s ease forwards;
    z-index: 9999;
    width: 90%;
    max-width: 420px;
}

.success-box .icon {
    font-size: 50px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.error-box .icon {
    font-size: 50px;
    color: #ff4d4d;
    margin-bottom: 15px;
}

.success-box h2, .error-box h2 {
    font-weight: bold;
    margin-bottom: 10px;
}

.success-box p, .error-box p {
    color: #555;
    margin-bottom: 20px;
}

@keyframes popUp {
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.success-box.fade-out, .error-box.fade-out {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
    transition: 0.5s;
}

@media (max-width: 400px) {
    .success-box, .error-box { padding: 28px 20px; }
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
    background: linear-gradient(135deg, #0a0a0a, #111827);
    color: #fff;
    padding-top: 60px;
    flex-shrink: 0;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-tagline {
    color: #ccc;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #0d6efd;
    padding-left: 5px;
}

.footer-social a {
    display: inline-block;
    margin-right: 10px;
    color: white;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 50%;
    transition: 0.3s;
}

.footer-social a:hover {
    background: #0d6efd;
    transform: translateY(-3px);
}

.footer-line {
    border-color: rgba(255,255,255,0.1);
    margin: 30px 0;
}

.footer-bottom {
    color: #aaa;
    font-size: 14px;
    padding-bottom: 20px;
}

#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0d6efd;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    display: none;
    z-index: 900;
}

.section-title {
    font-weight: 700;
    margin-bottom: 30px;
}

/* ============================================================
   PREINSCRIPTION
============================================================ */
.pre-title {
    margin-top: 50px;
    font-weight: 700;
}

.pre-subtitle {
    color: #666;
    margin-bottom: 40px;
}

.pre-form {
    max-width: 800px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.pre-form input,
.pre-form select,
.pre-form textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    transition: 0.3s;
}

.pre-form input:focus,
.pre-form select:focus,
.pre-form textarea:focus {
    border-color: #0d6efd;
    outline: none;
}

.pre-form h4 {
    margin-top: 20px;
    margin-bottom: 15px;
}

.pre-form button {
    background: #0d6efd;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 25px;
    width: 100%;
    transition: 0.3s;
}

.pre-form button:hover {
    background: #0b5ed7;
}

@media (max-width: 576px) {
    .pre-form { padding: 20px 16px; }
    .preinscription { padding-left: 8px; padding-right: 8px; }
}

/* ============================================================
   ACTIVITES (liste)
============================================================ */
.activities {
    margin-top: 60px;
}

.subtitle {
    color: #666;
}

.activity-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s;
    margin-bottom: 30px;
    height: calc(100% - 30px);
}

.activity-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.activity-card h4 {
    margin-top: 15px;
}

.activity-card p {
    color: #666;
    padding: 0 15px;
}

.activity-card a {
    display: inline-block;
    margin: 15px 0 20px;
    padding: 8px 20px;
    background: #0d6efd;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    transition: 0.3s;
}

.activity-card a:hover {
    background: #0b5ed7;
}

.activity-card:hover {
    transform: translateY(-10px);
}

/* ============================================================
   PAGE DETAIL D ACTIVITE (info.php)
============================================================ */
.activity-page {
    margin-top: 20px;
    padding: 0 15px;
}

.activity-hero {
    position: relative;
    height: 320px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 40px;
    margin-top: 20px;
}

.activity-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.hero-overlay h1 {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
}

.activity-intro {
    max-width: 800px;
    margin: auto;
    text-align: center;
    margin-bottom: 50px;
}

.activity-block {
    display: flex;
    gap: 25px;
    align-items: center;
    margin-bottom: 40px;
}

.activity-block img {
    width: 45%;
    border-radius: 15px;
}

.activity-block div {
    width: 55%;
}

.activity-block.reverse {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .activity-hero { height: 220px; margin-bottom: 25px; }

    .activity-block,
    .activity-block.reverse {
        flex-direction: column;
    }

    .activity-block img,
    .activity-block div {
        width: 100%;
    }

    .activity-block img {
        height: 220px;
        object-fit: cover;
    }
}

.activity-slider-section {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.activity-slider {
    position: relative;
    max-width: 850px;
    margin: auto;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.activity-slides {
    display: flex;
    transition: transform 0.4s ease;
}

.activity-slides img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .activity-slides img { height: 220px; }
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13,110,253,0.8);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.nav.prev { left: 10px; }
.nav.next { right: 10px; }

.nav:hover {
    background: rgba(13,110,253,1);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin: 20px 0 40px;
    padding: 10px 18px;

    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;

    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: 12px;

    text-decoration: none;
    font-weight: 500;

    transition: 0.3s ease;
    backdrop-filter: blur(8px);
}

.back-btn:hover {
    background: #0d6efd;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 10px 25px rgba(13,110,253,0.25);
}

/* ============================================================
   PAGE DETAIL D UNE ACTUALITE (detail1.php, detail2.php...)
============================================================ */
.detail-hero {
    position: relative;
    height: 52vh;
    min-height: 320px;
    max-height: 520px;
    overflow: hidden;
    margin-bottom: 40px;
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: heroZoomDetail 18s ease-in-out infinite alternate;
}

@keyframes heroZoomDetail {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}

/* Degrade sur l image (nom dedie pour ne pas entrer en conflit avec
   l overlay du menu lateral, qui utilise la classe .overlay) */
.detail-hero .hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(5,15,35,0.9) 0%, rgba(5,15,35,0.4) 45%, rgba(5,15,35,0.05) 75%),
        linear-gradient(to right, rgba(5,15,35,0.35), transparent 55%);
}

.detail-hero .hero-content {
    position: absolute;
    bottom: 45px;
    left: 6%;
    right: 6%;
    max-width: 760px;
    color: white;
}

.detail-hero .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
    margin-right: 8px;
    animation: fadeDown 0.8s ease;
}

.detail-hero .hero-content .badge-date {
    display: inline-block;
    background: rgba(13,110,253,0.92);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    box-shadow: 0 6px 18px rgba(13,110,253,0.4);
    animation: fadeDown 1s ease;
}

.detail-hero .hero-content h1 {
    font-size: clamp(1.5rem, 4.2vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 4px 20px rgba(0,0,0,0.35);
    animation: fadeUp 1s ease;
}

.detail-content {
    margin: 20px auto 60px;
}

.content-box {
    background: white;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    line-height: 1.9;
    font-size: 16px;
    max-width: 850px;
    margin: auto;
}

.content-box p.lead-text {
    font-size: 1.08rem;
    font-weight: 500;
    margin-bottom: 25px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(13,110,253,0.07), rgba(13,110,253,0.02));
    border-left: 4px solid #0d6efd;
    border-radius: 0 12px 12px 0;
    white-space: pre-line;
}

.content-box h3 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 34px;
    margin-bottom: 14px;
    padding: 8px 16px;
    background: linear-gradient(45deg, rgba(13,110,253,0.09), rgba(13,110,253,0.02));
    border-left: 4px solid #0d6efd;
    border-radius: 0 10px 10px 0;
    font-weight: 700;
    color: #10294d;
    font-size: 1.05rem;
}

.content-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.content-box ul li {
    padding: 12px 14px;
    background: #f8fbff;
    border-radius: 10px;
    border: 1px solid rgba(13,110,253,0.08);
    transition: 0.25s;
}

.content-box ul li:hover {
    background: #eef5ff;
    transform: translateX(3px);
}

.content-box p.plain-text {
    margin-bottom: 10px;
}

.content-box p.closing-text {
    margin-top: 34px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(13,110,253,0.09), rgba(13,110,253,0.02));
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    color: #0d6efd;
    white-space: pre-line;
}

@media (max-width: 576px) {
    .detail-hero {
        height: 42vh;
        min-height: 260px;
    }

    .detail-hero .hero-content {
        left: 20px;
        right: 20px;
        bottom: 22px;
    }

    .content-box {
        padding: 22px;
        font-size: 15px;
    }
}

/* ============================================================
   CALENDRIER SCOLAIRE (detail2.php)
============================================================ */
.calendar-section {
    margin: 10px 0 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.term-card {
    background: #f8fbff;
    border: 1px solid rgba(13,110,253,0.12);
    border-radius: 16px;
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.term-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #0d6efd, #4da6ff);
}

.term-card h4 {
    font-weight: 700;
    color: #10294d;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.term-card .term-period {
    display: inline-block;
    font-size: 12px;
    color: #0d6efd;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.term-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.term-card ul li {
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.term-card ul li::before {
    content: "•";
    color: #0d6efd;
    font-weight: 700;
}

.calendar-note {
    margin-top: 18px;
    font-size: 13px;
    color: #888;
    font-style: italic;
    text-align: center;
}

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