html {
    scroll-behavior: smooth;
}

:root {
    --gold: #ffcc00;
    --dark: #0d1117;
    --card: #161b22;
    --text: #c9d1d9;
}

body {
    background-color: var(--dark);
    color: var(--text);
    font-family: Arial, sans-serif;
    margin: 0; padding: 0;
}

#sponsorForm a, #modalDon a, #modalLead a
{
    color: #999;
}
.container { width: 100%; max-width: 100%; margin: auto; padding: 40px 0; }
h1, h2 { text-align: center; color: var(--gold); text-transform: uppercase; }

.progress-section {width: 60%; margin: 0 auto; background: rgba(255,255,255,0.05); padding: 20px; border-radius: 15px; margin-bottom: 50px; }
.progress-bar-bg { width: 100%; height: 35px; background: #000; border-radius: 20px; overflow: hidden; border: 1px solid var(--gold); }
.progress-fill { height: 100%; background: linear-gradient(90deg, #b8860b, #ffcc00); color: #000; font-weight: bold; line-height: 35px; text-align: center; transition: width 1.5s; }

.guest-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin: 0 0 100px 0; }
.card { width: 220px; height: 320px; perspective: 1000px; cursor: pointer; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; }
.card.flipped .card-inner { transform: rotateY(180deg); }

.card-front, .card-back {
    position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
    border-radius: 15px; border: 1px solid #30363d; background: var(--card);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.card-back { transform: rotateY(180deg); background: #1c2128; border-color: var(--gold); text-align: center; }
.flag { font-size: 50px; }
.mystery { font-size: 80px; color: var(--gold); }

.btn { background: var(--gold); border: none; padding: 12px 20px; color: #000; font-weight: bold; border-radius: 5px; cursor: pointer; }

.modal { display:none; position:fixed; z-index:999; left:0; top:0; width:100%; height:100%; background: rgba(0,0,0,0.9); }
.modal-content { background: var(--card); margin: 5% auto; padding: 40px; border: 1px solid var(--gold); width: 400px; border-radius: 15px; position:relative; }
input { width: 100%; padding: 12px; margin: 10px 0; background: #0d1117; border: 1px solid #30363d; color: white; border-radius: 5px; box-sizing: border-box;}


/* Icône de fermeture */
.close-icon {
    position: absolute; right: 20px; top: 15px;
    font-size: 30px; cursor: pointer; color: var(--gold);
    z-index: 99;
}

/* Détails dans la carte */
.details-list { list-style: none; padding: 0; text-align: left; font-size: 0.85em; margin: 5px 0; }
.price-tag { font-size: 1.2em; font-weight: bold; color: var(--gold); margin-bottom: 5px; }

.btn-eye {
    background: transparent; border: 1px solid var(--gold); color: var(--gold);
    padding: 8px; border-radius: 5px; cursor: pointer; margin-bottom: 10px; width: 78%;
}

/* Modal Large pour la visionneuse */
.modal-content.large { width: 66%; max-width: 95%; padding: 0; overflow: hidden; }

.visibility-container { display: flex; height: 780px; }

.visibility-sidebar { 
    width: 23%; background: #0d1117; padding: 20px; 
    border-right: 1px solid #30363d; display: flex; flex-direction: column;
}

.visibility-sidebar ul { list-style: none; padding: 0; flex-grow: 1; }
.visibility-sidebar li { 
    padding: 12px; border-bottom: 1px solid #30363d; cursor: pointer; transition: 0.3s; 
}
.visibility-sidebar li:hover, .visibility-sidebar li.active { color: var(--gold); background: #161b22; }

.visibility-preview { width: 70%; padding: 20px; background: #000; text-align: center; }
.visibility-preview img { max-width: 100%; height: 550px; object-fit: contain; border-radius: 10px; }

.side-actions { margin-top: 20px; }

.badge-taken { background: var(--gold); color: black; padding: 5px; border-radius: 5px; font-weight: bold; margin-top: 10px; }

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 30px auto;
    width: 60%;
}

.partner-item {
    
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.partner-logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--gold);
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.5em;
    font-weight: bold;
}

.partner-name {
    font-weight: bold;
    font-size: 0.9em;
    color: #fff;
    margin: 0;
}

.partner-logo-container {
    width: 174px;
    height: 101px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    overflow: hidden;
}

.partner-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Garde les proportions du logo */
    filter: grayscale(100%); /* Optionnel : logos en gris par défaut */
    transition: 0.3s;
}

.partner-item:hover .partner-logo-img {
    filter: grayscale(0%); /* Le logo reprend ses couleurs au survol */
    transform: scale(1.1);
}

.section-cont
{
    background: rgba(255, 255, 255, 0.05);
    display: table;
    width: 100%;
    padding: 50px 0 30px 0;
}


/* Container global pour centrer la grille */
.fidel-partners-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Grille flexible centrée */
.fidel-partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centre les logos si moins de 5 */
    gap: 30px;
}

/* Chaque bloc de logo */
.fidel-item {
    width: 160px; /* Taille fixe pour l'harmonie */
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%); /* Look élégant en noir et blanc */
    opacity: 0.7;
    transition: all 0.4s ease;
}

.fidel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Effet au survol */
.fidel-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Responsive : ajustement sur mobile */
@media (max-width: 600px) {
    .fidel-item {
        width: 120px;
        gap: 15px;
    }
}



.impact-section {
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    margin: 40px 0 0 0;
}

.section-subtitle {
    text-align: center;
    color: #ccc;
    max-width: 700px;
    margin: -10px auto 40px;
    font-size: 1.1em;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    width: 67%;
    margin: 0 auto;
}

.impact-card {
    background: rgba(26, 26, 26, 0.8);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
}

.impact-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

 
.impact-card h4 {
    color: var(--gold);
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: 800; /* Plus gras pour le côté institutionnel */
    letter-spacing: 0.5px;
}

.impact-card p {
    font-size: 0.85em; /* Un peu plus petit pour un look "rapport annuel" plus pro */
    color: #dfdfdf;
    line-height: 1.5;
}


.download-box {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, rgba(0,0,0,0) 100%);
    border-left: 4px solid var(--gold);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
    margin: 50px auto;
    width: 60%;
}

.download-content h3 {
    margin: 0;
    color: var(--gold);
}

.download-content p {
    margin: 5px 0 0;
    color: #ccc;
}

@media (max-width: 768px) {
    .download-box { flex-direction: column; text-align: center; gap: 20px; }
}


.hero-countdown {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('assets/img/festival-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    border-radius: 20px;
    margin-bottom: 50px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    overflow: hidden;
}

.countdown-content h1 {
    font-size: 2.5em;
    color: #fff;
    margin: 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-badge-urgent {
    background: #e63946;
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

#countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.timer-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    min-width: 100px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.timer-box span {
    display: block;
    font-size: 4em; /* Chiffres géants */
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    font-family: 'Arial Black', sans-serif;
}

.timer-box small {
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7em;
    margin-top: 5px;
}

.timer-divider {
    font-size: 3em;
    color: var(--gold);
    font-weight: bold;
    padding-bottom: 20px;
}

/* Barre de progression d'urgence */
.countdown-footer {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar-mini {
    height: 6px;
    background: #333;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #e63946);
}

.countdown-footer span {
    font-size: 0.85em;
    color: #bbb;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

/* Mobile */
@media (max-width: 768px) {
    .timer-box span { font-size: 2.5em; }
    .timer-box { min-width: 70px; padding: 10px; }
    .timer-divider { font-size: 1.5em; }
    .countdown-content h1 { font-size: 1.5em; }
}



.main-footer {
    background: #0a0a0a;
    color: #fff;
    padding: 80px 20px 30px;
    margin-top: 100px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
}

.footer-logo {
    color: var(--gold);
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 900;
    text-align: left;
}

.footer-logo span {
    color: #fff;
    font-weight: 300;
}

.footer-brand p {
    color: #888;
    line-height: 1.6;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--gold);
    text-decoration: none;
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--gold);
    color: #000;
    transform: translateY(-3px);
}

.footer-links h4, .footer-contact h4 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.1em;
    position: relative;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background: var(--gold);
}

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

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

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

.footer-links a:hover { color: var(--gold); padding-left: 5px; }

.footer-contact p {
    color: #888;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i { color: var(--gold); }

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    text-align: center;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    margin-bottom: 30px;
}

.footer-bottom p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.8em !important;
    font-style: italic;
    opacity: 0.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p, .footer-links h4::after, .footer-contact h4::after { margin: 0 auto 20px; }
    .social-links { justify-content: center; }
    .footer-contact p { justify-content: center; }
}


.whatsapp-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.ws-content {
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.ws-text {
    font-size: 0.9em;
}

.ws-content i {
    font-size: 1.8em;
}

.whatsapp-sticky:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .ws-text { display: none; } /* Sur mobile, on ne garde que l'icône */
    .ws-content { padding: 12px; border-radius: 50%; }
}



/* --- TABLETTE (Écrans inférieurs à 992px) --- */
@media (max-width: 992px) {
    .guest-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
    .container {
        width: 95%;
        max-width: 1200px;
    }
}

/* --- MOBILE (Écrans inférieurs à 600px) --- */
@media (max-width: 600px) {
    .guest-grid {
        grid-template-columns: 1fr; /* 1 seule colonne géante */
    }
    
    .titre-pack {
        font-size: 1.2rem; /* On réduit un peu la taille du texte */
    }

    .card {
        height: auto; /* Permet à la carte de grandir si le texte est long */
        min-height: 400px;
        width: 90%;
    }
    

    /* On agrandit les boutons pour qu'ils soient faciles à cliquer au doigt */
    .btn, .btn-eye {
        width: 80%;
        padding: 15px;
        font-size: 16px;
    }

    .donation-section {
        width: 75%;
    }
}

@media (max-width: 600px) {
    .modal-content {
        width: 80% !important;
        margin: 5% auto;
        padding: 15px;
    }
    
    .visibility-container {
        flex-direction: column; /* On met la preview sous la liste sur mobile */
    }
}


/* Section Mécénat */
.donation-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 111, 0, 0.1) 100%);
    border: 2px dashed #d4af37;
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    margin: 50px auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

