/* ===================================
   AGIFOR - Styles CSS Centralisés
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ===================================
   Variables CSS (Custom Properties)
   =================================== */
:root {
    /* Couleurs principales */
    --primary: #001a57;
    --primary-dark: #0B1E6D;
    --secondary: #ff5c00;
    --accent: #F25C05;
    
    /* Couleurs de fond */
    --background-light: #f8f9fc;
    --background-dark: #0a0e17;
    --surface-light: #ffffff;
    --surface-dark: #111835;
    
    /* Couleurs de texte */
    --text-main: #0B1E6D;
    --text-muted: #475569;
    --text-light: #555b7d;
    
    /* Police */
    --font-display: 'Manrope', sans-serif;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

/* Mode sombre */
.dark {
    --background-light: #0a0e17;
    --background-dark: #080c1f;
    --surface-light: #111835;
    --surface-dark: #0b0f24;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

/* ===================================
   Reset & Base Styles
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background-color: var(--background-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Dark mode body */
body.dark {
    background-color: var(--background-dark);
    color: #f1f5f9;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    font-weight: 400;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ===================================
   Header Styles
   =================================== */
.agifor-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 26, 87, 0.1);
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .agifor-header {
    background: rgba(10, 14, 23, 0.95);
    border-bottom-color: rgba(0, 26, 87, 0.2);
}

.agifor-header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.agifor-logo {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.agifor-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.agifor-logo-text {
    display: flex;
    align-items: flex-end;
    line-height: 1;
    user-select: none;
}

.agifor-logo-text .logo-agifor {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.agifor-logo-text .logo-agifor-agi {
    color: var(--primary);
}

.agifor-logo-text .logo-agifor-for {
    color: var(--secondary);
}

.dark .agifor-logo-text .logo-agifor-agi {
    color: #ffffff;
}

/* Navigation */
.agifor-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .agifor-nav {
        display: flex;
    }
}

.agifor-nav a {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.agifor-nav a:hover,
.agifor-nav a.active {
    color: var(--secondary);
}

.dark .agifor-nav a {
    color: #cbd5e1;
}

.dark .agifor-nav a:hover,
.dark .agifor-nav a.active {
    color: var(--secondary);
}

/* Header Actions */
.agifor-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.agifor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.agifor-btn-primary {
    background-color: var(--primary);
    color: white;
    border-left: 4px solid var(--primary);
}

.agifor-btn-primary:hover {
    background-color: rgba(0, 26, 87, 0.9);
}

.dark .agifor-btn-primary {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
}

.agifor-btn-secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 92, 0, 0.25);
}

.agifor-btn-secondary:hover {
    background-color: rgba(255, 92, 0, 0.9);
}

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

.agifor-btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Mobile Menu Button */
.agifor-mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .agifor-mobile-menu-btn {
        display: none;
    }
}

.dark .agifor-mobile-menu-btn {
    color: white;
}

/* Header gradient bar */
.agifor-header-bar {
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--primary), var(--secondary));
}

/* ===================================
   Material Symbols
   =================================== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

/* ===================================
   Utility Classes
   =================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-light { background-color: var(--background-light); }
.bg-dark { background-color: var(--background-dark); }

/* ===================================
   Animations
   =================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* ===================================
   Form Styles
   =================================== */
.agifor-input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    background-color: rgba(241, 245, 249, 1);
    border: none;
    border-bottom: 2px solid rgba(226, 232, 240, 1);
    font-family: var(--font-display);
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.agifor-input:focus {
    border-bottom-color: var(--secondary);
    background-color: rgba(255, 92, 0, 0.05);
}

.dark .agifor-input {
    background-color: rgba(30, 41, 59, 1);
    border-bottom-color: rgba(51, 65, 85, 1);
    color: white;
}

.agifor-input::placeholder {
    color: rgba(148, 163, 184, 1);
}

.agifor-textarea {
    width: 100%;
    padding: 1rem;
    background-color: rgba(241, 245, 249, 1);
    border: none;
    border-bottom: 2px solid rgba(226, 232, 240, 1);
    font-family: var(--font-display);
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
    outline: none;
}

.agifor-textarea:focus {
    border-bottom-color: var(--primary);
    background-color: rgba(0, 26, 87, 0.05);
}

.dark .agifor-textarea {
    background-color: rgba(30, 41, 59, 1);
    border-bottom-color: rgba(51, 65, 85, 1);
    color: white;
}

.agifor-select {
    width: 100%;
    height: 3rem;
    padding: 0 2.5rem 0 1rem;
    background-color: rgba(241, 245, 249, 1);
    border: none;
    border-bottom: 2px solid rgba(226, 232, 240, 1);
    font-family: var(--font-display);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    outline: none;
    transition: all 0.2s ease;
}

.agifor-select:focus {
    border-bottom-color: var(--secondary);
    background-color: rgba(255, 92, 0, 0.05);
}

