/**
 * Tomcikova-Consulting - Custom Styles
 * Clean version
 */

:root {
    /* ===== Charte Tomcikova-Consulting — palette verte (2026-09-20) =====
       --primary-theme     #0a2a1a  vert très sombre -> fonds, textes, CTA
       --secondary-theme   #00d68f  menthe           -> accents, bordures, a-plats
       --tertiary-theme    #e6fff5  menthe très clair (réservée : les fonds clairs
                                    restent le blanc cassé #f8f9fa, choix client)
       --color-accent-deep #047857  vert profond     -> accent lisible sur fond clair

       Regles de lisibilite (mesurees) :
       - la menthe #00d68f ne porte JAMAIS de texte blanc (1,9:1)
         -> sur fond menthe, le texte est vert sombre #0a2a1a (8,1:1).
       - jamais de menthe #00d68f comme couleur de texte sur fond clair (1,9:1)
         -> utiliser --color-accent-deep #047857 (5,5:1 sur blanc). */
    --color-primary: #0a2a1a;
    --color-secondary: #00d68f;
    --color-accent: #00d68f;
    --color-accent-deep: #047857;
    --color-tertiary: #e6fff5;
    --color-on-accent: #0a2a1a;
    --color-success: #0a2a1a;
    --color-danger: #ff4136;
    --color-dark: #1a1a1a;
    --color-light: #f8f9fa;
}

/* ================== GENERAL ================== */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    font-family: 'Poppins', sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--color-light);
    color: #333;
    line-height: 1.6;
    font-size: 0.77rem;
    overflow-x: hidden;
    max-width: 100%;
}

h1 { font-size: 1.68rem !important; }
h2 { font-size: 1.35rem !important; }
h3 { font-size: 1.08rem !important; }
h4 { font-size: 0.98rem !important; }
h5 { font-size: 0.89rem !important; }
h6 { font-size: 0.79rem !important; }
p  { font-size: 0.77rem !important; }
.lead { font-size: 0.89rem !important; }
small { font-size: 0.70rem !important; }
.btn { font-size: 0.77rem !important; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ================== NAVBAR ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: 0.6rem 0;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 20px rgba(10,42,26,0.12) !important;
}

body {
    /* La navbar fixe mesure 70 px de haut : 66 px laissaient le haut du
       contenu passer sous la barre (visible surtout sur mobile). */
    padding-top: 70px;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--color-primary) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.79rem;
    border-radius: 6px;
    transition: color 0.2s, background-color 0.2s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--color-primary) !important;
}

/* Le lien de la page en cours garde la surbrillance en permanence (sans ligne ni soulignement) */
.navbar .nav-link.active {
    background: rgba(0,214,143, 0.12);
}

/* Survol : surbrillance légèrement plus marquée */
.navbar .nav-link.active:hover {
    background: rgba(0,214,143, 0.2);
}

/* Aucun soulignement ni ligne dans la navbar (survol comme lien actif) */
.navbar a:hover,
.navbar a:focus {
    text-decoration: none !important;
}

.navbar .dropdown-menu {
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 30px rgba(10,42,26,0.1);
}

.navbar .dropdown-item {
    font-size: 0.79rem;
    color: var(--color-primary);
}

.navbar .dropdown-item:hover {
    background: var(--color-light);
    color: var(--color-primary);
}

.navbar .dropdown-item.active {
    background: var(--color-secondary);
    color: var(--color-on-accent);
}

@media (max-width: 991px) {
    .navbar .nav-link {
        padding: 0.72rem 0.75rem !important;
        border-radius: 8px;
        margin-bottom: 3px;
    }
    .navbar-nav {
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }
    .navbar .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
    .w-lg-auto { width: 100% !important; }
    .navbar .btn.w-lg-auto {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
        padding: 0.65rem 1rem;
    }
}

@media (min-width: 992px) {
    .w-lg-auto { width: auto !important; }
}

/* ================== HERO (pages internes) ================== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="80" r="20" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Panneaux « verre » des heros (.hero-v2-panel) posés sur une photo navy :
   le gris « text-muted » de Bootstrap (rgba(33,37,41,.75)) y est illisible.
   Règle globale pour toutes les pages (l'accueil a sa propre règle à 0.75). */
.hero-v2-panel .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.hero .btn-outline-primary {
    border-color: white;
    color: white;
}

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

