/* ============================================================
   FAMAN ENERGIES — Design System Centralisé
   ============================================================ */

:root {
    --orange-brand: #ea580c;
    --orange-brand-dark: #c2410c;
    --orange-brand-light: #fb923c;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; }

/* ===== UTILITAIRES COULEURS ===== */
.text-orange-brand { color: var(--orange-brand); }
.bg-orange-brand { background-color: var(--orange-brand); }
.hover-bg-orange-brand:hover { background-color: var(--orange-brand-dark); }
.border-orange-brand { border-color: var(--orange-brand); }

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--orange-brand); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange-brand-dark); }

/* Scrollbar cachée (pour le slider d'images) */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== LOADER ===== */
#loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loader.hidden-loader { 
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none; 
}

/* ===== HEADER COMMUN ===== */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--orange-brand);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* ===== FOOTER COMMUN ===== */
footer a { transition: color 0.3s ease; }
footer a:hover { color: #fff; }

/* ===== BACK TO TOP ===== */
#backToTop { transition: all 0.3s ease; }
#backToTop.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ===== LOADER PROGRESS BAR ===== */
.faman-progress-bar {
    animation: famanProgress 3.1s ease-in-out forwards;
    animation-delay: 0.3s;
}
@keyframes famanProgress {
    0%   { width: 0%; }
    100% { width: 100%; }
}

/* ===== MODULE VIDÉO ===== */
.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    cursor: pointer;
}
.video-thumbnail-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.6s ease, opacity 0.3s ease;
}
.video-wrapper:hover .video-thumbnail-img {
    transform: scale(1.05);
    opacity: 0.85;
}
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 70px;
    height: 70px;
    background: #ea580c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(234, 88, 12, 0.5);
    transition: all 0.3s ease;
}
.video-play-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
    margin-left: 4px;
}
.video-wrapper:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 15px 50px rgba(234, 88, 12, 0.7);
}
.video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    z-index: 1;
    pointer-events: none;
    transition: background 0.3s ease;
}
.video-wrapper:hover::after {
    background: rgba(15, 23, 42, 0.4);
}

/* ===== HERO GRADIENT ===== */
.hero-gradient {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.8));
}

/* ===== PARALLAX ===== */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ============================================================
   ===== TYPOGRAPHIE CONTENU D'ARTICLE (article.html) =====
   ============================================================ */
.article-content h1 { font-size: 2.25rem; font-weight: 800; color: #0f172a; margin-top: 2rem; margin-bottom: 1rem; line-height: 1.2; }
.article-content h2 { font-size: 1.875rem; font-weight: 700; color: #0f172a; margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.3; }
.article-content h3 { font-size: 1.5rem; font-weight: 600; color: #1e293b; margin-top: 2rem; margin-bottom: 0.75rem; line-height: 1.4; }
.article-content h4 { font-size: 1.25rem; font-weight: 600; color: #334155; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.article-content p { font-size: 1.125rem; line-height: 1.8; color: #475569; margin-bottom: 1.5rem; }
.article-content strong { font-weight: 700; color: #0f172a; }
.article-content em { font-style: italic; color: #475569; }
.article-content a { color: #ea580c; text-decoration: underline; font-weight: 600; transition: color 0.2s; }
.article-content a:hover { color: #c2410c; }
.article-content ul, .article-content ol { margin-bottom: 1.5rem; padding-left: 1.5rem; color: #475569; }
.article-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.article-content img { border-radius: 0.75rem; margin: 2rem 0; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); max-width: 100%; height: auto; }
.article-content blockquote { border-left: 4px solid #ea580c; padding: 1.5rem; font-style: italic; color: #64748b; margin: 2rem 0; background: #fff7ed; border-radius: 0 0.5rem 0.5rem 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; }
.article-content th, .article-content td { border: 1px solid #e2e8f0; padding: 0.75rem; text-align: left; }
.article-content th { background: #f8fafc; font-weight: 600; color: #0f172a; }

/* ============================================================
   ===== GALERIE PHOTOS (photos.html) =====
   ============================================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}
@media (max-width: 1024px) { .masonry-grid { column-count: 2; } }
@media (max-width: 640px) { .masonry-grid { column-count: 1; } }
.masonry-item { break-inside: avoid; margin-bottom: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .parallax { background-attachment: scroll; }
}