/* Variables globales */
:root {
    /* Couleurs principales */
    --primary-color: #2C5282; /* Bleu fonc� */
    --secondary-color: #EBF8FF; /* Bleu clair */
    --accent-color: #4299E1; /* Bleu vif */
    --text-color: #2D3748; /* Gris fonc� */
    --light-bg: #F7FAFC; /* Fond clair */
    /* Couleurs s�mantiques */
    --success-color: #48BB78; /* Vert */
    --warning-color: #ECC94B; /* Jaune */
    --danger-color: #F56565; /* Rouge */
    --info-color: #4299E1; /* Bleu info */
    /* Couleurs d'urgence */
    --emergency-primary: #DC2626; /* Rouge d'urgence */
    --emergency-light: #FEE2E2; /* Rouge clair */
    --emergency-dark: #991B1B; /* Rouge fonc� */
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    /* Ombres */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.14);
    --shadow-xl: 0 15px 45px rgba(0, 0, 0, 0.16);
    /* Bordures */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
}

/* Reset et styles de base */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--light-bg);
}

html, body {
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary-color);
}

p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

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

/* Classes utilitaires */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

/* �l�ments circulaires g�n�riques */
.rounded-circle {
    width: 44px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

    .navbar.scrolled {
        padding: 0.75rem 0;
        box-shadow: var(--shadow-sm);
    }

        .navbar.scrolled .navbar-brand img {
            height: 60px;
        }


.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.5rem;
}

    .navbar-brand img {
        transition: height .5s;
    }

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
}

    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: var(--accent-color);
        transition: var(--transition-normal);
    }

    .nav-link:hover::after {
        width: 100%;
        left: 0;
    }

/* Hero Section */
body {
    padding-top: 7rem;
}

.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #FFFFFF 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="%234299E1" fill-opacity="0.1" d="M45.3,-77.5C59.9,-70.3,73.5,-59.7,81.1,-45.9C88.7,-32.1,90.4,-16.1,88.6,-1.1C86.8,14,81.5,27.9,73.8,40.5C66.1,53.1,56,64.3,43.4,71.7C30.8,79.1,15.4,82.7,-0.2,83C-15.8,83.4,-31.5,80.5,-44.8,73.2C-58.1,65.9,-68.9,54.2,-76.3,40.6C-83.7,27,-87.7,13.5,-87.1,0.3C-86.6,-12.8,-81.5,-25.7,-74.1,-37.4C-66.7,-49.2,-57,-59.9,-44.7,-68.3C-32.4,-76.7,-16.2,-82.9,-0.1,-82.7C16,-82.5,30.7,-84.8,45.3,-77.5Z" transform="translate(100 100)"></path></svg>') no-repeat center center;
        opacity: 0.1;
        z-index: 0;
    }

/* ===========================
    ARTICLE HERO (image derrière le titre)
   =========================== */

/* Bloc principal + variables */
.article-hero {
    /* Variables ajustables par page si besoin */
    --scrim-bottom: .55;
    /* intensité du dégradé en bas */
    --scrim-mid: .20;
    /* intensité à mi-hauteur */
    --text: #fff;
    /* couleur texte par défaut */
    --lead: rgba(255, 255, 255, .92);
    --min-h: clamp(280px, 45vh, 560px);
    /* hauteur mini responsive */

    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

/* Image en arrière-plan (gérée avec <picture><img>) */
.article-hero .hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.article-hero .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* couvre tout le conteneur */
    object-position: center;
    display: block;
}

/* Dégradé pour lisibilité (scrim) */
.article-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top,
            rgba(0, 0, 0, var(--scrim-bottom)),
            rgba(0, 0, 0, var(--scrim-mid)) 55%,
            rgba(0, 0, 0, 0));
}

/* Couche texte au-dessus de l'image et du scrim */
.article-hero .hero-overlay {
        background: rgba(0, 0, 0, .28);
    backdrop-filter: blur(2px);
    position: relative;
    z-index: 2;
    min-height: var(--min-h);
    display: flex;
    align-items: end;
    color: var(--text);
}

/* Typo titre/lead entièrement en blanc pour contraster sur l'image */
.article-hero .hero-overlay,
.article-hero .hero-overlay h1,
.article-hero .hero-overlay .lead,
.article-hero .hero-overlay p {
    color: #fff !important;
}

.article-hero .hero-overlay .lead {
    color: var(--lead) !important;
}

/* Optionnel: légère ombre portée pour renforcer le contraste du texte */
.text-shadow-strong {
    text-shadow:
        0 4px 18px rgba(0, 0, 0, .55),
        0 1px 3px rgba(0, 0, 0, .35);
}

/* Panneau translucide derrière le bloc texte (optionnel) */
.hero-panel {
    border-radius: 1rem;
}

