:root {
    --bleu-royal: #1e3a8a;
    --bleu-royal-light: #2d4ba8;
    --rouge-tradition: #dc2626;
    --rouge-tradition-light: #ef4444;
    --or-royal: #d97706;
    --or-royal-light: #f59e0b;
    --vert-fluor: #22c55e;
    --vert-fluor-light: #4ade80;
    --blanc: #ffffff;
    --noir: #1f2937;
    --gris-clair: #f8fafc;
}

/* ===== RÉINITIALISATION ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ===== NAVIGATION CORRIGÉE ===== */
.bg-royal {
    background: linear-gradient(135deg, var(--bleu-royal) 0%, var(--bleu-royal-light) 100%) !important;
    border-bottom: 3px solid var(--or-royal);
    padding: 0.5rem 0;
}

/* Logo corrigé */
.navbar-brand {
    padding: 0;
    margin: 0;
}

.logo-desktop {
    height: 100px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-mobile {
    height: 45px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: none !important;
}

/* Navigation principale simplifiée */
.royal-nav .nav-link {
    color: var(--blanc) !important;
    font-weight: 600;
    padding: 0.5rem 0.75rem !important;
    margin: 0 0.1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 1rem;
    white-space: nowrap;
}

.royal-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--or-royal-light) !important;
}

.royal-nav .nav-link.active {
    background: rgba(217, 119, 6, 0.2) !important;
    border: 1px solid var(--or-royal) !important;
}

/* Menus déroulants */
.dropdown-menu {
    background: var(--blanc);
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    border-top: 3px solid var(--or-royal);
}

.dropdown-item {
    padding: 0.6rem 1rem;
    color: var(--noir);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--or-royal);
    color: var(--blanc);
}

/* ===== CAROUSEL CORRIGÉ ===== */
.hero-carousel {
    margin-top: 76px; /* Hauteur de la navbar */
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-image {
    height: 70vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.7) 0%, rgba(220, 38, 38, 0.5) 100%);
}

.royal-caption {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    z-index: 2;
}

.royal-caption h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-weight: 700;
}

