/* ===================================
   VARIABLES & RESET
   =================================== */
:root {
    --bleu-institutionnel: #173F8A;
    --bleu-fonce: #0F2D5E;
    --orange-accent: #F39C12;
    --blanc: #FFFFFF;
    --noir: #000000;
    --gris-clair: #F5F5F5;
    --gris: #666666;
    
    --font-titres: 'Montserrat', sans-serif;
    --font-corps: 'Georgia', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-corps);
    color: var(--noir);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   HEADER - PLEINE LARGEUR
   =================================== */
.site-header {
    background: var(--blanc);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.header-container-full {
    width: 100%;
    padding: 0 30px;
    max-width: 100%;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

/* Logo à gauche */
.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text strong {
    font-family: var(--font-titres);
    font-size: 1.3rem;
    color: var(--bleu-institutionnel);
    font-weight: 700;
    line-height: 1.2;
}

.logo-text small {
    font-family: var(--font-titres);
    font-size: 0.65rem;
    color: var(--gris);
}

/* Groupe droite : Nav + Admin + Burger */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Navigation à droite */
.main-nav-right {
    flex-shrink: 0;
}

.main-nav-right ul {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.main-nav-right > ul > li {
    position: relative;
}

.main-nav-right a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--noir);
    font-family: var(--font-titres);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s, background 0.3s;
    border-radius: 5px;
    white-space: nowrap;
}

.main-nav-right a:hover {
    color: var(--bleu-institutionnel);
    background: rgba(23, 63, 138, 0.05);
}

/* Dropdown desktop */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--blanc);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 220px;
    border-top: 3px solid var(--bleu-institutionnel);
    border-radius: 0 0 8px 8px;
    z-index: 100;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.main-nav-right > ul > li.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown li {
    list-style: none;
}

.dropdown a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--gris-clair);
    font-size: 0.85rem;
    border-radius: 0;
    white-space: normal;
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    background: var(--gris-clair);
    color: var(--bleu-institutionnel);
}

/* ===================================
   BOUTON CONNEXION ADMIN
   =================================== */
.admin-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--bleu-institutionnel), var(--bleu-fonce));
    color: var(--blanc);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(23, 63, 138, 0.3);
    flex-shrink: 0;
    position: relative;
}

.admin-login-btn:hover {
    background: linear-gradient(135deg, var(--orange-accent), #E67E22);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.admin-login-btn i {
    font-size: 1rem;
}

/* Tooltip au survol */
.admin-login-btn::after {
    content: 'Espace Admin';
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--noir);
    color: var(--blanc);
    padding: 4px 10px;
    border-radius: 5px;
    font-family: var(--font-titres);
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.admin-login-btn:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -36px;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    flex-shrink: 0;
}

