/* ==========================
   GOOGLE FONT (Poppins requis)
========================== */

body{
    font-family: 'Poppins', sans-serif;
}

/* ==========================
   ROOT VARIABLES PREMIUM
========================== */

:root{
    --primary:#C8A45D;
    --dark:#0D0D0D;
    --light:#FFFFFF;
    --gray:#F4F5F7;
    --text:#222;
    --shadow:0 15px 40px rgba(0,0,0,0.12);
}

/* ==========================
   RESET
========================== */

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

html{
    scroll-behavior:smooth;
}

body{
    background:var(--light);
    color:var(--text);
}

/* ==========================
   INTRO SECTION PREMIUM
========================== */

.intro{
    padding:100px 0;
    background:linear-gradient(135deg,#0f172a,#1e293b);
    color:white;
    overflow:hidden;
}

.intro-container{
    width:90%;
    max-width:1200px;
    margin:auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:60px;
}

.intro-content{
    flex:1;
}

.intro-badge{
    display:inline-block;
    padding:8px 15px;
    background:#2563eb;
    border-radius:50px;
    font-size:14px;
    margin-bottom:20px;
}

.intro h1{
    font-size:42px;
    margin-bottom:15px;
    line-height:1.2;
}

.intro p{
    font-size:16px;
    opacity:0.85;
    margin-bottom:25px;
}

.intro-actions{
    display:flex;
    gap:15px;
    margin-bottom:40px;
}

.btn-primary{
    background:#2563eb;
    color:white;
    padding:12px 20px;
    border-radius:10px;
    text-decoration:none;
}

.btn-secondary{
    border:1px solid white;
    color:white;
    padding:12px 20px;
    border-radius:10px;
    text-decoration:none;
}

.intro-stats{
    display:flex;
    gap:30px;
}

.intro-stat h3{
    font-size:20px;
    color:#38bdf8;
}

.intro-stat p{
    font-size:13px;
    opacity:0.7;
}

.intro-visual{
    flex:1;
    text-align:center;
}

.intro-visual img{
    width:100%;
    max-width:400px;
    animation:float 3s ease-in-out infinite;
}

@keyframes float{
    0%{transform:translateY(0px);}
    50%{transform:translateY(-15px);}
    100%{transform:translateY(0px);}
}

/* RESPONSIVE */
@media(max-width:900px){
    .intro-container{
        flex-direction:column;
        text-align:center;
    }

    .intro-actions{
        justify-content:center;
        flex-wrap:wrap;
    }

    .intro-stats{
        justify-content:center;
        flex-wrap:wrap;
    }
}

/* ==========================
   LOADER GLOBAL
========================== */

#loader {
    position: fixed;
    inset: 0;
    background: #0b0f1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loader-box {
    text-align: center;
    color: white;
}

/* ==========================
   CERCLE LOGO ANIMÉ
========================== */

.logo-spinner {
    width: 110px;
    height: 110px;
    border-radius: 50%;

    position: relative;

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

    margin: 0 auto; 
}

.logo-spinner::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid #c7db11;
    border-right: 3px solid #052bff;
    animation: spin 1s linear infinite;
}

/* LOGO */
.logo-spinner img {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
}

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

/* texte */
.loader-box h2 {
    margin-top: 18px;
    font-size: 18px;
    font-weight: 600;
}

.loader-box p {
    font-size: 13px;
    opacity: 0.7;
}

/* disparition fluide */
.hide-loader {
    opacity: 0;
    visibility: hidden;
    transition: 0.6s ease;
}

/* ==========================
   GLOBAL CONTAINER
========================== */

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

/* ==========================
   NAVBAR PREMIUM
========================== */

.navbar{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:999;
    background:rgba(255,255,255,0.85);
    backdrop-filter:blur(15px);
    border-bottom:1px solid rgba(0,0,0,0.05);
}

.nav-container{
    max-width:1200px;
    margin:auto;
    padding:15px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.logo img{
    height:55px;
    border-radius:50px;
}

.logo-footer{
    /* height:40px; */
    border-radius:50%;
}

.nav-links{
    display:flex;
    list-style:none;
    gap:25px;
}

.nav-links li a{
    text-decoration:none;
    color:var(--dark);
    font-weight:500;
    transition:0.3s;
}

.nav-links li a:hover{
    color:var(--primary);
}

/* BUTTON */

.vote-btn{
    background:var(--primary);
    color:white;
    padding:10px 20px;
    border-radius:30px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.vote-btn:hover{
    transform:translateY(-2px);
}

/* HAMBURGER */

.hamburger{
    display:none;
    flex-direction:column;
    cursor:pointer;
}

.hamburger span{
    width:28px;
    height:3px;
    margin:4px;
    background:var(--dark);
    border-radius:5px;
}

/* ==========================
   HERO SECTION
========================== */

.hero{
    height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    position:relative;

    background:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.75)),
    url("../images/hero.jpg");

    background-size:cover;
    background-position:center;
    color:white;
}

.hero-content{
    max-width:800px;
    padding:20px;
}

