/* -------------------------------------------------------------
 * BASE & TYPOGRAPHIE INSTITUTIONNELLE FONGI
 * ------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-secondary);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

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

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--fongi-blue-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--fongi-green-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
    position: relative;
}

/* -------------------------------------------------------------
 * BANNIÈRE HERO INSTITUTIONNELLE STYLE COORDINATION SUD (DIAGONAL SLANT)
 * ------------------------------------------------------------- */
.hero-csud-section {
    position: relative;
    width: 100%;
    min-height: 440px;
    background-color: #0e5b77;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    border: none;
}

.hero-csud-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-csud-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: center right;
}

/* Effet Zoom au survol de la bannière */
.hero-csud-section:hover .hero-csud-img {
    transform: scale(1.06);
}

.hero-csud-overlay {
    position: relative;
    z-index: 2;
    width: 48%;
    min-width: 440px;
    max-width: 720px;
    background: linear-gradient(135deg, #0a4a62 0%, #0e5b77 40%, #1677a0 70%, #1e87ad 100%);
    clip-path: polygon(0 0, calc(100% - 90px) 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, calc(100% - 90px) 0, 100% 100%, 0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem 3rem max(2rem, calc((100vw - 1320px) / 2 + 1.5rem));
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.3);
}

/* Décorations géométriques */
.hero-csud-decor-dot {
    position: absolute;
    top: 35px;
    left: max(1.5rem, calc((100vw - 1320px) / 2 + 0.5rem));
    width: 14px;
    height: 14px;
    background-color: #53c3eb;
    border-radius: 50%;
    opacity: 0.95;
    pointer-events: none;
}

.hero-csud-decor-triangle {
    position: absolute;
    bottom: 25px;
    left: max(1.5rem, calc((100vw - 1320px) / 2 + 0.5rem));
    width: 22px;
    height: 22px;
    background-color: #79c193;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    -webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform: rotate(-35deg);
    opacity: 0.9;
    pointer-events: none;
}

.hero-csud-content {
    position: relative;
    z-index: 3;
    max-width: 620px;
}

.hero-csud-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.85rem;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    border: none;
}

.hero-csud-badge svg {
    color: #53c3eb;
}

.hero-csud-title {
    font-size: clamp(1.65rem, 2.2vw, 2.2rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.22;
    margin-bottom: 0.9rem;
    letter-spacing: -0.02em;
}

.hero-csud-title span {
    color: #53c3eb;
}

.hero-csud-lead {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 1.4rem;
}

.hero-csud-lead p {
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.92);
}

.hero-csud-highlight {
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 0 !important;
}

.hero-csud-cta-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.btn-hero-csud-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    background: #ffffff;
    color: #0e5b77;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
    border: none;
}

.btn-hero-csud-primary:hover {
    background: #e6f7fd;
    color: #094156;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.btn-hero-csud-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-decoration: none;
    border: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.btn-hero-csud-outline:hover {
    background: #ffffff;
    color: #0e5b77;
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .hero-csud-overlay {
        width: 55%;
        min-width: 420px;
        padding: 2.75rem 3.5rem 2.75rem max(1.5rem, calc((100vw - 1140px) / 2 + 1.5rem));
    }
}

/* Version Mobile & Tablette : Image en haut, texte en bas */
@media (max-width: 992px) {
    .hero-csud-section {
        flex-direction: column;
        min-height: auto;
        align-items: stretch;
    }
    
    .hero-csud-bg {
        position: relative;
        inset: auto;
        width: 100%;
        height: 280px;
        order: 1;
        z-index: 1;
    }
    
    .hero-csud-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform-origin: center center;
    }
    
    .hero-csud-overlay {
        position: relative;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        order: 2;
        clip-path: none;
        -webkit-clip-path: none;
        background: linear-gradient(180deg, #0e5b77 0%, #156d8e 100%);
        padding: 2.5rem 1.5rem;
        box-shadow: none;
    }
    
    .hero-csud-decor-dot,
    .hero-csud-decor-triangle {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-csud-bg {
        height: 220px;
    }
    
    .hero-csud-overlay {
        padding: 2rem 1.25rem;
    }
    
    .hero-csud-cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-hero-csud-primary,
    .btn-hero-csud-outline {
        width: 100%;
        justify-content: center;
    }
}

.section-tinted {
    background-color: var(--bg-surface);
}

.section-blue-subtle {
    background-color: var(--fongi-blue-light);
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.5rem auto;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    background: linear-gradient(135deg, rgba(83, 195, 235, 0.18) 0%, rgba(83, 195, 235, 0.08) 100%);
    color: #0d6b8e;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 2px 8px rgba(83, 195, 235, 0.12);
}

.section-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Boutons Institutionnels */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--fongi-blue) 0%, var(--fongi-blue-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(83, 195, 235, 0.4);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2da9d6 0%, #0d6b8e 100%);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(83, 195, 235, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--fongi-green);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(109, 183, 88, 0.25);
    border: none;
}

.btn-secondary:hover {
    background-color: var(--fongi-green-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: rgba(83, 195, 235, 0.15);
    color: #0d6b8e;
    border: none;
    font-weight: 700;
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--fongi-blue) 0%, var(--fongi-blue-dark) 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-institutional {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0d6b8e;
    background-color: rgba(83, 195, 235, 0.12);
    border: none;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.btn-institutional:hover {
    background: linear-gradient(135deg, var(--fongi-blue) 0%, var(--fongi-blue-dark) 100%);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-institutional svg {
    transition: transform var(--transition-fast);
}

.btn-institutional:hover svg {
    transform: translateX(4px);
}

/* Alertes & Toasts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
}

.alert-success {
    background-color: rgba(121, 193, 147, 0.2);
    color: #1e6439;
    border: none;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #991b1b;
    border: none;
}

/* -------------------------------------------------------------
 * STATS CIRCLES ANIMÉS (HERO SECTION) — SANS AUCUNE BORDURE BLANCHE
 * ------------------------------------------------------------- */
.hero-stats-card {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 1.5rem 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1.5rem;
}

.stat-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
}

.stat-circle {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    display: block;
    pointer-events: none;
}

.circle-bg {
    fill: none;
    stroke: rgba(83, 195, 235, 0.14); /* Pas de blanc, teinte douce translucide */
    stroke-width: 7.5;
}

.circle-fill {
    fill: none;
    stroke: var(--clr, #53c3eb);
    stroke-width: 7.5;
    stroke-linecap: round;
    stroke-dasharray: 314.16; /* 2 * PI * 50 */
    stroke-dashoffset: 314.16;
    transition: stroke-dashoffset 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.circle-text {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    gap: 0;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.circle-number {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    letter-spacing: -0.02em;
    display: inline-block;
}

.circle-suffix {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    margin-left: 2px;
    display: inline-block;
}

.stat-circle-item .stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    text-align: center;
    line-height: 1.35;
    max-width: 120px;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }
}

@media (max-width: 1024px) and (min-width: 641px) {
    .stat-circle {
        width: 108px;
        height: 108px;
    }
    .circle-svg {
        width: 108px;
        height: 108px;
    }
    .circle-number {
        font-size: 1.45rem;
    }
    .circle-suffix {
        font-size: 1.02rem;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
    }
    .stat-circle {
        width: 96px;
        height: 96px;
    }
    .circle-svg {
        width: 96px;
        height: 96px;
    }
    .circle-number {
        font-size: 1.3rem;
    }
    .circle-suffix {
        font-size: 0.92rem;
    }
    .stat-circle-item .stat-label {
        font-size: 0.78rem;
        max-width: 96px;
    }
}