.burger-menu span {
    width: 26px;
    height: 3px;
    background: var(--bleu-institutionnel);
    border-radius: 3px;
    transition: all 0.3s;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   MENU MOBILE - SLIDE DEPUIS LA DROITE
   =================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Carte qui slide depuis la droite - NE PREND PAS TOUT L'ÉCRAN */
.mobile-menu-content {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: var(--blanc);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1003;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-menu-content {
    right: 0;
}

/* Header de la carte mobile */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid var(--gris-clair);
    position: sticky;
    top: 0;
    background: var(--blanc);
    z-index: 10;
    gap: 10px;
}

.mobile-menu-header img {
    height: 40px;
    width: auto;
}

.mobile-menu-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mobile-menu-header-text strong {
    display: block;
    font-family: var(--font-titres);
    font-size: 1.1rem;
    color: var(--bleu-institutionnel);
    font-weight: 700;
    line-height: 1.2;
}

.mobile-menu-header-text small {
    display: block;
    font-family: var(--font-titres);
    font-size: 0.6rem;
    color: var(--gris);
}

.close-menu {
    background: var(--bleu-institutionnel);
    color: var(--blanc);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
}

.close-menu:hover {
    background: var(--bleu-fonce);
    transform: rotate(90deg);
}

/* Navigation mobile */
.mobile-nav {
    padding: 15px 0;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav > ul > li {
    border-bottom: 1px solid var(--gris-clair);
}

.mobile-nav > ul > li > a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--noir);
    font-family: var(--font-titres);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.mobile-nav > ul > li > a:hover {
    background: rgba(23, 63, 138, 0.05);
    color: var(--bleu-institutionnel);
}

/* Dropdown mobile avec + */
.mobile-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.mobile-dropdown-header > a {
    flex: 1;
    display: block;
    padding: 15px 0;
    text-decoration: none;
    color: var(--noir);
    font-family: var(--font-titres);
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-toggle {
    background: none;
    border: 2px solid var(--bleu-institutionnel);
    color: var(--bleu-institutionnel);
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dropdown-toggle:hover {
    background: var(--bleu-institutionnel);
    color: var(--blanc);
}

.mobile-dropdown.active .dropdown-toggle {
    transform: rotate(45deg);
    background: var(--bleu-institutionnel);
    color: var(--blanc);
}

.mobile-dropdown-content {
    display: none;
    padding-left: 0;
    margin-top: 0;
    background: var(--gris-clair);
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block;
}

.mobile-dropdown-content li {
    border-bottom: none !important;
}

.mobile-dropdown-content a {
    display: block;
    padding: 12px 20px 12px 40px;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--gris);
    text-decoration: none;
    transition: all 0.3s;
}

.mobile-dropdown-content a:hover {
    color: var(--bleu-institutionnel);
    padding-left: 45px;
}

/* Lien admin dans le menu mobile */
.mobile-admin-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(23, 63, 138, 0.08), rgba(243, 156, 18, 0.05));
    margin: 15px 15px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--bleu-institutionnel);
    font-family: var(--font-titres);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    border: 2px solid rgba(23, 63, 138, 0.15);
}

.mobile-admin-link:hover {
    background: linear-gradient(135deg, var(--bleu-institutionnel), var(--bleu-fonce));
    color: var(--blanc);
}

.mobile-admin-link i {
    width: 32px;
    height: 32px;
    background: var(--bleu-institutionnel);
    color: var(--blanc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.mobile-admin-link:hover i {
    background: var(--orange-accent);
    transform: rotate(360deg);
}

.mobile-admin-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bleu-institutionnel), transparent);
    margin: 15px 20px;
    opacity: 0.3;
}

/* ===================================
   FOOTER - FOND BLEU
   =================================== */
.site-footer {
    background: var(--bleu-fonce);
    color: var(--blanc);
    margin-top: 80px;
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-logo img {
    height: 70px;
    margin-bottom: 15px;
}

.footer-slogan {
    font-family: var(--font-titres);
    font-style: italic;
    margin-bottom: 20px;
    color: var(--blanc);
}

.footer-contact p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--blanc);
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--blanc);
    color: var(--bleu-institutionnel);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--bleu-fonce);
    color: var(--blanc);
    transform: translateY(-3px);
}

.footer-col h3 {
    font-family: var(--font-titres);
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--blanc);
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--blanc);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    position: relative;
    display: inline-block;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--blanc);
    transition: width 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--blanc);
}

.footer-col ul a:hover::after {
    width: 100%;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-family: var(--font-titres);
}

.newsletter-form button {
    background: var(--blanc);
    color: var(--bleu-institutionnel);
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--gris-clair);
}

/* Footer bottom */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.footer-legal a {
    position: relative;
    display: inline-block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.footer-legal a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--blanc);
    transition: width 0.3s ease;
}

.footer-legal a:hover {
    color: var(--blanc);
}

.footer-legal a:hover::after {
    width: 100%;
}

/* ===================================
   BOUTON WHATSAPP FLOTTANT
   =================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--blanc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    font-size: 32px;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: var(--noir);
    color: var(--blanc);
    padding: 8px 12px;
    border-radius: 5px;
    font-family: var(--font-titres);
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===================================
   BOUTON RETOUR EN HAUT
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 50px;
    height: 50px;
    background: var(--blanc);
    color: var(--bleu-institutionnel);
    border: 2px solid var(--bleu-institutionnel);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--bleu-institutionnel);
    color: var(--blanc);
    transform: translateY(-3px);
}

/* ===================================
   RESPONSIVE
   =================================== */

