/* ==========================================================================
   1. VARIABLES & RESET (Thème Sombre : Congo / Belgique)
   ========================================================================== */
:root {
    /* Couleurs principales */
    --congo-blue: #54b8fd;     /* Nouveau bleu plus clair */
    --belgian-yellow: #FDDA24; /* Jaune du drapeau Belge */
    
    /* Couleurs de fond et texte pour le thème sombre */
    --bg-main: #000000;        /* Fond noir absolu */
    --bg-sec: #111111;         /* Noir légèrement plus clair pour les sections */
    --bg-card: #1a1a1a;        /* Gris très foncé pour les cartes/formulaires */
    
    --text-main: #f0f0f0;      /* Texte principal (blanc cassé pour la lisibilité) */
    --text-muted: #aaaaaa;     /* Texte secondaire (gris) */
    --white: #ffffff;
    --black: #000000;

    /* Typographie */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. UTILITAIRES & TYPOGRAPHIE
   ========================================================================== */
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }
.text-left { text-align: left !important; }
.mt-4 { margin-top: 30px; }
.mb-5 { margin-bottom: 50px; }
.w-100 { width: 100%; }

/* Note: La classe s'appelle text-orange dans le HTML, on la force en bleu ici */
.text-orange { color: var(--congo-blue) !important; } 

.section-title {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.section-desc {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 50px auto;
    line-height: 1.6;
}

.subheading {
    display: block;
    color: var(--congo-blue);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* ==========================================================================
   3. BOUTONS (Boutons en Jaune Belge)
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--belgian-yellow);
    color: var(--black);
    border: none;
}

.btn-primary:hover {
    background-color: #e5c420; /* Jaune légèrement plus foncé */
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--belgian-yellow);
    color: var(--belgian-yellow);
    padding: 10px 25px;
}

.btn-outline:hover {
    background-color: var(--belgian-yellow);
    color: var(--black);
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-main);
    margin-right: 15px;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--congo-blue);
}

.circle-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--belgian-yellow);
    color: var(--black);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.circle-btn:hover {
    background-color: var(--congo-blue);
    color: var(--white);
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
#main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#main-header.scrolled {
    background-color: rgba(0, 0, 0, 0.95); /* Fond noir semi-transparent au scroll */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: fixed;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 90vw;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--congo-blue); /* Logo en bleu */
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.main-nav a i {
    font-size: 0.7rem;
    margin-left: 3px;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--belgian-yellow); /* Survol en jaune */
}

.header-actions {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   5. SECTION HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('img/5.jpeg') no-repeat center right;
    background-size: cover;
}

/* Dégradé NOIR sur la gauche pour le thème sombre */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0) 80%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 600px;
    padding-top: 100px;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--white);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 40px;
}

.social-sidebar {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.follow-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 30px;
    position: relative;
}

.follow-text::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 40px;
    background-color: var(--text-muted);
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.social-icons a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--congo-blue);
}

/* ==========================================================================
   6. SECTION PILIERS (NONPROFITS)
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.info-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background-color: var(--bg-card);
}

.info-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.info-card:hover img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-overlay h3 {
    color: var(--white);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

/* ==========================================================================
   7. CADRE STATISTIQUES
   ========================================================================== */
.stats-wrapper {
    position: relative;
    z-index: 10;
    margin-top: -50px;
}

.stats-box {
    background-color: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    display: flex;
    justify-content: space-between;
    padding: 40px 60px;
    border: 1px solid #333;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-num {
    color: var(--belgian-yellow); /* Nombres en jaune */
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==========================================================================
   8. SECTION "CE QUE NOUS FAISONS" (HOW WE HELP)
   ========================================================================== */
.how-we-help {
    padding: 100px 0;
    overflow: hidden;
    margin-top: -15vh;
}

.help-container {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.help-image-col {
    flex: 1;
    position: relative;
    display: flex;
}

.main-help-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 10px 10px 0;
    position: relative;
    z-index: 2;
    min-height: 500px;
}

.yellow-brush-deco {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80%;
    height: 40%;
    background-color: var(--congo-blue); /* Pinceau décoratif en bleu congolais */
    z-index: 1;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(-10deg);
}

.help-text-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 8% 40px 60px;
}

/* Onglets */
.tabs-nav {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #333; /* Bordure sombre */
    margin-bottom: 30px;
}

.tab-item {
    padding-bottom: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-item:hover, .tab-item.active {
    color: var(--white);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--congo-blue); /* Soulignement en bleu */
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

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

/* ==========================================================================
   9. SECTION CAMPAGNES
   ========================================================================== */
.featured-campaigns {
    background-color: var(--bg-sec); /* Légèrement différent du fond principal */
}

.campaigns-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.carousel-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.carousel-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #444;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    border-color: var(--congo-blue);
    color: var(--congo-blue);
}

