/* ============================================
   VARIABLES ET RESET — Charte MUSIVA
   Palette mosaïque : bleu nuit, or, tesselles
   ============================================ */
:root {
    --primary-color: #12273d;   /* Bleu nuit — wordmark MUSIVA */
    --secondary-color: #2e5c87; /* Bleu moyen */
    --accent-color: #b78636;    /* Or — arc et baseline du logo */

    /* Tesselles de la mosaïque */
    --tessera-teal: #1f7a80;
    --tessera-terracotta: #c0562c;
    --tessera-ocre: #b87333;
    --tessera-sand: #d9a441;
    --tessera-olive: #6e8b4a;
    --tessera-stone: #8a9099;

    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #faf7f0;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

/* Verrou logo : emblème mosaïque + wordmark + baseline */
.logo > a,
.footer-logo {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-items: center;
}

.logo-mark {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    display: block;
}

.logo-text {
    grid-column: 2;
    align-self: end;
    font-family: 'Montserrat', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.logo-subtitle {
    grid-column: 2;
    align-self: start;
    font-size: 10px;
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: -2px;
}

/* Lien e-mail (remplace l'obfuscation Cloudflare de l'ancien site) */
.email-link {
    color: var(--accent-color);
    font-weight: 600;
}

.email-link:hover {
    text-decoration: underline;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 0;
    display: block;
}

.nav-menu > li > a:hover {
    color: var(--primary-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-dark);
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.btn-contact {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 25px;
    font-size: 13px !important;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slide:nth-child(1) {
    background: linear-gradient(135deg, #12273d 0%, #2e5c87 100%);
}

.hero-slide:nth-child(2) {
    background: linear-gradient(135deg, #d9a441 0%, #b78636 100%);
}

.hero-slide:nth-child(3) {
    background: linear-gradient(135deg, #1f7a80 0%, #3aa6a0 100%);
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 22px;
    font-weight: 300;
    max-width: 700px;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

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

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    background: var(--bg-white);
    padding: 60px 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

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

/* ============================================
   SECTIONS GÉNÉRALES
   ============================================ */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 42px;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
    background: var(--bg-light);
}

.intro-text {
    font-size: 20px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 16px;
}

.about-principles {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.about-principles h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.principles-list li {
    display: flex;
    align-items: start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 16px;
}

.principle-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: bold;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
    background: var(--bg-white);
}

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

.service-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.service-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.service-icon {
    font-size: 64px;
}

.service-content {
    padding: 30px;
}

.service-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-description {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
}

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

/* ============================================
   CLIENTS SECTION
   ============================================ */
.clients-section {
    background: var(--bg-light);
}

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

.client-logo {
    background: var(--bg-white);
    padding: 40px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.client-logo:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.client-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.client-name span {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 400;
    margin-top: 5px;
}

/* ============================================
   VALUES SECTION
   ============================================ */
.values-section {
    background: var(--bg-white);
}

.values-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.values-text h2 {
    font-size: 42px;
    margin-bottom: 25px;
}

.values-text p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-light);
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 14px 32px;
    border-radius: 25px;
    font-weight: 600;
    margin-top: 15px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.values-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.value-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    box-shadow: var(--shadow-md);
}

/* ============================================
   CERTIFICATION SECTION
   ============================================ */
.certification-section {
    background: var(--bg-light);
}

.certification-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
}

.certification-badge {
    background: var(--bg-white);
    padding: 60px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.certification-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.certification-text p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-light);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.95;
}

.btn-primary-large {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 18px 48px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
}

.btn-primary-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 30px;
    border-top: 4px solid var(--accent-color);
}

/* Le logo passe en négatif sur le bleu nuit du pied de page */
.main-footer .logo-text {
    color: white;
}

.main-footer .logo-subtitle {
    color: var(--accent-color);
}

.main-footer .email-link {
    color: var(--tessera-sand);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-contact {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom a:hover {
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .services-grid,
    .clients-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .about-grid,
    .values-content,
    .certification-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

/* ============================================
   PAGES ÉDITORIALES — Notre histoire
   ============================================ */
.story-section {
    padding: 70px 0;
    background: var(--bg-white);
}

.story-section--alt {
    background: var(--bg-light);
}

.story-section--epilogue {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.9);
}

.story-content {
    max-width: 760px;
}

.story-content h2 {
    font-size: 34px;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.story-section--epilogue .story-content h2 {
    color: white;
}

.story-content p {
    margin-bottom: 20px;
    font-size: 17px;
    line-height: 1.8;
}

.story-kicker {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 8px !important;
}

.story-lead {
    font-size: 20px !important;
    line-height: 1.7 !important;
    color: var(--primary-color);
}

.story-section--epilogue .story-lead {
    color: var(--tessera-sand);
}

.story-lockup {
    text-align: center;
    margin-bottom: 40px;
}

.story-lockup img {
    max-width: 380px;
    width: 100%;
    height: auto;
}

.story-quote {
    border-left: 4px solid var(--accent-color);
    padding: 4px 0 4px 24px;
    margin: 32px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--primary-color);
}

.story-signature {
    margin-top: 36px;
    font-style: italic;
    color: var(--tessera-sand);
}

.story-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.story-fact {
    background: var(--bg-white);
    border-top: 3px solid var(--accent-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.story-fact-year {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.story-fact p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 0 !important;
}

.story-pillars {
    display: grid;
    gap: 24px;
    margin-top: 36px;
}

.story-pillar {
    border-left: 4px solid var(--tessera-teal);
    padding-left: 22px;
}

.story-pillar:nth-child(2) { border-left-color: var(--tessera-terracotta); }
.story-pillar:nth-child(3) { border-left-color: var(--tessera-sand); }

.story-pillar h3 {
    font-size: 21px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.story-pillar p {
    margin-bottom: 0;
}

/* ============================================
   MENTIONS LÉGALES
   ============================================ */
.legal-section {
    padding: 70px 0;
    background: var(--bg-white);
}

.legal-content {
    max-width: 800px;
}

.legal-content h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 44px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.legal-list {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px 20px;
    margin: 20px 0 24px;
    padding: 22px 24px;
    background: var(--bg-light);
    border-radius: 8px;
}

.legal-list dt {
    font-weight: 600;
    color: var(--primary-color);
}

.legal-list dd {
    margin: 0;
}

.legal-bullets {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 20px;
}

.legal-bullets li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.legal-note {
    background: var(--bg-light);
    border-left: 4px solid var(--tessera-teal);
    padding: 18px 22px;
    border-radius: 0 8px 8px 0;
    font-size: 15px;
}

.legal-updated {
    margin-top: 48px;
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

@media (max-width: 768px) {
    .story-facts,
    .legal-list {
        grid-template-columns: 1fr;
    }

    .legal-list dt {
        margin-top: 8px;
    }

    .story-content h2 {
        font-size: 28px;
    }

    .story-quote {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    /* La baseline devient illisible sous 480 px : on garde emblème + wordmark */
    .main-header .logo-subtitle {
        display: none;
    }
}

/* Encart de transition CCFA → MUSIVA (accueil) */
.transition-note {
    max-width: 860px;
    margin: 0 auto 40px;
    padding: 22px 26px;
    background: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    line-height: 1.75;
    text-align: left;
}

.transition-note a {
    color: var(--accent-color);
    font-weight: 600;
    white-space: nowrap;
}

.transition-note a:hover {
    text-decoration: underline;
}

/* ============================================
   EN-TÊTE DE PAGE INTÉRIEURE
   (les pages historiques redéfinissent ce bloc
   en <style> inline : elles gardent la main)
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 90px 0 60px;
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 20px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }

    .page-header h1 {
        font-size: 34px;
    }

    .page-header p {
        font-size: 17px;
    }
}

/* ============================================
   ICÔNES — jeu SVG au trait (remplace les émojis)
   ============================================ */
.icon {
    width: 1em;
    height: 1em;
    display: block;
    flex: none;
    stroke: currentColor;
}

/* Pastilles à fond dégradé : l'icône passe en négatif */
.service-icon,
.value-icon,
.info-icon,
.financement-icon,
.tool-icon,
.intro-visual,
.features-grid .feature-icon,
.benefit-icon {
    color: #fff;
}

/* Visuel d'en-tête des pages service : trait plus fin à grande taille */
.intro-visual {
    font-size: 96px;
}

.intro-visual .icon {
    stroke-width: 1.2;
    opacity: 0.92;
}

.principle-icon {
    font-size: 15px;
}
