/* ==========================================================================
   GROUPE TROIS 14 - FULL RESPONSIVE 60FPS SMOOTH DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --g-navy: #0f172a;
    --g-navy-dark: #090d16;
    --g-blue: #0284c7;
    --g-blue-hover: #0369a1;
    --g-blue-light: #38bdf8;
    --g-amber: #d97706;
    --g-slate: #64748b;
    --g-bg: #f8fafc;
    --g-card-bg: #ffffff;
    --g-border: #e2e8f0;

    --g-radius-sm: 8px;
    --g-radius: 16px;
    --g-radius-lg: 24px;
    --g-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    --g-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --g-shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.12);
    --g-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; width: 100%; overflow-x: hidden; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background-color: var(--g-bg); color: #1e293b; line-height: 1.65; width: 100%; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: 'Hanken Grotesk', sans-serif; text-wrap: balance; word-break: normal; overflow-wrap: break-word; }

/* STAGGERED SCROLL REVEAL ANIMATIONS FOR CONTENT SECTIONS */
.g314-reveal {
    opacity: 0 !important;
    transform: translateY(30px) !important;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: opacity, transform;
}
.g314-reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 1. GLASSMORPHIC HEADER */
.g314-header {
    background: rgba(15, 23, 42, 0.97) !important;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 64px; display: flex; align-items: center; width: 100%;
    transition: all 0.3s ease;
}
.g314-header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    border-bottom-color: rgba(56, 189, 248, 0.3) !important;
}

.g314-header-container {
    max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center; height: 100%;
}

.g314-logo-wrapper {
    display: inline-flex; align-items: center; text-decoration: none;
    background: #ffffff; padding: 5px 12px; border-radius: var(--g-radius-sm);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); transition: var(--g-transition);
}
.g314-logo-wrapper:hover { transform: scale(1.03); }
.g314-official-logo-img { height: 32px; width: auto; max-width: 160px; object-fit: contain; display: block; }

/* NAV GROUP & ACCURATE SUBMENU */
.g314-nav-group { display: flex; align-items: center; gap: 32px; height: 100%; }

.g314-nav { display: flex; gap: 28px; align-items: center; list-style: none; margin: 0; padding: 0; height: 100%; }
.g314-nav li { position: relative; display: flex; align-items: center; height: 100%; }
.g314-nav li::after { content: ''; position: absolute; bottom: -24px; left: 0; width: 100%; height: 24px; }

.g314-nav a {
    color: #f1f5f9; font-weight: 600; font-size: 0.92rem; text-decoration: none;
    transition: color 0.2s; padding: 0; display: inline-flex; align-items: center;
    white-space: nowrap; height: 100%; line-height: 1;
}
.g314-nav a:hover { color: #38bdf8; }

/* LOWER FLOATING SUBMENU DROPDOWN WITH CLEARANCE & ARROW */
.g314-nav .sub-menu {
    position: absolute; top: calc(100% + 20px) !important; left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    background: #0f172a !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 14px !important; padding: 8px !important; min-width: 280px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(2, 132, 199, 0.25) !important;
    opacity: 0; visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    list-style: none; z-index: 1000;
}

.g314-nav .sub-menu::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 10px; height: 10px; background: #0f172a;
    border-top: 1px solid rgba(56, 189, 248, 0.3); border-left: 1px solid rgba(56, 189, 248, 0.3);
}

.g314-nav li:hover > .sub-menu { opacity: 1 !important; visibility: visible !important; transform: translateX(-50%) translateY(0) !important; }

.g314-nav .sub-menu li { padding: 2px 0 !important; width: 100% !important; height: auto !important; }
.g314-nav .sub-menu a {
    color: #cbd5e1 !important; padding: 10px 16px !important; display: block !important;
    font-size: 0.9rem !important; font-weight: 500 !important; border-radius: 8px !important;
    border-bottom: none !important; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: normal !important; line-height: 1.4 !important; height: auto !important;
}

.g314-nav .sub-menu a:hover {
    background: rgba(2, 132, 199, 0.25) !important;
    color: #38bdf8 !important; transform: translateX(4px) !important; font-weight: 700 !important;
}

/* HEADER CTA BUTTON */
.g314-btn-cta {
    background: var(--g-blue) !important; color: #ffffff !important;
    height: 38px !important; padding: 0 20px !important; border-radius: var(--g-radius-sm) !important;
    font-weight: 700 !important; text-decoration: none !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer; white-space: nowrap; font-size: 0.88rem !important; margin: 0 !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4); border: none; transition: var(--g-transition);
    align-self: center !important; line-height: 1 !important;
}
.g314-btn-cta:hover { background: var(--g-blue-hover) !important; transform: translateY(-2px); }