/* Style du tag (badge) comme sur la home, en utilisant la variable primaire */
.article-hero .badge.bg-primary {
    background-color: var(--primary-color) !important;
    /* #2C5282 dans ton thème */
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

/* Liens éventuels dans le hero */
.article-hero .hero-overlay a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .5);
}

/* ===========================
    Variantes de contraste
   =========================== */

/* Image très claire -> scrim plus fort */
.article-hero[data-scrim="strong"] {
    --scrim-bottom: .70;
    --scrim-mid: .35;
}

.article-hero[data-scrim="x-strong"] {
    --scrim-bottom: .80;
    --scrim-mid: .45;
}

/* Image très sombre -> texte foncé (rare, à activer si besoin) */
.article-hero[data-tone="light"] {
    --text: #111;
    --lead: rgba(0, 0, 0, .8);
    --scrim-bottom: .15;
    --scrim-mid: .08;
}

.article-hero[data-tone="light"] .hero-overlay,
.article-hero[data-tone="light"] .hero-overlay h1,
.article-hero[data-tone="light"] .hero-overlay .lead,
.article-hero[data-tone="light"] .hero-overlay p {
    color: var(--text) !important;
}

.article-hero[data-tone="light"] .hero-panel {
    background: rgba(255, 255, 255, .66);
}

/* ===========================
    Responsive & détails
   =========================== */

@media (max-width: 576px) {
    .article-hero .hero-overlay {
        min-height: 42vh;
        /* un peu plus compact sur mobile */
    }
}

/* Si header sticky chevauche: ajoute simplement .mt-4 sur le <section>
    ou utilise cette règle si ton header a une classe .sticky
    header.sticky + .article-hero { margin-top: 4rem; }
*/

/* Accessibilité: si l’utilisateur préfère moins d’animations */
@media (prefers-reduced-motion: reduce) {
    .hero-panel {
        backdrop-filter: none;
    }
}



/* Service Cards */
.service-card {
    transition: var(--transition-normal);
    border: none;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    background: white;
}

    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-lg);
    }

/* Service Icons */
.service-icon {
    /*width: 60px;
    height: 60px;
    position: relative;
    border-radius: 50%;
    background-color: var(--secondary-color);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;*/
    width: 180px;
    height: 180px;
    position: relative;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .service-icon img {
        width: 100%;
        height: auto;
    }

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    margin-top: 3rem;
    transition: var(--transition-normal);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid white;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .testimonial-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Forms */
.form-control {
    padding: 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid #E2E8F0;
    transition: var(--transition-fast);
}

    .form-control:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    }

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--accent-color);
        border-color: var(--accent-color);
        transform: translateY(-2px);
    }

/* WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    z-index: 1000;
}

    .floating-whatsapp:hover {
        transform: scale(1.1);
        color: white;
    }

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.pulse-button {
    animation: pulse 2s infinite;
}

/* Media Queries */
@media (max-width: 992px) {
    .navbar {
        backdrop-filter: none;
        background: white;
    }

    .service-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 6rem;
    }

    .hero {
        padding: 4rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .testimonial-card {
        margin-top: 4rem;
    }

    .floating-whatsapp {
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 576px) {
    html, body {
        font-size: 16px;
    }

    h1, .display-6, .display-5 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .section,
    .hero,
    .py-5,
    .mb-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
        margin-bottom: 2rem !important;
    }


    body {
        padding-top: 6rem;
    }

    .lead,
    ul.list-unstyled li {
        font-size: 0.95rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }

    .navbar-brand img {
        height: 55px;
    }

    .navbar.scrolled .navbar-brand img {
        height: 55px;
    }


    form .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control,
    select.form-select {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .stats-number {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
    }

    .floating-whatsapp {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .floating-whatsapp,
    .btn {
        display: none !important;
    }

    .hero {
        padding: 2rem 0 !important;
        background: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .service-card:hover,
    .testimonial-card:hover {
        transform: none !important;
    }
}

/* === Mise en forme des articles de blog d�taill�s === */
.article-content p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.article-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content ul {
    padding-left: 1.2rem;
    margin-bottom: 2rem;
}

    .article-content ul li {
        margin-bottom: 0.75rem;
        line-height: 1.7;
    }

/* --- Anchor + sticky navbar fix --- */
html {
    /* smooth native */
    scroll-behavior: smooth;
}

/* ajuste fin si besoin: -4 à -8 */
:root {
    --anchor-tweak: -6px;
}

/* Quand on cible un id (#services, #contact...), on garde le décalage */
[id] {
    /* Hauteur réelle de la navbar (JS) + petite compensation */
    scroll-margin-top: calc(var(--nav-offset, 80px) + var(--anchor-tweak));
}