.campaigns-slider-container {
    width: 100%;
    overflow: hidden;
    padding-bottom: 20px;
}

.campaigns-slider {
    display: flex;
    gap: 30px;
    transition: transform 0.4s ease-in-out;
}

.campaign-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 1px solid #222;
    overflow: hidden;
    flex: 0 0 calc(50% - 15px); 
    display: flex;
    flex-direction: column;
}

.campaign-img-wrapper {
    position: relative;
    height: 250px;
}

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

.campaign-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--congo-blue);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.campaign-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.campaign-content h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 15px;
    line-height: 1.3;
}

.campaign-content p {
    color: var(--text-muted);
    flex-grow: 1;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #333;
    border-radius: 3px;
    margin-bottom: 15px;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--congo-blue);
    border-radius: 3px;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--belgian-yellow); /* Point jaune */
    border-radius: 50%;
    border: 2px solid var(--black);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.stat-percentage {
    position: absolute;
    top: -35px;
    right: 0;
    font-weight: 700;
    color: var(--white);
    font-size: 0.85rem;
}

/* ==========================================================================
   10. GALERIE & LIGHTBOX
   ========================================================================== */
.beneficiaries {
    background-color: var(--bg-main);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1; 
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.zoom-icon {
    position: absolute;
    inset: 0;
    background-color: rgba(84, 184, 253, 0.7); /* Nouveau bleu clair transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-img { transform: scale(1.1); }
.gallery-item:hover .zoom-icon { opacity: 1; }

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--white);
    font-size: 4rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
    transition: color 0.3s ease;
}

.close-lightbox:hover { color: var(--belgian-yellow); }

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-modal.active .lightbox-content img { transform: scale(1); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2.5rem;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    border-radius: 5px;
}

.lightbox-nav:hover { background: var(--congo-blue); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

/* ==========================================================================
   11. SECTION CONTACT
   ========================================================================== */
.contact-section {
    background-color: var(--bg-sec);
}

.contact-container {
    display: flex;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 1px solid #333;
    overflow: hidden;
}

.contact-info {
    flex: 1;
    background-color: var(--congo-blue);
    color: var(--bg-main); /* Texte sombre pour contraster avec le bleu clair */
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 35px;
    align-items: flex-start;
}

.info-icon {
    background: rgba(0, 0, 0, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: var(--belgian-yellow); /* Icône en jaune */
}

.info-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.info-text p {
    color: rgba(0, 0, 0, 0.75); /* Ajustement lisibilité sur le nouveau bleu */
}

.contact-form-wrapper {
    flex: 1.5;
    padding: 50px 60px;
}

.form-group { margin-bottom: 25px; }

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #444;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--white);
    background-color: #111; /* Fond sombre pour inputs */
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #888; }

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--congo-blue);
    background-color: #000;
    box-shadow: 0 0 0 4px rgba(84, 184, 253, 0.2); /* Nouveau halo transparent */
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.site-footer {
    background-color: #050505; /* Plus foncé que bg-main */
    color: var(--text-muted);
    padding-top: 80px;
    border-top: 1px solid #222;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 25px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-logo i { color: var(--congo-blue); }
.brand-col p { line-height: 1.8; font-size: 0.95rem; }

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.contact-list i { margin-top: 4px; }

.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

.footer-socials a:hover { color: var(--belgian-yellow); }

.links-col ul li { margin-bottom: 12px; }
.links-col ul a { transition: color 0.3s; }
.links-col ul a:hover { color: var(--congo-blue); }

.footer-bottom {
    background-color: #000;
    padding: 25px 0;
    border-top: 1px solid #1a1a1a;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-legal a { transition: color 0.3s; }
.footer-legal a:hover { color: var(--white); }
.separator { margin: 0 10px; color: #444; }

/* ==========================================================================
   13. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 3rem; }
    .main-nav { display: none; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-box { flex-wrap: wrap; gap: 30px; padding: 30px; }
    .stat-item { width: calc(50% - 15px); }
    .help-container { flex-direction: column; }
    .main-help-img { border-radius: 0; min-height: 350px; }
    .help-text-col { padding: 40px 20px; }
    .yellow-brush-deco { display: none; }
    .campaigns-header { flex-direction: column; align-items: flex-start; gap: 20px; }
    .campaign-card { flex: 0 0 calc(80% - 15px); }
    .contact-container { flex-direction: column; }
    .contact-form-wrapper, .contact-info { padding: 40px 30px; }
    .footer-top { grid-template-columns: repeat(2, 1fr); gap: 50px 30px; }
}

@media (max-width: 768px) {
    .hero::before { background: rgba(0, 0, 0, 0.85); }
    .social-sidebar { display: none; }
    .cards-grid { grid-template-columns: 1fr; }
    .stat-item { width: 100%; justify-content: center; }
    .tabs-nav { flex-direction: column; gap: 15px; border-bottom: none; }
    .tab-item.active::after { display: none; }
    .tab-item.active { color: var(--congo-blue); }
    .campaign-card { flex: 0 0 100%; }
    .carousel-nav { display: none; }
    .lightbox-nav { padding: 10px; font-size: 1.5rem; }
    .lightbox-nav.prev { left: 5px; }
    .lightbox-nav.next { right: 5px; }
    .footer-top { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom-container { flex-direction: column; gap: 15px; text-align: center; }
}

/* Ajustement de l'espacement dans le Header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px; /* Ajoute un espace entre le bouton Bénévole et le bouton Don */
}

/* Nouveau style pour le bouton rouge */
.btn-volunteer {
    background-color: var(--belgian-red);
    color: var(--white);
    border: none;
    padding: 10px 25px; /* Légèrement ajusté pour correspondre à btn-outline */
}

.btn-volunteer:hover {
    background-color: #c81d2b; /* Rouge un peu plus foncé au survol */
    color: var(--white);
    transform: translateY(-2px);
}

/* Style de la section avec fond "Lumière dans le noir" */
.nonprofits {
    background-color: #0a0a0a;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 165, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 165, 0, 0.05) 0%, transparent 40%);
    color: #ffffff;
    padding: 80px 0;
}

.section-title {
    color: #fff;
    margin-bottom: 20px;
}

.section-desc {
    color: #b0b0b0;
    max-width: 700px;
    margin: 0 auto 50px;
}

.text-orange {
    color: #ff9800;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Grille de cartes */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px; /* Important pour l'effet 3D */
}

/* Structure de la Flip Card */
.info-card {
    height: 400px;
    background: transparent;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.info-card:hover .card-inner {
    transform: rotateY(180deg);
}

/* Faces avant et arrière */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Face Avant */
.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 20px;
}

/* Face Arrière */
.card-back {
    background: #1a1a1a;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    border: 1px solid rgba(255, 165, 0, 0.3); /* Bordure lumineuse */
}

.card-back h3 {
    color: #ff9800;
    margin-bottom: 15px;
}

.card-back p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.circle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ff9800;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
}

.circle-btn:hover {
    transform: scale(1.1);
    background: #ffa726;
}

/* ==========================================================================
   Grille de cartes et effet Flip 3D
   ========================================================================== */
.cards-grid {
    display: grid;
    /* Force 3 colonnes de taille égale et garde un espace entre elles */
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; 
    perspective: 1000px; /* Important pour l'effet 3D */
    padding: 20px 0; /* Évite de couper les ombres portées */
}

/* Conteneur principal de la carte */
.info-card {
    position: relative;
    width: 100%;
    height: 400px;
    background: transparent;
    cursor: pointer;
}

/* Le conteneur interne qui va tourner */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.info-card:hover .card-inner {
    transform: rotateY(180deg);
}

/* Faces avant et arrière communes */
.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Cache le dos quand la face est devant */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
}

/* ==========================================================================
   Face Avant (Image + Titre toujours visible)
   ========================================================================== */
.card-front {
    background-color: #111;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    inset: 0; /* Prend tout l'espace de la carte */
    /* Un dégradé noir qui part du bas pour bien faire ressortir le texte */
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Place le texte en bas */
    align-items: center;
    padding: 30px 20px;
    z-index: 2; /* S'assure que le texte passe par-dessus l'image */
}

.card-overlay h3 {
    color: #ffffff;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8); /* Ajoute de la lisibilité */
}

/* ==========================================================================
   Face Arrière (Texte + Dégradé Rouge/Orange)
   ========================================================================== */
.card-back {
    /* Dégradé de rouge vif vers orange */
    background: linear-gradient(135deg, #d32f2f 0%, #ff9800 100%);
    color: white;
    transform: rotateY(180deg); /* Tourne cette face à l'envers par défaut */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-back h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.card-back p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* Légère ombre pour la lisibilité sur le fond clair */
}

/* Le petit bouton rond sur la face arrière */
.card-back .circle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #ffffff; /* Blanc pour contraster avec le fond rouge/orange */
    color: #d32f2f; /* Flèche rouge */
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card-back .circle-btn:hover {
    transform: scale(1.1);
    background: #111; /* Devient noir au survol */
    color: #fff;
}

/* Responsive : On repasse à 1 seule colonne sur mobile */
@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr; /* 1 colonne sur téléphone */
    }
}