/* ============================================
   GROUPE MCB - Styles principaux
   Palette : Blanc dominant / #2A2E77 / #662483
   Inspiré de Digiforma & Qualiobee
   ============================================ */

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

:root {
    --color-navy: #2A2E77;
    --color-navy-dark: #1e2159;
    --color-purple: #662483;
    --color-purple-light: #8a3fa8;
    --color-white: #ffffff;
    --color-light: #f7f7fc;
    --color-light-purple: #f5f0f8;
    --color-gray: #6b7280;
    --color-gray-light: #e5e7eb;
    --color-gray-lighter: #f3f4f6;
    --color-dark: #1f2937;
    --color-black: #111111;
    --gradient-brand: linear-gradient(135deg, var(--color-navy) 0%, var(--color-purple) 100%);
    --gradient-brand-soft: linear-gradient(135deg, rgba(42,46,119,0.06) 0%, rgba(102,36,131,0.06) 100%);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(42, 46, 119, 0.06);
    --shadow: 0 4px 24px rgba(42, 46, 119, 0.08);
    --shadow-lg: 0 12px 40px rgba(42, 46, 119, 0.12);
    --shadow-hover: 0 16px 48px rgba(42, 46, 119, 0.16);
    --radius: 20px;
    --radius-lg: 32px;
}

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

body {
    font-family: var(--font-main);
    color: var(--color-dark);
    line-height: 1.6;
    background-color: var(--color-white);
    overflow-x: hidden;
    position: relative;
}

/* --- Background décoratif rectangles --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/elements-rectangles.png');
    background-size: 600px auto;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

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

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* --- Navigation --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    border-bottom: 1px solid rgba(42, 46, 119, 0.08);
    box-shadow: 0 2px 20px rgba(42, 46, 119, 0.06);
}

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

.nav-logo img {
    height: 70px;
    width: auto;
}

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

.nav-links a {
    padding: 10px 22px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-dark);
    border-radius: 80px;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--color-purple);
    background: var(--color-light-purple);
}

.nav-links a.active {
    color: var(--color-white);
    background: var(--gradient-brand);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--color-navy);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* --- Section Hero --- */
.hero {
    background: var(--color-white);
    color: var(--color-dark);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 30%, rgba(102, 36, 131, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 70%, rgba(42, 46, 119, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(102, 36, 131, 0.04) 0%, transparent 60%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 140px 24px 80px;
    max-width: 820px;
    margin: 0 auto;
}

.hero-logo {
    width: 180px;
    margin: 0 auto 40px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 400;
    color: var(--color-gray);
    margin-bottom: 36px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--color-gray);
    margin-bottom: 44px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description strong {
    color: var(--color-navy);
    font-weight: 700;
}

/* --- Boutons --- */
.btn-primary {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gradient-brand);
    color: var(--color-white);
    border: none;
    border-radius: 80px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-purple) 0%, var(--color-navy) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 80px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 36, 131, 0.3);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span,
.btn-primary {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
    border-radius: 80px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--gradient-brand);
    color: var(--color-white);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 46, 119, 0.25);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-indicator span {
    display: block;
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-navy);
    border-radius: 13px;
    position: relative;
    opacity: 0.3;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    background: var(--color-navy);
    border-radius: 2px;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 24px; }
}

/* --- Section Titles --- */
.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    text-align: center;
    color: var(--color-navy);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-gray);
    font-size: 1.1rem;
    margin-bottom: 56px;
}

/* --- Section Entités --- */
.entites {
    background: var(--color-white);
    padding: 100px 0;
}

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

.entite-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 48px 36px 40px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(42, 46, 119, 0.06);
}

.entite-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.entite-logo {
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    border-radius: var(--radius);
    background: var(--color-light);
    padding: 32px;
    overflow: hidden;
    transition: var(--transition);
}

.entite-card:hover .entite-logo {
    background: var(--gradient-brand-soft);
}

.entite-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.entite-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 14px;
}

.entite-card p {
    color: var(--color-gray);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 28px;
    flex-grow: 1;
}

/* --- Section Références --- */
.references {
    background: var(--color-light);
    padding: 100px 0;
}

.carousel-wrapper {
    overflow: hidden;
    padding: 20px 0;
    position: relative;
}

.carousel-wrapper::before,
.carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-light), transparent);
}

.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-light), transparent);
}

.carousel-track {
    display: flex;
    gap: 36px;
    width: max-content;
}

.carousel-right {
    animation: scrollRight 60s linear infinite;
}

.carousel-left {
    animation: scrollLeft 60s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scrollRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes scrollLeft {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.carousel-slide {
    flex: 0 0 auto;
    width: 160px;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid var(--color-gray-light);
    transition: var(--transition);
}

.carousel-slide:hover {
    border-color: var(--color-purple);
    box-shadow: 0 4px 16px rgba(102, 36, 131, 0.1);
    transform: scale(1.05);
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}

.carousel-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- Téléchargements --- */
.downloads {
    text-align: center;
    margin-top: 60px;
    padding: 52px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(42, 46, 119, 0.06);
}

.downloads h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: 28px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-brand);
    color: var(--color-white);
    border-radius: 80px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(42, 46, 119, 0.25);
}

.btn-download svg {
    flex-shrink: 0;
}

/* --- Section Contact --- */
.contact {
    background: var(--color-white);
    padding: 100px 0;
}

.contact-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.contact-form {
    background: var(--color-white);
    padding: 52px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(42, 46, 119, 0.06);
}

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

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

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

.required {
    color: var(--color-purple);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--color-gray-light);
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-dark);
    transition: var(--transition);
    background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 0 4px rgba(102, 36, 131, 0.08);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444;
}

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

.form-consent {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--color-gray);
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    accent-color: var(--color-purple);
}

.checkbox-label a {
    color: var(--color-purple);
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 1.05rem;
    margin-top: 8px;
}

.form-status {
    text-align: center;
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    font-weight: 500;
    display: none;
}

.form-status.success {
    display: block;
    background: #dcfce7;
    color: #166534;
}

.form-status.error-msg {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

/* --- Footer --- */
#footer {
    background: var(--color-black);
    color: rgba(255, 255, 255, 0.75);
    padding: 72px 0 0;
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    width: 150px;
    margin-bottom: 8px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
}

.footer-brand-bar {
    width: 60px;
    height: 3px;
    background: var(--gradient-brand);
    border-radius: 3px;
}

.footer-col h4 {
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 0.9rem;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.55);
}

.footer-col ul li a:hover {
    color: var(--color-white);
    padding-left: 6px;
}

.footer-bottom {
    text-align: center;
    padding: 28px 0;
    font-size: 0.83rem;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-bottom-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

/* --- Animations d'apparition --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .entites-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .entite-logo {
        width: 220px;
        height: 220px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-container {
        height: 80px;
    }

    .nav-logo img {
        height: 55px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        padding: 110px 32px 32px;
        box-shadow: -8px 0 30px rgba(42, 46, 119, 0.1);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 4px;
    }

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

    .nav-links a {
        padding: 14px 20px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .hero-content {
        padding: 110px 20px 80px;
    }

    .hero-logo {
        width: 140px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 32px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .carousel-slide {
        width: 130px;
        height: 75px;
    }

    body::before {
        background-size: 400px auto;
        opacity: 0.03;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .entite-card {
        padding: 32px 20px;
    }

    .entite-logo {
        width: 180px;
        height: 180px;
        padding: 24px;
    }

    .downloads {
        padding: 32px 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 4px;
    }
}