.badge{
    display:inline-block;
    background:rgba(255,255,255,0.15);
    padding:8px 18px;
    border-radius:20px;
    font-size:14px;
    margin-bottom:20px;
}

.hero h1{
    font-size:3.8rem;
    font-weight:800;
    margin-bottom:15px;
}

.hero p{
    font-size:1.1rem;
    margin-bottom:30px;
    opacity:0.9;
}

/* COUNTER */

.event-counter{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-bottom:30px;
    flex-wrap:wrap;
}

.event-counter div{
    background:rgba(255,255,255,0.15);
    padding:15px;
    border-radius:12px;
    min-width:80px;
    backdrop-filter:blur(10px);
}

.event-counter span{
    font-size:1.8rem;
    font-weight:700;
    display:block;
}

/* BUTTONS */

.hero-buttons{
    display:flex;
    justify-content:center;
    gap:15px;
    flex-wrap:wrap;
}

.btn-primary,
.btn-secondary{
    padding:12px 22px;
    border-radius:30px;
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

.btn-primary{
    background:var(--primary);
    color:white;
}

.btn-primary:hover{
    transform:scale(1.05);
}

.btn-secondary{
    background:white;
    color:black;
}

.btn-secondary:hover{
    background:#f1f1f1;
}

/* ==========================
   STATS
========================== */

.stats{
    padding:80px 0;
    background:var(--gray);
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.stat-card{
    background:white;
    padding:30px;
    text-align:center;
    border-radius:15px;
    box-shadow:var(--shadow);
    transition:0.3s;
}

.stat-card:hover{
    transform:translateY(-8px);
}

.stat-card i{
    font-size:2rem;
    color:var(--primary);
    margin-bottom:10px;
}

.stat-card h2{
    font-size:2.5rem;
    color:var(--dark);
}

/* ==========================
   SECTIONS GLOBAL
========================== */

section{
    padding:80px 0;
}

.section-header{
    text-align:center;
    margin-bottom:40px;
}

.section-subtitle{
    color:var(--primary);
    font-weight:600;
}

.section-title{
    font-size:2.2rem;
    margin:10px 0;
}

.section-description{
    max-width:700px;
    margin:auto;
    opacity:0.7;
}

/* ==========================
   DOMAINES
========================== */

.domaines-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:25px;
}

.domaine-card{
    background:white;
    border-radius:15px;
    overflow:hidden;
    box-shadow:var(--shadow);
    transition:0.3s;
}

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

.domaine-image img{
    width:100%;
    height:200px;
    object-fit:cover;
}

.domaine-content{
    padding:20px;
}

.domaine-content h3{
    margin-bottom:8px;
}

.domaine-content p{
    opacity:0.7;
    margin-bottom:15px;
}

.domaine-content a{
    display:inline-block;
    background:var(--primary);
    color:white;
    padding:8px 15px;
    border-radius:20px;
    text-decoration:none;
}

/* ==========================
   CANDIDATES
========================== */

.candidates-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:25px;
}

.candidate-card{
    background:white;
    border-radius:15px;
    overflow:hidden;
    box-shadow:var(--shadow);
    transition:0.3s;
}

.candidate-card:hover{
    transform:translateY(-8px);
}

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

.candidate-info{
    padding:15px;
    text-align:center;
}

/* ==========================
   NEWSLETTER
========================== */

.newsletter{
    background:var(--dark);
    color:white;
    text-align:center;
}

.newsletter form{
    margin-top:20px;
    display:flex;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
}

.newsletter input{
    padding:12px;
    border:none;
    border-radius:8px;
    min-width:250px;
}

.newsletter button{
    padding:12px 20px;
    border:none;
    border-radius:8px;
    background:var(--primary);
    color:white;
    cursor:pointer;
}

/* ==========================
   CONTACT
========================== */

.contact-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.contact-card{
    background:white;
    padding:25px;
    text-align:center;
    border-radius:15px;
    box-shadow:var(--shadow);
}

.contact-card i{
    font-size:2rem;
    color:var(--primary);
    margin-bottom:10px;
}

.loading,
.error{
    text-align:center;
    padding:40px;
    font-size:18px;
    grid-column:1/-1;
}

.error{
    color:red;
}

/* ==========================
   FOOTER
========================== */

footer{
    background:black;
    color:white;
    text-align:center;
    padding:30px;
}

/* ==========================
   RESPONSIVE DESIGN
========================== */

@media (max-width: 992px){

    .hero h1{
        font-size:2.8rem;
    }

}

@media (max-width: 768px){

    .nav-links{
        position:fixed;
        top:80px;
        left:-100%;
        width:100%;
        background:white;
        flex-direction:column;
        padding:30px;
        transition:0.3s;
        text-align:center;
    }

    .nav-links.active{
        left:0;
    }

    .hamburger{
        display:flex;
    }

    .vote-btn{
        display:none;
    }

    .hero h1{
        font-size:2.2rem;
    }

    .event-counter{
        gap:10px;
    }

}