/* ============================================================
   OPAGAN — Feuille de style principale
   Couleurs : #0F084B (blue), #2CA03C (green), #E7E6E6 (gray)
   Police : Gill Sans MT, DM Sans
   ============================================================ */

:root {
    --blue: #0F084B;
    --green: #2CA03C;
    --green-light: #34b846;
    --gray: #E7E6E6;
    --gray-light: #F8F8F8;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --violet: #7C3AED;
    --red: #ef4444;
    --orange: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Gill Sans MT', 'Gill Sans', 'Trebuchet MS', 'DM Sans', sans-serif;
    color: var(--text); background: var(--white); overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
img { max-width: 100%; display: block; }

/* ========== HEADER ========== */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15,8,75,0.06); transition: box-shadow 0.3s;
}
header.scrolled { box-shadow: 0 2px 20px rgba(15,8,75,0.08); }
.header-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 40px; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 36px; display: block; }
nav { display: flex; align-items: center; gap: 28px; }
nav a { font-size: 13px; font-weight: 500; color: var(--text); letter-spacing: 0.01em; }
nav a:hover, nav a.active { color: var(--green); }

.header-right { display: flex; align-items: center; gap: 10px; }
.lang-switch {
    font-size: 12px; font-weight: 600; color: var(--blue); background: none;
    border: 1px solid var(--gray); padding: 5px 10px; border-radius: 5px;
    cursor: pointer; transition: all 0.2s;
}
.lang-switch:hover { border-color: var(--green); color: var(--green); }

/* Buttons */
.btn-sm { font-size: 12px; font-weight: 600; padding: 7px 16px; border-radius: 6px; border: none; cursor: pointer; transition: all 0.2s; display: inline-block; }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: #1a0f6b; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-light); }
.btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn { display: inline-block; font-size: 14px; font-weight: 600; padding: 12px 28px; border-radius: 8px; border: none; cursor: pointer; transition: all 0.2s; text-align: center; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(44,160,60,0.3); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-trigger {
    font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
    background: none; border: none; font-family: inherit;
    display: flex; align-items: center; gap: 4px;
}
.dropdown-trigger:hover { color: var(--green); }
.dropdown-menu {
    position: absolute; top: 100%; left: -12px; margin-top: 12px;
    background: var(--white); border: 1px solid var(--gray); border-radius: 12px;
    padding: 8px; min-width: 200px;
    box-shadow: 0 12px 40px rgba(15,8,75,0.1);
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.2s;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 14px; border-radius: 8px; font-size: 13px; transition: all 0.15s; }
.dropdown-menu a:hover { background: rgba(44,160,60,0.06); color: var(--green); }

/* ========== SECTIONS ========== */
section { padding: 100px 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.section-tag { font-size: 12px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--green); margin-bottom: 16px; }
.section-title { font-size: clamp(28px, 3.5vw, 42px); font-weight: 700; color: var(--blue); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 16px; }
.section-desc { font-size: 17px; color: var(--text-light); line-height: 1.7; max-width: 600px; }

/* ========== HERO ========== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('/images/hero-bg.jpg') center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(15,8,75,0.92) 0%, rgba(15,8,75,0.7) 50%, rgba(15,8,75,0.5) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 120px 40px 80px; width: 100%; }

/* ========== CARDS ========== */
.card {
    background: var(--white); border: 1px solid var(--gray); border-radius: 16px;
    padding: 32px; transition: all 0.3s;
}
.card:hover { border-color: var(--green); box-shadow: 0 8px 32px rgba(15,8,75,0.06); transform: translateY(-4px); }
.card.featured { background: var(--blue); border-color: var(--blue); color: var(--white); }
.card.featured:hover { background: #1a0f6b; }

/* ========== BADGES ========== */
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 20px; }
.badge-green { background: rgba(44,160,60,0.1); color: var(--green); }
.badge-red { background: rgba(239,68,68,0.1); color: var(--red); }
.badge-blue { background: rgba(15,8,75,0.08); color: var(--blue); }
.badge-orange { background: rgba(245,158,11,0.1); color: var(--orange); }

/* ========== FORMS ========== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-light); margin-bottom: 6px; letter-spacing: 0.05em; text-transform: uppercase; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--gray); border-radius: 8px;
    font-size: 14px; font-family: inherit; transition: border 0.2s; outline: none; background: white;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(44,160,60,0.1); }
.form-textarea { resize: vertical; min-height: 100px; }

/* ========== ALERTS ========== */
.alert { padding: 12px 20px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: rgba(44,160,60,0.1); color: var(--green); border: 1px solid rgba(44,160,60,0.2); }
.alert-error { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

/* ========== SIDEBAR (admin & partner) ========== */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px;
    background: var(--blue); padding: 24px; z-index: 100;
    display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-logo { margin-bottom: 36px; text-align: center; }
.sidebar-logo img { width: 100%; height: auto; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px;
    border-radius: 10px; font-size: 13px; font-weight: 500;
    color: rgba(255,255,255,0.55); margin-bottom: 2px; transition: all 0.2s;
}
.sidebar-nav a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.sidebar-nav a.active { color: var(--white); background: rgba(44,160,60,0.2); }
.sidebar-nav svg { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 14px 0; }
.sidebar-user {
    padding: 14px; background: rgba(255,255,255,0.04); border-radius: 12px;
    display: flex; align-items: center; gap: 12px;
}
.sidebar-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--green);
    display: flex; align-items: center; justify-content: center;
    color: var(--white); font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.main-content { margin-left: 260px; padding: 28px 36px; min-height: 100vh; background: var(--gray-light); }

/* ========== TABLES ========== */
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; }
.table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); padding: 14px 16px; text-align: left; border-bottom: 2px solid var(--gray); background: var(--gray-light); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-light); font-size: 14px; }
.table tr:hover td { background: rgba(44,160,60,0.02); }

/* ========== FOOTER ========== */
footer { background: var(--blue); color: rgba(255,255,255,0.7); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.35); }
footer a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
footer a:hover { color: var(--green); }

/* ========== PAGE HERO (sous-pages) ========== */
.page-hero { padding: 140px 0 60px; background: var(--gray-light); }
.page-hero .section-tag { margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; color: var(--blue); letter-spacing: -0.02em; margin-bottom: 16px; }
.page-hero p { font-size: 18px; color: var(--text-light); max-width: 640px; line-height: 1.6; }

/* ========== GRID HELPERS ========== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ========== ANIMATIONS ========== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.anim { opacity: 0; animation: fadeUp 0.8s forwards; }
.anim-d1 { animation-delay: 0.2s; }
.anim-d2 { animation-delay: 0.4s; }
.anim-d3 { animation-delay: 0.6s; }
.anim-d4 { animation-delay: 0.8s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    nav { display: none; }
    .container { padding: 0 20px; }
    section { padding: 60px 0; }
    .header-inner { padding: 0 20px; height: 56px; }
    .hero-content { padding: 100px 20px 60px; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 20px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; }
    .page-hero { padding: 100px 0 40px; }
}

/* ========== UTILITAIRES ========== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