/* TABLETTE : cache la nav, affiche le burger */
@media (max-width: 992px) {
    .header-container-full {
        padding: 0 20px;
    }
    
    .main-nav-right {
        display: none;
    }
    
    .burger-menu {
        display: flex;
    }
    
    .admin-login-btn {
        width: 36px;
        height: 36px;
    }
    
    .admin-login-btn i {
        font-size: 0.9rem;
    }
    
    .admin-login-btn::after {
        display: none;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .header-container-full {
        padding: 0 15px;
    }
    
    .header-wrapper {
        gap: 10px;
    }
    
    .logo img {
        height: 42px;
    }
    
    .logo-text strong {
        font-size: 1.1rem;
    }
    
    .logo-text small {
        font-size: 0.6rem;
    }
    
    .admin-login-btn {
        width: 34px;
        height: 34px;
    }
    
    .burger-menu span {
        width: 24px;
        height: 2.5px;
    }
    
    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-legal a {
        margin: 0 10px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float i {
        font-size: 26px;
    }
    
    .back-to-top {
        right: 80px;
        width: 45px;
        height: 45px;
    }
}

/* TRÈS PETIT ÉCRAN */
@media (max-width: 400px) {
    .logo img {
        height: 38px;
    }
    
    .logo-text small {
        display: none;
    }
    
    .admin-login-btn {
        width: 32px;
        height: 32px;
    }
    
    .mobile-menu-content {
        width: 100%;
        max-width: 100%;
    }
}

/* ===================================
   ORIENTATION HORIZONTALE (PAYSAGE)
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    /* Header compact */
    .site-header {
        padding: 8px 0;
    }
    
    .logo img {
        height: 35px;
    }
    
    .logo-text strong {
        font-size: 1rem;
    }
    
    .logo-text small {
        display: none; /* Cache le sous-titre en paysage */
    }
    
    .admin-login-btn {
        width: 32px;
        height: 32px;
    }
    
    .burger-menu span {
        width: 22px;
        height: 2px;
    }
    
    /* Menu mobile en paysage */
    .mobile-menu-content {
        width: 280px;
        max-width: 70%;
    }
    
    .mobile-menu-header {
        padding: 10px 15px;
    }
    
    .mobile-menu-header img {
        height: 30px;
    }
    
    .mobile-menu-header-text strong {
        font-size: 0.95rem;
    }
    
    .mobile-nav > ul > li > a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Hero plus compact */
    .hero-banner {
        height: 60vh;
        min-height: 300px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .hero-content .slogan {
        font-size: 1rem;
    }
    
    .hero-buttons {
        gap: 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Sections plus compactes */
    .chiffres-section {
        padding: 40px 0;
    }
    
    .chiffres-header h2 {
        font-size: 1.8rem;
    }
    
    .chiffres-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .chiffre-card {
        padding: 20px 15px;
    }
    
    .chiffre-card .number {
        font-size: 2rem;
    }
    
    .actualites-section {
        padding: 40px 0;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .decouverte-section {
        padding: 40px 15px;
    }
    
    .decouverte-section h2 {
        font-size: 1.5rem;
    }
    
    .decouverte-section p {
        font-size: 0.95rem;
    }
    
    .btn-decouverte {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    /* Footer compact */
    .site-footer {
        margin-top: 40px;
    }
    
    .footer-main {
        padding: 30px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* WhatsApp button plus petite */
    .whatsapp-float {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float i {
        font-size: 24px;
    }
    
    /* Back to top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 70px;
    }
}

/* Très petit écran en paysage */
@media (max-height: 400px) and (orientation: landscape) {
    .logo-text {
        display: none; /* Cache complètement le texte du logo */
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .chiffres-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .chiffre-card .label {
        font-size: 0.75rem; 
    }
}