.dark .agifor-select {
    background-color: rgba(30, 41, 59, 1);
    border-bottom-color: rgba(51, 65, 85, 1);
    color: white;
}

/* ===================================
   Card Styles
   =================================== */
.agifor-card {
    background-color: var(--surface-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dark .agifor-card {
    background-color: var(--surface-dark);
}

.agifor-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* ===================================
   Footer Styles
   =================================== */
.agifor-footer {
    background-color: var(--background-light);
    padding: 4rem 1.5rem 2rem;
    border-top: 8px solid var(--primary);
}

.dark .agifor-footer {
    background-color: var(--background-dark);
}

.agifor-footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.agifor-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .agifor-footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .agifor-footer-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.agifor-footer-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.agifor-footer-link {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.agifor-footer-link:hover {
    color: var(--secondary);
}

.dark .agifor-footer-link {
    color: #94a3b8;
}

/* ===================================
   Section Styles
   =================================== */
.agifor-section {
    padding: 4rem 1.5rem;
}

@media (min-width: 1024px) {
    .agifor-section {
        padding: 6rem 2.5rem;
    }
}

.agifor-section-dark {
    background-color: var(--primary);
    color: white;
}

.agifor-section-light {
    background-color: var(--background-light);
}

/* ===================================
   Logo Frame Decoration
   =================================== */
.agifor-logo-frame {
    position: relative;
}

.agifor-logo-frame::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 80px;
    height: 80px;
    border-top: 6px solid var(--primary);
    border-left: 6px solid var(--primary);
    z-index: 20;
    pointer-events: none;
}

.agifor-logo-frame::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 80px;
    height: 80px;
    border-bottom: 6px solid var(--secondary);
    border-right: 6px solid var(--secondary);
    z-index: 20;
    pointer-events: none;
}

/* ===================================
   Map Container Filter
   =================================== */
.map-container {
    filter: grayscale(100%) invert(92%) sepia(9%) saturate(1060%) hue-rotate(190deg) brightness(95%) contrast(90%);
}

/* ===================================
   Scrollbar Styles
   =================================== */
textarea::-webkit-scrollbar {
    width: 8px;
}

textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
}

textarea::-webkit-scrollbar-thumb {
    background: #d4d0e7;
    border-radius: 4px;
}

.dark textarea::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark textarea::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ===================================
   Selection Styles
   =================================== */
::selection {
    background-color: rgba(0, 26, 87, 0.2);
    color: var(--primary);
}

.dark ::selection {
    background-color: rgba(255, 92, 0, 0.3);
    color: white;
}

/* ===================================
   Standardized Container Styles
   =================================== */
.agifor-container {
    max-width: 1280px;
    margin: 0 auto;
}

.agifor-section-padding {
    padding: 4rem 1.5rem;
}

@media (min-width: 1024px) {
    .agifor-section-padding {
        padding: 6rem 2.5rem;
    }
}

/* Section Labels */
.agifor-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(255, 92, 0, 0.1);
    border-left: 2px solid var(--secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
}

.agifor-label-light {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 2px solid var(--secondary);
}

/* Section Titles */
.agifor-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.dark .agifor-section-title {
    color: white;
}

.agifor-section-title span {
    color: var(--secondary);
}

/* Section Description */
.agifor-section-desc {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-muted);
    max-width: 32rem;
    border-left: 4px solid #e2e8f0;
    padding-left: 1rem;
}

.dark .agifor-section-desc {
    border-left-color: rgba(255, 255, 255, 0.2);
}

/* Stats Cards */
.agifor-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background-color: var(--surface-light);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dark .agifor-stat-card {
    background-color: var(--surface-dark);
}

.agifor-stat-number {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
}

.dark .agifor-stat-number {
    color: white;
}

.agifor-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* CTA Buttons */
.agifor-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: var(--secondary);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.2s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.agifor-cta-primary:hover {
    background-color: #ea580c;
}

.agifor-cta-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background-color: transparent;
    border: 2px solid white;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.agifor-cta-outline:hover {
    background-color: white;
    color: var(--primary);
}

/* Content Cards */
.agifor-content-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background-color: var(--surface-light);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.dark .agifor-content-card {
    background-color: var(--surface-dark);
}

.agifor-content-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-left-color: var(--secondary);
}

/* Timeline Styles */
.agifor-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.agifor-timeline-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.agifor-timeline-year {
    width: 5rem;
    flex-shrink: 0;
    text-align: right;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--secondary);
}

.agifor-timeline-divider {
    width: 1px;
    background-color: var(--secondary);
    min-height: 5rem;
}

.agifor-timeline-content {
    flex: 1;
    padding: 1.5rem;
    background-color: var(--surface-light);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dark .agifor-timeline-content {
    background-color: var(--surface-dark);
}

/* Expertise page helpers */
.text-stroke {
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
}

.clip-diagonal {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.clip-diagonal-reverse {
    clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%);
}
