/* Variables CSS */
:root {
    --primary-color: #852702;
    --primary-light: #ab3303;
    --primary-dark: #5e1c01;
    --primary-hover: #a63203;
    --secondary-color: #2c3e50;
    --menu-bg: #53262A;
    --accent-yellow: #F6970B;
    --accent-gold: #F6970B;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
    --text-muted: #64748b;
    --gray-light: #f8fafc;
    --gray-medium: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* Bootstrap Primary Overrides */
.btn-primary,
.bg-primary,
.badge.bg-primary {
    background-color: #852702 !important;
    border-color: #852702 !important;
}

/* Force tous les badges primary en marron */
/* Preload styles removed (preload feature deleted) */
/* If you need to re-enable preload, restore the previous CSS block. */
.nav-link {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 4px;
}

.nav-link:hover {
    color: #F6970B !important;
}

.nav-link.active {
    color: #F6970B !important;
    /* Jaune d'or plus vif */
    font-weight: 700;
}

.nav-link.active::after,
.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: #F6970B;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-yellow);
    background-color: rgba(165, 94, 26, 0.1);
    border-left-color: var(--accent-yellow);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--text-light);
    padding: 60px 0;
}

/* Cards */
.card {
    background: var(--text-light);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(133, 39, 2, 0.2);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.service-card-modern {
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 1;
}

.service-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card-modern:hover::before {
    opacity: 1;
}

.service-card-modern:hover * {
    color: white !important;
}

.service-card-modern h4 {
    font-size: 1.15rem;
    transition: color 0.4s ease;
}

.service-card-modern .icon-box {
    width: 80px;
    height: 80px;
    background: rgba(133, 39, 2, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.4s ease;
}

.service-card-modern:hover .icon-box {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.service-card-modern .icon-box i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.4s ease;
}

.service-card-modern:hover .icon-box i {
    color: white;
}

.card-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(133, 39, 2, 0.1);
}

/* Slider */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.slider-item {
    display: none;
    position: relative;
}

.slider-item.active {
    display: block;
}

.slider-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--text-light);
    padding: 30px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.slider-btn {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: var(--text-light);
}

/* Statistics */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--text-light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* News & Communications */
.news-item,
.communique-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.news-item:last-child,
.communique-item:last-child {
    border-bottom: none;
}

.news-meta,
.communique-meta {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-bottom: 8px;
}

.news-title,
.communique-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.news-title a,
.communique-title a {
    text-decoration: none;
    color: inherit;
}

.news-title a:hover,
.communique-title a:hover {
    color: var(--primary-color);
}