/* HAMBURGER TOGGLE BUTTON */
.g314-mobile-toggle {
    display: none; flex-direction: column; justify-content: space-between; width: 28px; height: 20px;
    background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001;
}
.g314-mobile-toggle span { width: 100%; height: 3px; background: #ffffff; border-radius: 3px; transition: var(--g-transition); }

/* 2. FAST 60FPS HERO CAROUSEL */
.g314-hero-carousel {
    position: relative; width: 100%; height: calc(100vh - 64px); min-height: 600px;
    overflow: hidden; background: var(--g-navy-dark);
}
.g314-slider-track { width: 100%; height: 100%; position: relative; }
.g314-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; visibility: hidden; transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 0 24px; color: #ffffff; will-change: opacity, visibility;
}
.g314-slide.active { opacity: 1; visibility: visible; }
.g314-slide-content { max-width: 1000px; margin: 0 auto; position: relative; z-index: 2; width: 100%; }

.g314-hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(2, 132, 199, 0.25); border: 1px solid rgba(56, 189, 248, 0.4); color: var(--g-blue-light); padding: 8px 20px; border-radius: 30px; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; margin-bottom: 24px; }
.g314-hero-heading { font-size: 3.2rem; font-weight: 900; line-height: 1.25; margin-bottom: 24px; color: #ffffff; text-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.g314-hero-desc { font-size: 1.25rem; color: #cbd5e1; max-width: 820px; margin: 0 auto 36px auto; line-height: 1.65; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }

/* HERO BUTTONS WITH EXACT EQUAL HEIGHT (48px) */
.g314-hero-buttons {
    display: flex; gap: 18px; justify-content: center; align-items: center; width: 100%;
}
.g314-hero-buttons .g314-btn-cta,
.g314-hero-buttons .g314-btn-outline {
    height: 48px !important; padding: 0 28px !important; font-size: 0.95rem !important;
    font-weight: 700 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important;
    border-radius: var(--g-radius-sm) !important; margin: 0 !important; line-height: 1 !important; box-sizing: border-box !important;
}
.g314-btn-outline {
    background: rgba(255, 255, 255, 0.08) !important; border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important; text-decoration: none !important; white-space: nowrap !important; transition: var(--g-transition) !important;
}
.g314-btn-outline:hover { background: rgba(255, 255, 255, 0.22) !important; border-color: #ffffff !important; }

/* ARROWS & DOTS */
.g314-slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.2); color: #ffffff; border-radius: 50%; font-size: 2rem; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: var(--g-transition); }
.g314-slider-arrow:hover { background: var(--g-blue); border-color: var(--g-blue); }
.g314-prev { left: 24px; } .g314-next { right: 24px; }
.g314-slider-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.g314-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: var(--g-transition); }
.g314-dot.active { width: 32px; border-radius: 10px; background: var(--g-blue); }

/* 3. STATS ANIMATED COUNTER CARD */
.g314-stats-wrapper { max-width: 1200px; margin: -60px auto 70px auto; position: relative; z-index: 20; padding: 0 24px; width: 100%; }
.g314-stats-grid { background: var(--g-card-bg); border-radius: var(--g-radius); padding: 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; box-shadow: var(--g-shadow-lg); border: 1px solid var(--g-border); }
.g314-stat-card { text-align: center; border-right: 1px solid #f1f5f9; }
.g314-stat-card:last-child { border-right: none; }
.g314-stat-val { font-family: 'Hanken Grotesk', sans-serif; font-size: 2.75rem; font-weight: 900; color: var(--g-blue); }
.g314-stat-lbl { font-size: 0.875rem; font-weight: 700; color: var(--g-navy); margin-top: 6px; text-transform: uppercase; white-space: nowrap; }

/* 4. GRID CARDS WITH SMOOTH IMAGE HOVER */
.g314-main-container { max-width: 1280px; margin: 0 auto; padding: 0 24px 100px 24px; width: 100%; }
.g314-section-header { text-align: center; max-width: 700px; margin: 0 auto 50px auto; }
.g314-section-tag { color: var(--g-blue); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.g314-section-title { font-size: 2.4rem; font-weight: 900; color: var(--g-navy); margin-top: 6px; }

.g314-about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: left; width: 100%; }
.g314-about-grid > div { transition: var(--g-transition); }
.g314-about-grid > div:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.08) !important; border-color: rgba(56, 189, 248, 0.5) !important; }

.g314-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; margin-bottom: 80px; }
.g314-card { background: var(--g-card-bg); border-radius: var(--g-radius); border: 1px solid var(--g-border); overflow: hidden; box-shadow: var(--g-shadow-sm); transition: var(--g-transition); display: flex; flex-direction: column; }
.g314-card:hover { transform: translateY(-8px); border-color: var(--g-blue); box-shadow: 0 15px 30px rgba(2, 132, 199, 0.12); }

.g314-card-media { height: 220px; overflow: hidden; position: relative; }
.g314-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.g314-card:hover .g314-card-media img { transform: scale(1.05); }

