/* ============================================
   CSBF Consulting — Styles
   Palette: Navy #1B2A4A | Cream #F5F0E8 | Red #C4392F | Dark #2D2D2D
   ============================================ */

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

:root {
    --navy: #1B2A4A;
    --navy-dark: #111c33;
    --cream: #F5F0E8;
    --cream-light: #FAF7F2;
    --red: #C4392F;
    --red-dark: #a32d25;
    --dark: #2D2D2D;
    --gray: #6B6B6B;
    --gray-light: #999;
    --white: #FFFFFF;
    --shadow: 0 8px 30px rgba(27,42,74,0.12);
    --shadow-lg: 0 16px 50px rgba(27,42,74,0.18);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

a {
    color: var(--navy);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--red); }

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

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}

.accent { color: var(--red); }

.section-header {
    margin-bottom: 50px;
}

.section-label {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
}

.title-underline {
    width: 70px;
    height: 4px;
    background: var(--red);
    border-radius: 2px;
    margin-top: 16px;
}

strong { font-weight: 600; }

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
    padding: 18px 0;
}

.navbar.scrolled {
    background: rgba(27,42,74,0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 70px;
    width: auto;
    transition: height var(--transition);
}

.navbar.scrolled .nav-logo-img {
    height: 38px;
}

.footer-logo-img {
    height: 70px;
    width: auto;
    margin-bottom: 4px;
}

.logo-csbf {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
}

.logo-consulting {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.7);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 50%, #243658 100%);
    color: var(--white);
    overflow: hidden;
}

.hero-bg-shape {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    transform: rotate(-12deg);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 16px 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.badge-years {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
}

.badge-text {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.hero-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.since-badge {
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 8px 16px;
    border-radius: 4px;
}

.since-text {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--red);
    color: var(--white);
    padding: 14px 36px;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.hero-cta:hover {
    background: var(--red-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196,57,47,0.4);
}

/* --- Expertise Section --- */
.expertise {
    background: var(--cream-light);
}

.expertise-content p {
    font-size: 17px;
    max-width: 800px;
    margin-bottom: 20px;
    color: var(--dark);
}

.expertise-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--navy);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-number::after {
    content: '+';
    font-size: 32px;
    color: var(--red);
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
}

/* --- Services Section --- */
.services {
    background: var(--cream);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--navy), var(--red));
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--navy);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 24px;
    color: var(--white);
}

.service-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.service-underline {
    width: 40px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    margin-bottom: 18px;
}

.service-list {
    list-style: none;
}

.service-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--dark);
    line-height: 1.5;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
}

/* --- Tunisie Section --- */
.tunisie {
    background: var(--navy);
    color: var(--white);
    position: relative;
}

.tunisie .section-title {
    color: var(--white);
}

.tunisie .section-label {
    color: rgba(255,255,255,0.5);
}

.tunisie .accent {
    color: var(--red);
}

.tunisie-bg-shape {
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 50%;
    height: 160%;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    transform: rotate(10deg);
}

.tunisie-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.tunisie-text p {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
}

.tunisie-list {
    list-style: none;
    margin-top: 16px;
}

.tunisie-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tunisie-list li i {
    color: var(--red);
    font-size: 16px;
    margin-top: 3px;
}

.tunisie-extension {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    backdrop-filter: blur(8px);
}

.extension-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.tunisie-extension p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 14px;
    line-height: 1.7;
}

.extension-emphasis {
    font-weight: 600;
    color: var(--white);
    border-left: 3px solid var(--red);
    padding-left: 14px;
    margin-top: 6px;
}

/* --- Engagement Section --- */
.engagement {
    background: var(--cream-light);
}

.engagement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.engagement-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.engagement-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--red);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.engagement-card:hover::after {
    transform: scaleX(1);
}

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

.engagement-icon {
    width: 56px;
    height: 56px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.engagement-icon i {
    font-size: 22px;
    color: var(--white);
}

.engagement-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.engagement-card p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.6;
}

.engagement-quote {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    color: var(--white);
    text-align: center;
}

.engagement-quote h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 18px;
}

.engagement-quote .accent {
    color: var(--red);
}

.engagement-quote p {
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Chiffres Section --- */
.chiffres {
    background: var(--cream);
}

.chiffres-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.chiffre-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--red);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.chiffre-value {
    font-family: 'Playfair Display', serif;
    font-size: 44px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
}

.chiffre-unit {
    font-size: 28px;
    color: var(--red);
}

.chiffre-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--red);
    margin-bottom: 12px;
}

.chiffre-desc {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
}

/* --- Slogan Banner --- */
.slogan-banner {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    padding: 60px 0;
    text-align: center;
}

.slogan-banner h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
}

/* --- Contact Section --- */
.contact {
    background: var(--cream-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-item i {
    width: 48px;
    height: 48px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.contact-item span,
.contact-item a {
    font-size: 14px;
    color: var(--gray);
}

.contact-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e4dc;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--dark);
    background: var(--cream-light);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27,42,74,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-submit:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196,57,47,0.4);
}

.form-success {
    display: none;
    text-align: center;
    padding: 30px;
}

.form-success i {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 16px;
}

.form-success h3 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    margin-bottom: 10px;
}

.form-success p {
    color: var(--gray);
}

/* --- Footer --- */
.footer {
    background: var(--navy-dark);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-csbf {
    font-size: 32px;
}

.footer-brand .logo-consulting {
    font-size: 12px;
}

.footer-brand p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 12px;
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 18px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--red);
}

.footer-contact p {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--red);
}

.footer-contact i {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

/* ============================================
   Animations
   ============================================ */

/* Scroll-triggered base states */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
}

/* Directional variants */
.fade-down { transform: translateY(-30px); }
.fade-up { transform: translateY(40px); }
.fade-right { transform: translateX(-40px); }
.fade-left { transform: translateX(40px); }

.fade-down.visible { transform: translateY(0); }
.fade-up.visible { transform: translateY(0); }
.fade-right.visible { transform: translateX(0); }
.fade-left.visible { transform: translateX(0); }

/* Keyframe Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.hero-badge {
    animation: pulse 3s ease-in-out infinite;
}

.engagement-icon {
    animation: float 3s ease-in-out infinite;
}

/* Staggered float for engagement icons */
.engagement-card:nth-child(2) .engagement-icon { animation-delay: 0.3s; }
.engagement-card:nth-child(3) .engagement-icon { animation-delay: 0.6s; }
.engagement-card:nth-child(4) .engagement-icon { animation-delay: 0.9s; }
.engagement-card:nth-child(5) .engagement-icon { animation-delay: 1.2s; }
.engagement-card:nth-child(6) .engagement-icon { animation-delay: 1.5s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .engagement-grid { grid-template-columns: repeat(2, 1fr); }
    .chiffres-grid { grid-template-columns: repeat(2, 1fr); }
    .tunisie-content { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
        background: rgba(17, 28, 51, 0.96);
        box-shadow: 0 2px 20px rgba(0,0,0,0.12);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--navy-dark);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 24px;
        transition: right var(--transition);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 70px;
        align-items: flex-start;
    }

    .hero-content {
        padding-top: 10px;
    }

    .hero-badge {
        margin-top: 0;
    }

    .hero-title { font-size: 28px; }
    .expertise-stats { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .engagement-grid { grid-template-columns: 1fr; }
    .chiffres-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
    .section { padding: 70px 0; }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 108px;
    }

    .hero-badge {
        padding: 14px 20px;
    }

    .badge-years {
        font-size: 26px;
    }

    .chiffres-grid { grid-template-columns: 1fr; }
    .hero-sub { flex-direction: column; gap: 12px; }
}
