/* =========================================
   VARIABLES GLOBALES (Facile à modifier)
   ========================================= */
* {
    box-sizing: border-box;
}

:root {
    --primary-red: #E63946;
    --primary-blue: #3498db;
    --primary-orange: #f39c12;
    --dark-bg: #1A1A24;
    --footer-bg: #2c3e50;
    --text-main: #2C3E50;
    --text-light: #7f8c8d;
    --bg-light: #f8fafc;
    --white: #FFFFFF;
}

/* =========================================
   RÉINITIALISATION & BASE
   ========================================= */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    background: linear-gradient(180deg, #eef5ff 0%, #f8fafc 35%, #ffffff 100%);
    color: var(--text-main);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Titres de sections */
.section-title-orange, .section-title-blue {
    font-size: 1.8rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin: 50px 0 25px 0;
}
.section-title-orange { color: var(--primary-orange); }
.section-title-blue { color: var(--primary-blue); }

/* =========================================
   1. EN-TÊTE (HEADER)
   ========================================= */
.main-header {
    background-color: var(--dark-bg);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-red);
    border-radius: 12px 12px 0 0;
    margin-top: 20px; /* Ajoute un petit espace en haut de l'écran */
}

.site-title {
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    text-decoration: none;
}

.site-title span {
    color: var(--primary-red);
}

.auth-nav {
    display: flex;
    align-items: center;
}

.auth-nav a, .auth-nav span {
    font-size: 0.9rem;
}

/* =========================================
   2. NAVIGATION PRINCIPALE & MENU DÉROULANT
   ========================================= */
.main-nav {
    background-color: var(--white);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 12px 12px;
    margin-bottom: 30px;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 20px 15px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: var(--primary-red);
    border-bottom: 3px solid var(--primary-red);
}

.nav-link-special {
    background-color: var(--primary-red);
    color: var(--white) !important;
    border-radius: 5px;
    padding: 8px 15px !important;
    margin-left: 15px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    border: none !important;
}

.nav-link-special:hover {
    background-color: #C0392B;
    transform: translateY(-2px);
}

/* Menu Déroulant (Dropdown) */
.dropdown { position: relative; display: inline-block; }

.dropbtn {
    background: none; border: none; cursor: pointer;
    color: var(--text-main); font-weight: 600; font-size: 0.95rem;
    padding: 20px 15px; font-family: 'Open Sans', sans-serif;
    transition: all 0.3s; border-bottom: 3px solid transparent;
    display: flex; align-items: center; gap: 5px;
}

.dropbtn:hover, .dropdown.active .dropbtn {
    color: var(--primary-red); 
    border-bottom: 3px solid var(--primary-red);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    top: 100%; left: 0;
    z-index: 200;
    overflow: hidden;
    border-top: 3px solid var(--primary-red);
}

.dropdown-content.show { display: block; animation: fadeIn 0.2s ease-in-out; }