/* ================== HERO PREMIUM (homepage) ================== */
.hero-premium {
    position: relative;
    min-height: 70vh;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a2a1a 100%);
    color: white;
    overflow: hidden;
    padding: 0;
    max-width: 100vw;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    mix-blend-mode: multiply;
    animation: blob-move 8s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #00d68f;
    top: -100px;
    left: 0;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #0a2a1a;
    bottom: -50px;
    right: 0;
    animation-delay: 2s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: #00d68f;
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes blob-move {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 20px); }
}

.z-3 { position: relative; z-index: 3; }

.min-vh-75 {
    min-height: 45vh;
    display: flex;
    align-items: center;
}

.badge-hero {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.79rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 3.28rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #00d68f, #00d68f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.17rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-buttons .btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-buttons .btn-primary {
    background: linear-gradient(135deg, #0a2a1a, #0a2a1a);
    border: none;
    box-shadow: 0 10px 30px rgba(10,42,26, 0.3);
}

.cta-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(10,42,26, 0.5);
}

.cta-buttons .btn-outline-light { border: 2px solid white; color: white; }
.cta-buttons .btn-outline-light:hover {
    background: white;
    color: var(--color-primary);
    transform: translateY(-3px);
}

.hero-trust-text {
    font-size: 0.89rem;
    opacity: 0.85;
}

.hero-image {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.card-1 { top: 50px; left: 30px; }
.card-2 { top: 250px; right: 20px; animation-delay: 1s; }
.card-3 { bottom: 30px; left: 50%; transform: translateX(-50%); animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating-card .card-icon { font-size: 2.34rem; margin-bottom: 0.5rem; }
.floating-card h5 { margin-top: 1rem; font-weight: 700; }

.security-card-hero {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    background: transparent;
}

.security-card-hero h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white !important;
}

.security-card-hero p {
    font-size: 0.85rem;
    line-height: 1.5;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ================== BUTTONS ================== */
.btn-primary {
    background: var(--color-primary);
    color: #ffffff !important;
    border: none;
    border-radius: 6px;
    padding: 12px 40px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(10,42,26, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-accent-deep);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(4,120,87, 0.35);
}

.btn-outline-primary {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 6px;
}

.btn-outline-primary:hover {
    background: var(--color-accent-deep);
    border-color: var(--color-accent-deep);
    color: #ffffff;
}

/* ================== CARDS ================== */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 100%);
    color: white;
    border: none;
    padding: 2rem 1.5rem;
    text-align: center;
}

.card-body {
    padding: 2rem 1.5rem;
}

/* ================== SECTIONS ================== */
section {
    padding: 80px 0;
    overflow: hidden;
}

section .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) #e9ecef;
}