.g314-card-badge { position: absolute; top: 16px; right: 16px; background: rgba(15, 23, 42, 0.85); color: #ffffff; font-size: 0.75rem; font-weight: 700; padding: 6px 14px; border-radius: 20px; }
.g314-card-body { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.g314-card-title { font-size: 1.35rem; font-weight: 800; color: var(--g-navy); margin-bottom: 12px; line-height: 1.35; transition: color 0.2s; }
.g314-card:hover .g314-card-title { color: var(--g-blue); }
.g314-card-desc { color: var(--g-slate); font-size: 0.95rem; line-height: 1.65; margin-bottom: 20px; }
.g314-card-link { font-weight: 700; font-size: 0.9rem; color: var(--g-blue); text-decoration: none; display: inline-block; }

/* 5. WORLD-CLASS 4-CABINETS REGIONAUX GRID CARDS */
.g314-agences-grid {
    display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 28px !important;
}

.g314-agence-card {
    background: #ffffff !important; border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important; padding: 32px 26px !important;
    display: flex !important; flex-direction: column !important; justify-content: space-between !important; height: 100% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important; overflow: hidden !important;
}

.g314-agence-card:hover {
    transform: translateY(-6px) !important;
    border-color: #0284c7 !important;
    box-shadow: 0 16px 30px rgba(2, 132, 199, 0.12) !important;
}

.g314-agence-badge {
    display: inline-block !important; background: rgba(2, 132, 199, 0.1) !important;
    color: #0284c7 !important; font-size: 0.75rem !important; font-weight: 800 !important;
    padding: 4px 12px !important; border-radius: 20px !important; text-transform: uppercase !important;
    letter-spacing: 0.05em !important; margin-bottom: 14px !important;
}

.g314-agence-name {
    font-size: 1.3rem !important; font-weight: 900 !important; color: #0f172a !important;
    margin-bottom: 20px !important; line-height: 1.3 !important; font-family: 'Hanken Grotesk', sans-serif !important;
    min-height: 56px !important; display: flex !important; align-items: center !important;
}

.g314-agence-info { display: flex !important; flex-direction: column !important; gap: 14px !important; margin-bottom: 28px !important; }

.g314-info-item { display: flex !important; align-items: flex-start !important; gap: 12px !important; font-size: 0.92rem !important; color: #475569 !important; line-height: 1.5 !important; }
.g314-info-icon { font-size: 1.1rem !important; flex-shrink: 0 !important; margin-top: 2px !important; }

.g314-agence-btn {
    background: #0284c7 !important; color: #ffffff !important; font-weight: 700 !important;
    font-size: 0.92rem !important; padding: 13px 20px !important; border-radius: 10px !important;
    text-align: center !important; text-decoration: none !important; display: flex !important; align-items: center !important; justify-content: center !important;
    width: 100% !important; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important; margin-top: auto !important;
}

.g314-agence-btn:hover {
    background: #0369a1 !important; transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.45) !important;
}

/* 6. FOOTER */
.g314-footer { background: var(--g-navy-dark); color: var(--g-slate); padding: 60px 24px 30px 24px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.g314-footer-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.g314-footer-copy { font-size: 0.9rem; }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1100px) {
    .g314-agences-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
}

@media (max-width: 992px) {
    .g314-about-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .g314-agences-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
    
    .g314-mobile-toggle { display: flex; }
    
    #g314-main-nav {
        position: fixed; top: 64px; left: 0; width: 100%; background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 24px; display: none; flex-direction: column; gap: 16px; z-index: 998;
    }
    #g314-main-nav.active { display: flex; }
    
    .g314-nav { flex-direction: column; align-items: flex-start; gap: 16px; height: auto; width: 100%; }
    .g314-nav li { width: 100%; flex-direction: column; align-items: flex-start; height: auto; }
    .g314-nav a { padding: 8px 0; font-size: 1.05rem; width: 100%; }
    
    .g314-nav .sub-menu {
        position: static; transform: none !important; opacity: 1; visibility: visible;
        background: rgba(255, 255, 255, 0.05) !important; box-shadow: none; border: none;
        padding: 8px 0 8px 16px; width: 100%; margin-top: 6px;
    }
    .g314-nav .sub-menu::before { display: none; }
    
    .g314-hero-heading { font-size: 2.4rem; }
    .g314-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .g314-about-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .g314-hero-carousel { height: auto; min-height: 520px; padding: 60px 0; }
    .g314-hero-heading { font-size: 1.75rem; }
    .g314-hero-desc { font-size: 0.95rem; }
    .g314-hero-buttons { flex-direction: column; width: 100%; }
    .g314-btn-cta, .g314-btn-outline { width: 100% !important; text-align: center !important; }
    .g314-stats-grid { grid-template-columns: 1fr; gap: 16px; padding: 24px; }
    .g314-stat-card { border-right: none; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
    .g314-stat-card:last-child { border-bottom: none; }
    .g314-agences-grid { grid-template-columns: 1fr !important; }
    .g314-slider-arrow { display: none; }
}