.dropdown-content a {
    color: var(--text-main); padding: 12px 20px; text-decoration: none; display: block;
    font-size: 0.9rem; transition: background 0.2s; border-bottom: 1px solid #f1f5f9;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: var(--bg-light); color: var(--primary-red); padding-left: 25px; }

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

/* =========================================
   3. BANNIÈRE HERO (Page d'accueil)
   ========================================= */
.hero-banner {
    position: relative;
    /* Le lien de l'image devra être ajusté dans le fichier HTML (style="background-image: url(...)") si besoin, mais on laisse un fond de secours ici */
    background-color: var(--footer-bg);
    padding: 80px 20px;
    border-radius: 12px;
    text-align: center;
    color: var(--white);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

.hero-title-modern { font-size: 2.8rem; font-weight: 800; margin-bottom: 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-subtitle-modern { font-size: 1.2rem; color: #eaedd1; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

.search-container-modern { max-width: 600px; margin: 0 auto; display: flex; background: var(--white); padding: 6px; border-radius: 50px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); }
.search-input-modern { flex: 1; border: none; padding: 12px 25px; font-size: 16px; border-radius: 50px; outline: none; }
.btn-search-modern { background: var(--primary-orange); color: var(--white); border: none; padding: 12px 30px; border-radius: 50px; font-weight: bold; cursor: pointer; transition: background 0.3s; }
.btn-search-modern:hover { background: #e67e22; }

/* =========================================
   4. BANDEAU DÉFILANT (TICKER)
   ========================================= */
.news-ticker-container { display: flex; align-items: center; background-color: #1e293b; color: var(--white); padding: 10px 15px; border-radius: 8px; margin-bottom: 40px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); overflow: hidden; position: relative; }
.ticker-label { background-color: #e74c3c; color: var(--white); padding: 6px 15px; border-radius: 4px; font-weight: bold; font-size: 0.85rem; text-transform: uppercase; white-space: nowrap; z-index: 2; box-shadow: 2px 0 10px rgba(0,0,0,0.5); }
.ticker-wrapper { flex: 1; overflow: hidden; position: relative; margin: 0 15px; -webkit-mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent); mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: scrollTicker 55s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-item { padding: 0 20px; font-size: 0.95rem; display: inline-flex; align-items: center; }
.ticker-item::after { content: "•"; color: #64748b; margin-left: 40px; }
.ticker-item:last-child::after { display: none; }
.ticker-item a { color: #f8fafc; text-decoration: none; transition: color 0.3s ease; }
.ticker-item a:hover { color: var(--primary-orange); text-decoration: underline; }
.ticker-link-all { white-space: nowrap; font-size: 0.85rem; color: #cbd5e1; text-decoration: none; font-weight: 600; z-index: 2; padding-left: 15px; border-left: 1px solid #334155; transition: color 0.3s; }
.ticker-link-all:hover { color: var(--white); }

@keyframes scrollTicker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* =========================================
   5. GRILLES & CARTES (Pour l'alignement parfait)
   ========================================= */
.home-section { margin-bottom: 50px; }

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.profile-card, .post-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-shadow:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important; 
}

/* =========================================
   6. PARTENAIRES
   ========================================= */
.partners-section { background-color: var(--white); padding: 40px 20px; border-radius: 12px; margin-bottom: 50px; text-align: center; border: 1px solid #e2e8f0; }
.partners-title { color: var(--dark-bg); font-size: 1.5rem; margin-bottom: 30px; font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.partners-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px; }
.partner-logo { max-width: 140px; max-height: 70px; object-fit: contain; filter: grayscale(100%); opacity: 0.7; transition: all 0.3s ease; }
.partner-logo:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

/* =========================================
   7. PIED DE PAGE (FOOTER)
   ========================================= */
.site-footer {
    background-color: var(--footer-bg);
    color: #bdc3c7;
    padding: 50px 30px 20px 30px;
    margin-top: 60px;
    border-radius: 12px 12px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand h3 { color: var(--primary-orange); margin: 0 0 15px 0; font-size: 1.5rem; font-family: 'Montserrat', sans-serif; }
.footer-links-group h4 { color: var(--white); margin: 0 0 15px 0; font-size: 1.1rem; border-bottom: 2px solid #34495e; padding-bottom: 10px; }
.footer-links-group ul { list-style: none; padding: 0; margin: 0; }
.footer-links-group ul li { margin-bottom: 10px; }
.footer-links-group ul li a { color: #bdc3c7; text-decoration: none; transition: color 0.2s; }
.footer-links-group ul li a:hover { color: var(--primary-orange); padding-left: 5px; }

.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #34495e; font-size: 0.9rem; }

/* Centrage et conteneur principal */
.auth-container {
    max-width: 400px;
    margin: 50px auto; /* Centre horizontalement et ajoute de l'espace en haut */
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-title {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

/* Espacement des éléments du formulaire */
.auth-form div {
    margin-bottom: 15px;
}

/* Mise en forme des labels et inputs */
.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #34495e;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    box-sizing: border-box; /* Important pour que le padding ne dépasse pas la largeur */
}

/* Le bouton */
.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #8e44ad;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: #732d91;
}

/* Footer de l'auth */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #7f8c8d;
}

.site-footer {
    background-color: #f8f9fa; /* Fond léger pour délimiter la zone */
    border-top: 2px solid #e2e8f0; /* Bordure nette */
    padding: 50px 20px 30px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* Titres du footer : Couleur primaire */
.footer-links-group h4, .footer-brand h3 {
    color: #2c3e50; 
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 20px;
}

/* Texte général : Couleur sombre pour la visibilité */
.footer-brand p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Liens : Couleur primaire par défaut, accentuée au survol */
.footer-links-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links-group ul li a {
    color: #475569; /* Gris sombre pour le contraste */
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links-group ul li a:hover {
    color: #3498db; /* Votre bleu dynamique au survol */
}

/* Bas de page */
.footer-bottom {
    max-width: 1100px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}