/* ===== RESPONSIVE MOBILE CORRIGÉ ===== */
@media (max-width: 768px) {
    /* Container fluid pour mobile */
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
   
    /* Logo mobile */
    .logo-desktop {
        display: none !important;
    }
   
    .logo-mobile {
        display: inline-block !important;
        height: 40px;
        max-width: 120px;
    }
   
    /* Navigation mobile compacte */
    .navbar-collapse {
        background: var(--bleu-royal);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        border: 2px solid var(--or-royal);
        max-height: 70vh;
        overflow-y: auto;
    }
   
    .royal-nav .nav-link {
        text-align: center;
        margin: 0.2rem 0;
        padding: 0.6rem !important;
        font-size: 0.85rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
   
    .royal-nav .nav-link:last-child {
        border-bottom: none;
    }
   
    /* Menus déroulants mobile */
    .dropdown-menu {
        background: rgba(255,255,255,0.95);
        margin: 0.3rem 0;
        text-align: center;
        border: 1px solid var(--or-royal);
    }
   
    /* Carousel mobile */
    .hero-carousel {
        margin-top: 70px;
    }
   
    .carousel-image {
        height: 50vh;
    }
   
    .royal-caption h1 {
        font-size: 1.5rem;
    }
   
    .royal-caption .lead {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .logo-mobile {
        height: 35px;
        max-width: 100px;
    }
   
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
        font-size: 0.9rem;
    }
   
    .carousel-image {
        height: 40vh;
    }
}

/* ===== CORRECTION ESPACEMENT GLOBAL ===== */
.main-content {
    width: 100%;
    overflow-x: hidden;
}

.container, .container-fluid {
    max-width: 100%;
}

/* Boutons Contact et Admin */

.royal-admin {
    background: rgba(220, 38, 38, 0.2) !important;
    border: 1px solid var(--rouge-tradition) !important;
}

.royal-admin:hover {
    background: var(--rouge-tradition) !important;
}

/* Styles pour les nouvelles sections améliorées */

/* Section Actualités et Événements */
.news-events-section {
    position: relative;
}

.featured-article {
    margin-bottom: 2rem;
}

.article-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2;
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Événements Timeline */
.events-timeline {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.event-item {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.event-item:hover {
    transform: translateX(5px);
}

.event-item:last-child {
    border-bottom: none;
}

.event-date-wrapper {
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.event-date {
    color: white;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.event-day {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
    display: block;
}

.event-month {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 600;
}

.event-content {
    flex: 1;
}

.event-title {
    margin-bottom: 0.5rem;
}

.event-description {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.event-meta {
    display: flex;
    align-items: center;
}

/* Section Nos Richesses */
.richesse-section {
    position: relative;
    overflow: hidden;
}

.richesse-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.richesse-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color, #f59e0b), transparent);
}

.richesse-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.icon-wrapper {
    transition: transform 0.3s ease;
}

.richesse-card:hover .icon-wrapper {
    transform: scale(1.1);
}

/* Section Hommages */
.hommage-section {
    position: relative;
}

.hommage-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}

.hommage-card:hover {
    transform: translateY(-5px);
}

.hommage-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.hommage-content {
    z-index: 2;
}

.hommage-role {
    font-weight: 600;
    font-size: 1.1rem;
}

.hommage-description {
    line-height: 1.6;
}

.hommage-quote {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.text-gold {
    color: #f59e0b !important;
}

/* Animations et effets */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-item {
        flex-direction: column;
        text-align: center;
    }
   
    .event-date-wrapper {
        margin-right: 0;
        margin-bottom: 1rem;
    }
   
    .event-meta {
        justify-content: center;
    }
   
    .richesse-card, .hommage-card {
        margin-bottom: 2rem;
    }
   
    .display-4 {
        font-size: 2rem;
    }
   
    .display-5 {
        font-size: 1.5rem;
    }
}

/* Effets de brillance pour les cartes */
.richesse-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.richesse-card:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(10%, 10%);
}

/* Styles pour les dashboards */
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.dashboard-stat {
    text-align: center;
    padding: 1.5rem;
}

.dashboard-stat .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--bleu-royal);
    display: block;
}

.dashboard-stat .stat-label {
    color: var(--noir);
    font-weight: 600;
}

/* Badges de profil */
.badge-profil {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
}

.badge-membre { background: var(--bleu-royal); color: white; }
.badge-tete_liste { background: var(--or-royal); color: white; }
.badge-gerant { background: var(--vert-fluor); color: white; }
.badge-notable { background: var(--rouge-tradition); color: white; }
.badge-roi { background: linear-gradient(135deg, var(--or-royal), var(--rouge-tradition)); color: white; }
.badge-admin { background: var(--noir); color: white; }

/* Tableaux dashboard */
.table-dashboard {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-dashboard th {
    background: linear-gradient(135deg, var(--bleu-royal), var(--bleu-royal-light));
    color: white;
    border: none;
    padding: 1rem;
}

.table-dashboard td {
    padding: 1rem;
    vertical-align: middle;
}

/* Navigation dashboard */
.dashboard-nav {
    background: linear-gradient(135deg, var(--bleu-royal), var(--bleu-royal-light));
    min-height: 100vh;
    padding: 0;
}

.dashboard-nav .nav-link {
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.dashboard-nav .nav-link:hover,
.dashboard-nav .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--or-royal-light);
    border-left: 4px solid var(--or-royal);
}

/* Notifications */
.notification-item {
    padding: 1rem;
    border-left: 4px solid var(--bleu-royal);
    background: var(--gris-clair);
    margin-bottom: 0.5rem;
    border-radius: 0 8px 8px 0;
}

.notification-item.non-lu {
    background: white;
    border-left-color: var(--rouge-tradition);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-stat .stat-number {
        font-size: 2rem;
    }
   
    .dashboard-card {
        margin-bottom: 1rem;
    }
   
    .dashboard-nav {
        min-height: auto;
        margin-bottom: 2rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Alertes personnalisées */
.alert-royal {
    background: linear-gradient(135deg, var(--bleu-royal), var(--bleu-royal-light));
    color: white;
    border: none;
    border-radius: 10px;
}

.alert-success-fluor {
    background: linear-gradient(135deg, var(--vert-fluor), var(--vert-fluor-light));
    color: white;
    border: none;
    border-radius: 10px;
}

/* Boutons améliorés */
.btn-royal {
    background: linear-gradient(135deg, var(--bleu-royal), var(--bleu-royal-light));
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-royal:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.4);
    color: white;
}

.btn-success-fluor {
    background: linear-gradient(135deg, var(--vert-fluor), var(--vert-fluor-light));
    border: none;
    color: white;
    font-weight: 600;
}




/* Assurer que l'espace publicitaire est visible sur tous les écrans */
.ad-space {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Styles pour les cartes publicitaires */
.ad-card {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #f59e0b;
}

.ad-icon {
    transition: transform 0.3s ease;
}

.ad-card:hover .ad-icon {
    transform: scale(1.1);
}

/* Correction de l'affichage responsive */
@media (max-width: 991.98px) {
    .ad-space {
        margin-top: 2rem;
    }
   
    .ad-card {
        margin-bottom: 1rem;
    }
}

@media (min-width: 992px) {
    .ad-space {
        position: sticky;
        top: 100px;
    }
}

/* Assurer que les colonnes s'affichent correctement */
.col-lg-4 {
    display: block !important;
}

/* Correction des marges pour l'espace publicitaire */
.events-timeline {
    margin-bottom: 2rem;
}

/* Styles pour les boutons publicitaires */
.ad-card .btn {
    transition: all 0.3s ease;
}

.ad-card .btn:hover {
    transform: translateX(5px);
    background: #dc2626 !important;
}

/* Animation pour les publicités */
@keyframes fadeInAd {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ad-card {
    animation: fadeInAd 0.6s ease-out;
}

/* Correction de la hauteur du carousel */
.carousel-image {
    min-height: 500px;
    background-position: center;
    background-size: cover;
}

@media (max-width: 768px) {
    .carousel-image {
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .carousel-image {
        min-height: 300px;
    }
}

/* Correction de l'overflow */
.main-content {
    overflow-x: hidden;
}

.container, .container-fluid {
    max-width: 100%;
}