/* Petit éclat lumineux en arrière-plan */
.donation-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.donation-content {
    position: relative;
    z-index: 1;
}

.donation-section h3 {
    color: #ff8c00; /* Orange vif pour l'accroche */
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
}

.donation-section p {
    color: #eee;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

/* Le bouton spécifique pour le don */
.btn-don {
    background: linear-gradient(90deg, #ff8c00, #d4af37);
    color: #000;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-don:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5);
    filter: brightness(1.1);
}

/* Style spécifique pour la case "Anonyme" dans le modal */
#group-anonyme {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

#group-anonyme label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #d4af37;
}


/* Cache les éléments mobiles par défaut sur PC */
.slider-arrow, #mobileTitle, .mobile-action-bar { display: none; }

/* --- CONFIGURATION MOBILE --- */
@media (max-width: 768px) {
    .visibility-container {
        flex-direction: column !important; /* Empile verticalement */
    }

    .visibility-sidebar {
        display: none !important; /* Cache la liste de texte sur mobile */
    }

    .visibility-preview {
        width: 100% !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        padding: 20px 0;
    }

    #previewImg {
        width: 90%;
        max-height: 250px;
        object-fit: cover;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    }

    #mobileTitle {
        display: block; /* On l'affiche uniquement ici */
        color: #D4AF37;
        margin-top: 15px;
        font-size: 1.3rem;
        font-weight: bold;
    }

    /* Les flèches */
    .slider-arrow {
        display: flex;
        position: absolute;
        top: 35%;
        background: rgba(212, 175, 55, 0.8);
        color: black;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        z-index: 10;
        cursor: pointer;
    }
    .prev { left: 10px; }
    .next { right: 10px; }

    /* Bouton d'action en bas */
    .mobile-action-bar {
        display: block;
        width: 91%;
        padding: 15px;
        background: #1a1a1a;
        border-top: 1px solid #333;
    }
}


.slide-content {
    transition: opacity 0.3s ease-in-out;
}
#placementList li {
    cursor: pointer;
    padding: 10px;
    transition: 0.2s;
}
#placementList li.active {
    background: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    border-radius: 5px;
}

/* Conteneur de l'image pour positionner le loader */
.image-preview-wrapper {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Le Spinner (Loader) */
.loader-image {
    display: none; /* Caché par défaut */
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(243, 156, 18, 0.2);
    border-top: 4px solid #f39c12; /* Ta couleur Gold */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation de l'image */
#previewImg {
    transition: opacity 0.3s ease-in-out;
}

#previewImg.loading {
    opacity: 0;
}