section .table-responsive::-webkit-scrollbar { height: 8px; }
section .table-responsive::-webkit-scrollbar-track { background: #e9ecef; border-radius: 4px; }
section .table-responsive::-webkit-scrollbar-thumb { background: var(--color-secondary); border-radius: 4px; }
section .table-responsive::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

section h2::after { display: none; }

/* ================== FORM ================== */
.form-control, .form-select {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 0.94rem;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 0.2rem rgba(10,42,26, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

/* ================== ALERTS ================== */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 5px solid;
}

.alert-warning { background: #00d68f33; border-left-color: var(--color-accent); color: var(--color-primary); }
.alert-danger { background: #f8d7da; border-left-color: var(--color-danger); }
.alert-success { background: #d4edda; border-left-color: var(--color-success); }

/* ================== FAQ ================== */
.accordion-button:not(.collapsed) {
    background-color: var(--color-light);
    color: var(--color-primary);
}

.accordion-button {
    color: var(--color-primary);
    font-weight: 600;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--color-secondary);
}

/* ================== SERVICE CARDS ================== */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(10,42,26, 0.15);
    border-color: var(--color-secondary);
}

.service-card.featured {
    border: 2px solid var(--color-secondary);
    box-shadow: 0 10px 30px rgba(10,42,26, 0.2);
}

.service-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary));
    color: var(--color-on-accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
}

.service-card h4 {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.service-list li {
    padding: 0.5rem 0;
    font-size: 0.89rem;
    color: #555;
}

.service-list i { margin-right: 0.7rem; }

/* ================== FEATURE BOX ================== */
.feature-box {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(10,42,26, 0.12);
    border-color: var(--color-secondary);
}

.feature-box i {
    font-size: 2.06rem;
    color: var(--color-secondary);
    display: block;
    margin-bottom: 1rem;
}

.feature-box h5 {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-box p {
    color: #666;
    margin: 0;
}

/* ================== PROCESS STEPS ================== */
.process-step {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    height: 100%;
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-4px);
}

.step-number {
    width: 52px;
    height: 52px;
    background: var(--color-secondary);
    color: var(--color-on-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.22rem;
    font-weight: 800;
    margin: 0 auto 1.25rem;
}

.process-step h5 {
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ================== PROCESS SECTION ================== */
.process-section {
    background: #f8f9fa;
}

/* ================== SECTION HEADERS ================== */
.section-header { margin-bottom: 3rem; }

.section-title {
    font-size: 2.34rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.section-subtitle {
    font-size: 1.08rem;
    color: #666;
    margin-bottom: 0;
}

/* ================== TESTIMONIALS ================== */
.testimonials-section {
    background: #f5f5f5;
    padding: 4rem 0;
    overflow: hidden;
}

.testimonial-carousel {
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.testimonial-carousel .owl-stage-outer { overflow: hidden; }
.testimonial-carousel .owl-stage { display: flex; align-items: stretch; }

.testimonial-carousel .owl-item {
    padding: 7.5px;
    display: flex;
    min-height: 350px;
}

.testimonial-card-modern {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    text-align: center;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.testimonial-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.tcard-label {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tcard-label::before { content: "♪"; font-size: 0.7rem; }

.testimonial-card-modern .avatar-container { margin-bottom: 0.75rem; margin-top: 0.5rem; }

.testimonial-card-modern .testimonial-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    background: #e9e9e9;
    border: none;
}

.tcard-name { color: #1a1a1a; font-weight: 700; margin: 0 0 0.15rem; font-size: 1.03rem; }
.tcard-sector { color: #777; font-size: 0.77rem; margin-bottom: 0.75rem; font-style: italic; }
.tcard-text { color: #444; line-height: 1.55; font-size: 0.82rem; margin-bottom: 1rem; flex-grow: 1; padding: 0 0.25rem; }

.tcard-stars { display: flex; justify-content: center; gap: 3px; margin-top: auto; }
.tcard-stars i.bi-star-fill { color: #00d68f; font-size: 0.98rem; }
.tcard-stars i.bi-star-half { color: #00d68f; font-size: 0.98rem; }
.tcard-stars i.bi-star { color: #ddd; font-size: 0.98rem; }

/* Owl Carousel */
.owl-nav { display: none !important; }

.owl-dots { text-align: center; margin-top: 2rem; }

.owl-dot {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 5px !important;
    display: inline-block;
    cursor: pointer;
}

.owl-dot span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
}

.owl-dot.active span {
    background: var(--color-primary);
    width: 12px;
    height: 12px;
}

.testimonial-carousel .owl-nav { display: none !important; }

/* ================== UTILITY ================== */
.text-accent { color: var(--color-accent-deep); }
.text-primary { color: var(--color-primary) !important; }
.shadow-premium { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); }

/* ================== FOOTER ================== */
footer {
    background-color: white;
    margin-top: 5rem;
}

footer a { color: var(--color-primary); }
footer a:hover { color: var(--color-accent-deep); }

/* ================== ANIMATIONS ================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content { animation: fadeInUp 1s ease-out; }

/* ================== RESPONSIVE ================== */

/* Typographie reduite sur mobile : toutes les tailles du site sont exprimees
   en rem, donc baisser la racine (16 px -> 14 px) reduit l'ensemble de la
   typographie de 12,5 % en une seule regle. Les espacements Bootstrap etant
   eux aussi en rem, la barre de navigation perdrait de la hauteur : son
   padding est donc repasse en px pour conserver ses 70 px. */
@media (max-width: 767.98px) {
    html { font-size: 87.5%; }
    .navbar { padding: 10px 0; }   /* 50 px de contenu + 20 px + 1 px de filet = 71 px */
    body { padding-top: 71px; }    /* la barre reste alignee sur le contenu */
}

@media (max-width: 991px) {
    .hero-title { font-size: 2.34rem; }
    .section-title { font-size: 1.87rem; }
    .hero-image { display: none; }

    .min-vh-75 {
        min-height: auto;
        padding: 3rem 0;
    }

    .testimonial-carousel { padding: 0; }
    .testimonial-card-modern { min-height: auto; padding: 1.5rem 1rem; }
    .testimonial-card-modern .testimonial-avatar { width: 60px; height: 60px; }
    .tcard-name { font-size: 1rem; }
    .tcard-text { font-size: 0.85rem; }
}

@media (max-width: 768px) {
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 1.87rem; }
    .hero-title { font-size: 1.87rem; }
    .section-title { font-size: 1.50rem; }

    .cta-buttons { flex-direction: column; }
    .cta-buttons .btn { width: 100%; }
    .floating-card { display: none; }

    section { padding: 40px 0; }

    .security-card-hero { padding: 1.5rem; }
    .security-card-hero .col-md-6 { margin-bottom: 1rem !important; }

    .container { padding-left: 15px; padding-right: 15px; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.50rem; }
    .hero-subtitle { font-size: 0.94rem; }
    .section-title { font-size: 1.31rem; }
    .service-card { padding: 1.5rem; }
}

/* ---------------------------------------------------------------------
   Section « Éligibilité » des pages de prêt (design 3 cartes)
   --------------------------------------------------------------------- */
.loan-eligibility .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.loan-eligibility .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}


/* ==========================================================================
   « Nos Chiffres Clés » — graphiques animés (page d'accueil)
   --------------------------------------------------------------------------
   Design repris du projet saga (lui-même tiré de la section « Key Figures »
   du modèle) : graphique en barres + anneau de satisfaction + liste cochée +
   barres de progression.
   Les couleurs sont transposées à la charte verte Tomcikova-Consulting :
   vert sombre #0a2a1a, menthe #00d68f, vert profond #047857.
   Les DONNÉES viennent de la clé `figures` de lang/<lang>/index.json
   (aucune valeur inventée dans le HTML).
   ========================================================================== */

.section-chiffres {
    --c-primaire: #0a2a1a;
    --c-primaire-fonce: #0a2a1a;
    --c-accent: #00d68f;
    --c-accent-profond: #047857;
    --c-bordure: #E6EBF2;
    --c-texte-muet: #64748B;

    background-color: #ffffff;
    /* La barre de navigation est fixe : sans cette marge, un lien vers
       #chiffres place le titre de la section sous la navbar. */
    scroll-margin-top: 90px;
}

/* ==========================================================================
   CARTES
   ========================================================================== */
.carte-avantage {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--c-bordure);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(10,42,26, 0.06), 0 2px 8px rgba(10,42,26, 0.04);
}

.icone-avantage {
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(10,42,26, 0.08);
    color: var(--c-primaire);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carte-avantage h5 {
    font-weight: 700;
    color: var(--c-primaire-fonce);
    /* !important : neutralise la taille globale des h5 du site */
    font-size: 1.05rem !important;
}

/* ==========================================================================
   GRAPHIQUES
   ========================================================================== */
.chart-svg {
    width: 100%;
    height: auto;
    flex: 1 1 auto;
    min-height: 360px;
    display: block;
}

.donut-svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==========================================================================
   LISTE À PUCES COCHÉES
   ========================================================================== */
.liste-chiffres {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem !important;
}

.liste-chiffres li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    color: #495057;
}

.liste-chiffres li:last-child {
    margin-bottom: 0;
}

.liste-chiffres i {
    color: var(--c-accent-profond);
    margin-top: 0.15rem;
    flex: 0 0 auto;
}

/* ==========================================================================
   BARRES DE PROGRESSION
   ========================================================================== */
.progress-campagne {
    height: 8px;
    border-radius: 999px;
    background: var(--c-bordure);
    overflow: hidden;
}

.progress-campagne-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--c-accent), var(--c-primaire));
    width: 0;
    transition: width 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s;
}

.section-chiffres.anime .progress-campagne-bar {
    width: var(--largeur, 0%);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 575.98px) {

    /* L'anneau et la liste passent l'un sous l'autre : on garde l'axe
       horizontal AVEC retour à la ligne et des enfants en largeur 100 %.
       ⚠️ Ne pas mettre `flex-direction: column` ici : la ligne garde
       `flex-wrap: wrap` et les enfants partent alors dans une 2e colonne
       (la liste sort de la carte). */
    .bloc-donut {
        flex-direction: row;
    }

    .bloc-donut > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    /* L'anneau occupe toute la largeur (max-width 260 px) : ses textes sont
       donc plus grands que sur desktop. On reduit la police sur mobile.
       24 unites -> 52 px rendus a 390 px de large, on vise ~30 px. */
    .donut-svg .donut-valeur {
        font-size: 14px;
    }

    .donut-svg .donut-libelle {
        font-size: 7px;
    }
}

/* Sous 992 px les deux cartes s'empilent : `h-100` + `flex: 1 1 auto`
   étirent le SVG et laissent un grand vide au-dessus du graphique.
   On lui rend sa hauteur naturelle. */
@media (max-width: 991.98px) {
    .chart-svg {
        min-height: 0;
        flex: 0 0 auto;
    }
}

/* ==========================================================================
   ANIMATIONS (déclenchées par la classe .anime ajoutée par IntersectionObserver)
   ========================================================================== */

/* Barres du graphique : elles montent depuis la ligne de base */
.chart-svg .barre-chiffre {
    transform-box: fill-box;
    transform-origin: bottom center;
    transform: scaleY(0);
    transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--retard, 0s);
}

.section-chiffres.anime .chart-svg .barre-chiffre {
    transform: scaleY(1);
}

/* Valeurs et années : apparition en fondu */
.chart-svg .txt-chiffre,
.donut-svg .txt-chiffre {
    opacity: 0;
    transition: opacity 0.5s ease;
    transition-delay: var(--retard, 0s);
}

.section-chiffres.anime .chart-svg .txt-chiffre,
.section-chiffres.anime .donut-svg .txt-chiffre {
    opacity: 1;
}

/* Anneau de satisfaction : il se dessine (stroke-dashoffset) */
.anneau-chiffre {
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s;
}

.section-chiffres.anime .anneau-chiffre {
    stroke-dashoffset: var(--offset, 0);
}

/* ==========================================================================
   REJEU AU SURVOL
   Le graphique se redessine quand la souris passe sur sa carte.
   Des @keyframes sont nécessaires : après l'animation d'entrée les valeurs
   sont déjà à leur état final, donc une simple transition ne rejouerait rien.
   Le rejeu n'a lieu qu'après la révélation de la section (.anime).
   `backwards` maintient la valeur de départ pendant le décalage (--retard),
   puis la valeur revient naturellement à l'état final (pas de saut).
   ========================================================================== */
@keyframes tc-barres {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
}

@keyframes tc-anneau {
    from { stroke-dashoffset: 326.7; }
    to   { stroke-dashoffset: var(--offset, 0); }
}

@keyframes tc-remplissage {
    from { width: 0; }
    to   { width: var(--largeur, 0%); }
}

@keyframes tc-fondu {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.section-chiffres.anime .carte-avantage:hover {
    box-shadow: 0 16px 40px rgba(10,42,26, 0.12), 0 4px 12px rgba(10,42,26, 0.06);
}

.section-chiffres.anime .carte-avantage:hover .chart-svg .barre-chiffre {
    animation: tc-barres 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
    animation-delay: var(--retard, 0s);
}

.section-chiffres.anime .carte-avantage:hover .anneau-chiffre {
    animation: tc-anneau 1.3s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s backwards;
}

.section-chiffres.anime .carte-avantage:hover .progress-campagne-bar {
    animation: tc-remplissage 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s backwards;
}

.section-chiffres.anime .carte-avantage:hover .chart-svg .txt-chiffre,
.section-chiffres.anime .carte-avantage:hover .donut-svg .txt-chiffre {
    animation: tc-fondu 0.5s ease backwards;
    animation-delay: var(--retard, 0s);
}

/* Accessibilité : pas d'animation si l'utilisateur les a désactivées */
@media (prefers-reduced-motion: reduce) {

    .chart-svg .barre-chiffre,
    .chart-svg .txt-chiffre,
    .donut-svg .txt-chiffre,
    .anneau-chiffre,
    .progress-campagne-bar {
        transition: none !important;
    }

    .section-chiffres.anime .carte-avantage:hover .chart-svg .barre-chiffre,
    .section-chiffres.anime .carte-avantage:hover .anneau-chiffre,
    .section-chiffres.anime .carte-avantage:hover .progress-campagne-bar,
    .section-chiffres.anime .carte-avantage:hover .chart-svg .txt-chiffre,
    .section-chiffres.anime .carte-avantage:hover .donut-svg .txt-chiffre {
        animation: none !important;
    }
}