/* Video Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.video-card {
    background: var(--text-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background-color: #000;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(133, 39, 2, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.video-play-btn:hover {
    background-color: var(--primary-hover);
}

.video-info {
    padding: 15px;
}

.video-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.video-description {
    font-size: 0.9rem;
    color: var(--gray-medium);
}

/* Contact Form */
.contact-form {
    background: var(--text-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Map */
.map-container {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }

    .slider-item img {
        height: 250px;
    }

    .slider-content {
        padding: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

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

    .video-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .slider-content {
        padding: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 3rem;
}

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

/* Bootstrap Overrides for Warning Color */
.bg-warning {
    background-color: var(--accent-yellow) !important;
}

.text-warning {
    color: var(--accent-yellow) !important;
}

.btn-warning {
    background-color: var(--accent-yellow) !important;
    border-color: var(--accent-yellow) !important;
    color: white !important;
}

.btn-warning:hover {
    background-color: #8b4e15 !important;
    border-color: #8b4e15 !important;
}

.hover-warning:hover {
    color: var(--accent-yellow) !important;
}

/* Breaking News Ticker */
.breaking-news-container {
    display: flex;
    background: #fff;
    border-bottom: 2px solid #852702;
    height: 44px;
    align-items: center;
    overflow: hidden;
    position: relative;
    top: auto;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

@media (max-width: 991px) {
    .breaking-news-container {
        top: auto;
        /* Ajustement pour mobile */
    }
}

.breaking-news-label {
    background: #dc3545;
    color: #fff;
    padding: 0 25px 0 20px;
    height: 44px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    position: relative;
    z-index: 10;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.breaking-news-label::after {
    content: '';
    position: absolute;
    right: -18px;
    top: 0;
    border-left: 18px solid #dc3545;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
}

.breaking-news-content {
    flex-grow: 1;
    overflow: hidden;
    height: 44px;
    position: relative;
    cursor: grab;
    user-select: none;
}

.breaking-news-content:active {
    cursor: grabbing;
}

.breaking-news-ticker {
    display: flex;
    white-space: nowrap;
    height: 44px;
    line-height: 44px;
    position: absolute;
    left: 0;
    will-change: transform;
}

.breaking-news-ticker span {
    display: inline-flex;
    align-items: center;
    padding-right: 80px;
    font-size: 14px;
    color: #444;
    font-weight: 500;
}

.breaking-news-label i {
    animation: pulse-bolt 2s infinite;
    color: #F6970B;
}

@keyframes pulse-bolt {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .breaking-news-label {
        padding: 0 15px;
        font-size: 11px;
    }

    .breaking-news-label::after {
        right: -12px;
        border-left-width: 12px;
    }
}

.hover-primary:hover {
    color: #852702 !important;
    transition: color 0.3s ease;
}

/* Preload Styles */
.preload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #852702 0%, #53262A 50%, #2c3e50 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    visibility: visible;
}

.preload-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preload-container {
    text-align: center;
    position: relative;
    z-index: 10;
    max-width: 780px;
    padding: 2rem;
    color: white;
}

/* Layout top */
.preload-top {
    align-items: center;
    justify-content: center;
}

/* Logo animé */
.preload-logo { margin-bottom: 0; }
.logo-container { position: relative; display: inline-block; width: 120px; height: 120px; }
.logo-image { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 2; filter: brightness(0) invert(1); animation: logoFloat 3s ease-in-out infinite; }
.logo-pulse { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 140px; height: 140px; border: 3px solid rgba(255,255,255,0.18); border-radius: 50%; animation: pulse 2s ease-in-out infinite; }

@keyframes logoFloat { 0%,100% { transform: translateY(0px);} 50% { transform: translateY(-8px);} }
@keyframes pulse { 0% { transform: translate(-50%,-50%) scale(0.9); opacity: 1;} 50% { transform: translate(-50%,-50%) scale(1.08); opacity: 0.35;} 100% { transform: translate(-50%,-50%) scale(0.9); opacity: 1;} }

/* Gavel (marteau) */
.preload-gavel-wrapper { width: 140px; }
.preload-gavel { position: relative; width: 100%; height: 80px; display:flex; align-items:flex-end; justify-content:center; }
.gavel-base { width: 80px; height: 10px; background: rgba(255,255,255,0.08); border-radius:6px; box-shadow: 0 6px 18px rgba(0,0,0,0.35) inset; transform-origin: center; }
.gavel-handle { position: absolute; right: 10px; bottom: 14px; transform-origin: 10% 30%; transition: transform 0.35s cubic-bezier(.2,.7,.2,1); }
.preload-gavel.strike .gavel-handle { transform: rotate(-35deg) translate(-6px,6px); animation: gavelStrike 0.45s ease-out; }
.preload-gavel.strike .gavel-base { transform: translateY(4px) scaleX(0.98); box-shadow: 0 10px 30px rgba(0,0,0,0.45) inset; transition: transform 0.25s ease; }

/* Impact particles for hammer strike */
.gavel-impact {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    pointer-events: none;
    width: 60px;
    height: 14px;
    overflow: visible;
}
.gavel-impact span {
    position: absolute;
    bottom: 0;
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    opacity: 0;
}
.gavel-impact.impact span { animation: impactBurst 420ms ease-out forwards; }

@keyframes gavelStrike {
    0% { transform: rotate(0deg) translate(0,0); }
    60% { transform: rotate(-50deg) translate(-8px,8px); }
    100% { transform: rotate(-35deg) translate(-6px,6px); }
}

@keyframes impactBurst {
    0% { transform: translateY(0) scale(0.6); opacity: 1; }
    60% { transform: translateY(-18px) scale(1); opacity: 0.9; }
    100% { transform: translateY(-34px) scale(0.3); opacity: 0; }
}

/* Logo shake on strike */
.logo-container.shake { animation: logoShake 420ms cubic-bezier(.2,.7,.2,1); }
@keyframes logoShake {
    0% { transform: translateY(0); }
    25% { transform: translateY(-6px) rotate(-1deg); }
    50% { transform: translateY(2px) rotate(1deg); }
    75% { transform: translateY(-3px) rotate(-0.5deg); }
    100% { transform: translateY(0); }
}
.gavel-svg { display:block; }

.gavel-caption { opacity: 0.9; }

/* Scales */
.preload-scales { opacity: 0.85; }
.scales-svg { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }

/* Texte de chargement */
.preload-text { margin-top: 0.8rem; color: white; }
.preload-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.25rem; text-shadow: 0 2px 6px rgba(0,0,0,0.35); animation: fadeInUp 0.8s ease-out; }
.preload-subtitle { font-size: 0.95rem; opacity: 0.95; margin: 0; animation: fadeInUp 0.8s ease-out 0.2s both; }

/* Barre de progression */
.preload-progress { margin-top: 0.9rem; }
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.12); border-radius: 4px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #f6b34b 0%, #ffffff 70%); border-radius: 4px; width: 0%; transition: width 0.25s linear; box-shadow: 0 0 12px rgba(246,179,75,0.35); }
.progress-percentage { color: white; font-size: 0.95rem; font-weight: 700; opacity: 0.95; }

/* Particules animées */
.preload-particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.particle { position: absolute; background: rgba(255,255,255,0.06); border-radius: 50%; animation: float 6s ease-in-out infinite; }
.particle-1 { width: 5px; height: 5px; top: 18%; left: 8%; animation-delay: 0s; }
.particle-2 { width: 6px; height: 6px; top: 72%; left: 78%; animation-delay: 1s; }
.particle-3 { width: 4px; height: 4px; top: 38%; left: 88%; animation-delay: 2s; }
.particle-4 { width: 5px; height: 5px; top: 82%; left: 22%; animation-delay: 3s; }
.particle-5 { width: 4px; height: 4px; top: 12%; left: 62%; animation-delay: 4s; }
.particle-6 { width: 6px; height: 6px; top: 50%; left: 6%; animation-delay: 5s; }

@keyframes float { 0%,100% { transform: translateY(0px) translateX(0px); opacity: 0.08; } 25% { transform: translateY(-18px) translateX(8px); opacity: 0.28; } 50% { transform: translateY(-10px) translateX(-10px); opacity: 0.2; } 75% { transform: translateY(-28px) translateX(5px); opacity: 0.36; } }

.particle-4 {
    width: 5px;
    height: 5px;
    top: 80%;
    left: 20%;
    animation-delay: 3s;
}

.particle-5 {
    width: 4px;
    height: 4px;
    top: 10%;
    left: 60%;
    animation-delay: 4s;
}

.particle-6 {
    width: 6px;
    height: 6px;
    top: 50%;
    left: 5%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
        opacity: 0.2;
    }
    75% {
        transform: translateY(-30px) translateX(5px);
        opacity: 0.4;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preload-container {
        padding: 1rem;
        max-width: 300px;
    }
    
    .logo-container {
        width: 80px;
        height: 80px;
    }
    
    .logo-pulse {
        width: 100px;
        height: 100px;
    }
    
    .preload-title {
        font-size: 1.4rem;
    }
    
    .preload-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .preload-container {
        padding: 1rem;
        max-width: 250px;
    }
    
    .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .logo-pulse {
        width: 80px;
        height: 80px;
    }
    
    .preload-title {
        font-size: 1.2rem;
    }
    
    .preload-subtitle {
        font-size: 0.8rem;
    }
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animation de chargement pour les éléments */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}