﻿/* --- Variables & Theme --- */
:root {
    /* Colors - Professional Blue Theme */
    --primary-color: #1a365d;
    /* Deep blue - trust, professionalism */
    --secondary-color: #0ea5e9;
    /* Sky blue - energy, action */
    --accent-color: #2563eb;
    /* Bright blue - modern */
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-color: #334155;
    --text-light: #64748b;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Spacing */
    --section-padding: 100px 20px;
    --container-width: 1200px;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Layout --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--light-bg);
}

.bg-dark {
    background-color: var(--dark-bg);
}

/* --- Typography Helpers --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header.light h2,
.section-header.light p {
    color: white;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 0 auto 20px;
    border-radius: 2px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    white-space: nowrap;
}

.nav-links li a:hover {
    color: var(--secondary-color);
}

.btn-nav {
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    color: white !important;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

.hamburger {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .logo span {
        display: none;
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 25px;
    color: white;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.service-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature {
    text-align: center;
}

.feature svg {
    width: 48px;
    height: 48px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Timeline --- */
.timeline {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
}

.timeline-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    margin-bottom: 20px;
}

.timeline-content h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Team Grid --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.team-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-photo {
    width: 170px;
    height: 170px;
    border-radius: 24px;
    margin: 30px auto 10px;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border: 4px solid white;
}

.team-card h4 {
    padding: 20px 15px 5px;
    font-size: 1.1rem;
}

.team-card p {
    padding: 0 15px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* --- Contact --- */
.contact-box {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.contact-box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.contact-box input,
.contact-box textarea {
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.contact-box input:focus,
.contact-box textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-box button {
    padding: 18px;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

footer p {
    opacity: 0.8;
}

/* --- Team Building Section --- */
.grid-2-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .grid-2-large {
        grid-template-columns: 1fr;
    }
}

.check-list {
    list-style: none;
    margin: 1.5rem 0;
}

.check-list li {
    margin-bottom: 1rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.check-list li::before {
    content: "✅";
    flex-shrink: 0;
}

.mt-2 {
    margin-top: 2rem;
    display: inline-block;
}

/* --- Custom Responsive Enhancements --- */
.hero-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hero-logo {
    max-height: 260px;
    flex-shrink: 0;
    max-width: 100%;
    border-radius: 30px;
    background: white;
    padding: 5px;
    border: 6px solid var(--secondary-color);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.hero-title {
    margin-bottom: 0px !important;
    text-align: left;
    line-height: 1.2;
    font-size: 2.8rem !important;
}

.label-image {
    width: 350px;
    height: 350px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 5px var(--primary-color);
    background: white;
}

@media (max-width: 900px) {
    .hero-logo-container {
        flex-direction: column;
        gap: 25px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero-logo {
        max-height: none;
        width: 80%;
        max-width: 350px;
        padding: 5px;
        border-radius: 20px;
        border-width: 4px;
    }

    .hero-title {
        text-align: center !important;
        font-size: 2.2rem !important;
    }

    .label-image {
        width: 250px;
        height: 250px;
        border-width: 4px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2), 0 0 0 4px var(--primary-color);
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-height: none;
        width: 90%;
        max-width: 320px;
    }
    .hero-title {
        font-size: 1.8rem !important;
    }
    .label-image {
        width: 200px;
        height: 200px;
    }
}

/* --- Floating Contact Button --- */
.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--secondary-color), #0284c7);
    color: white !important;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
}

.floating-contact-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

.floating-contact-btn svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .floating-contact-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* --- Theme Override for Pros de Santé (Emerald / Teal) --- */
.pro-health {
    --primary-color: #0f172a;       /* Slate 900 */
    --secondary-color: #0f766e;     /* Emerald 700 / Teal */
    --accent-color: #0d9488;        /* Vibrant Teal */
}

/* --- Space Switcher (Navbar Capsule) --- */
.space-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
    gap: 2px;
    margin: 0 15px;
}

.switcher-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.switcher-btn.active {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.switcher-btn:hover:not(.active) {
    color: var(--primary-color) !important;
    background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 900px) {
    .space-switcher {
        margin: 10px 0;
        order: 3;
    }
}

/* --- Portal Page (index.html) --- */
.portal-body {
    background: #0b1329;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    font-family: var(--font-body);
}

/* Background lights for Portal */
.portal-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

.portal-bg-glow-1 {
    background: #0ea5e9;
    top: -100px;
    left: -100px;
    animation: portalPulse 8s infinite alternate;
}

.portal-bg-glow-2 {
    background: #0f766e;
    bottom: -100px;
    right: -100px;
    animation: portalPulse 8s infinite alternate-reverse 2s;
}

@keyframes portalPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.15; }
    100% { transform: scale(1.2) translate(50px, 30px); opacity: 0.25; }
}

.portal-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 90vh;
}

.portal-header {
    text-align: center;
    margin-bottom: 50px;
}

.portal-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.portal-logo-img {
    height: 60px;
    border-radius: 12px;
    background: white;
    padding: 3px;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.portal-brand-name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
}

.portal-brand-name .accent-text {
    background: linear-gradient(135deg, #0ea5e9, #0f766e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-subtitle {
    color: #94a3b8;
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Portal Grid Layout */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    width: 100%;
    margin-bottom: 60px;
}

@media (max-width: 900px) {
    .portal-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

/* Portal Card Style */
.portal-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 50px 40px;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portal-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.portal-card-entreprise .portal-card-glow {
    background: radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.15) 0%, transparent 60%);
}

.portal-card-sante .portal-card-glow {
    background: radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.2) 0%, transparent 60%);
}

.portal-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portal-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease;
}

.portal-card-entreprise .portal-card-icon {
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    color: white;
}

.portal-card-sante .portal-card-icon {
    background: linear-gradient(135deg, #115e59, #0d9488);
    color: white;
}

.portal-card-icon svg {
    width: 32px;
    height: 32px;
}

.portal-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.4;
}

.portal-card .highlight-blue {
    color: #0ea5e9;
}

.portal-card .highlight-teal {
    color: #0d9488;
}

.portal-card-desc {
    color: #94a3b8;
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 40px;
    flex-grow: 1;
}

.portal-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
}

.portal-card-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

/* Hover effects */
.portal-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.portal-card:hover .portal-card-glow {
    opacity: 1;
}

.portal-card:hover .portal-card-icon {
    transform: scale(1.1);
}

.portal-card-entreprise:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.portal-card-sante:hover {
    border-color: rgba(13, 148, 136, 0.4);
}

.portal-card-entreprise:hover .portal-card-btn {
    color: #0ea5e9;
}

.portal-card-sante:hover .portal-card-btn {
    color: #0d9488;
}

.portal-card:hover .portal-card-btn svg {
    transform: translateX(6px);
}

.portal-footer {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    width: 100%;
}

/* --- Specific Styles for formation-sante.html --- */
.chiffre-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 2px solid #ccfbf1; /* Soft teal border */
    transition: transform 0.3s ease;
}

.chiffre-card:hover {
    transform: translateY(-5px);
}

.chiffre-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.chiffre-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.chiffre-desc {
    color: var(--text-light);
    font-size: 0.95rem;
}

.pro-badge {
    display: inline-block;
    background: #f0fdfa; /* Soft teal bg */
    color: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid #99f6e4;
}

.pro-card-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 25px;
    min-height: 100px;
}

.pro-bullets {
    text-align: left;
    margin-bottom: 30px;
}

.pro-bullets li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.pro-bullets li svg {
    color: var(--secondary-color);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pro-price {
    font-size: 0.95rem;
    color: var(--text-color);
    border-top: 1px dashed #e2e8f0;
    padding-top: 20px;
    margin-bottom: 20px;
}

.btn-pro-action {
    display: block;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white !important;
    text-align: center;
    padding: 14px;
    border-radius: 6px;
    font-weight: 700;
    font-family: var(--font-heading);
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.25);
    transition: all 0.3s ease;
}

.btn-pro-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}

.pro-feature svg {
    color: var(--secondary-color) !important;
}

.pro-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

@media (max-width: 900px) {
    .navbar .container {
        flex-wrap: wrap;
    }
}

/* --- Cookie Banner & Modal --- */
.cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 90%;
    max-width: 850px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 1;
}

.cookie-banner.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
    pointer-events: none;
}

.cookie-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cookie-icon {
    background-color: rgba(255, 255, 255, 0.15);
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.cookie-icon i {
    width: 24px;
    height: 24px;
}

.cookie-text h3 {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.cookie-text p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.cookie-text a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-cookie-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-heading);
}

.btn-cookie-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.btn-cookie-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-heading);
}

.btn-cookie-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Cookie Settings Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.cookie-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.cookie-modal {
    background-color: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(1) translateY(0);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cookie-modal-overlay.hidden .cookie-modal {
    transform: scale(0.9) translateY(30px);
}

.cookie-modal-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin: 0;
    font-family: var(--font-heading);
}

.close-cookie-modal {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
    line-height: 1;
}

.close-cookie-modal:hover {
    opacity: 1;
}

.cookie-modal-body {
    padding: 35px;
    max-height: 450px;
    overflow-y: auto;
}

.cookie-modal-body p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cookie-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-option:first-of-type {
    padding-top: 0;
}

.cookie-option-info {
    flex-grow: 1;
}

.cookie-option-info strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.98rem;
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.cookie-option-info p {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.cookie-switch-wrapper {
    flex-shrink: 0;
}

.switch-always-active {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Switch toggle styling */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--secondary-color);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(22px);
}

.cookie-modal-footer {
    padding: 25px 35px;
    background-color: var(--light-bg);
    display: flex;
    justify-content: flex-end;
}

.cookie-modal-footer button {
    font-size: 0.9rem;
    padding: 12px 30px;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 20px 25px;
        bottom: 15px;
        border-radius: 12px;
    }
    
    .cookie-content {
        gap: 15px;
    }
    
    .cookie-icon {
        width: 40px;
        height: 40px;
        border-radius: 6px;
    }
    
    .cookie-icon i {
        width: 18px;
        height: 18px;
    }
    
    .cookie-actions {
        justify-content: center;
        width: 100%;
    }
    
    .btn-cookie-primary, .btn-cookie-secondary {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .cookie-modal-body {
        padding: 25px;
    }
    
    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
/* --- Livret V19 Custom Design System (Mascots Milo & Zo�) --- */
.v19-dialogue-box {
    background: rgba(255, 255, 255, 0.95);
    border-left: 5px solid #0ea5e9;
    padding: 16px 20px;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 15px 0;
}
.v19-dialogue-box.zoe { border-left-color: #0d9488; }
.v19-dialogue-box.milo { border-left-color: #0284c7; }
.v19-dialogue-speaker {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.v19-dialogue-speaker.milo { color: #0284c7; }
.v19-dialogue-speaker.zoe { color: #0d9488; }
.v19-dialogue-text {
    font-style: italic;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1a365d;
    margin: 0;
}
.v19-card-sector {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.v19-card-sector:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.v19-card-sector img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #f8fafc;
}
.v19-card-sector-body {
    padding: 25px;
}

/* --- Fixed Navbar Left Layout (Logo Centered 1.5x Above Switcher) --- */
.nav-left {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-align: center !important;
}

.nav-left .logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
}

.nav-left .logo img {
    height: 85px !important;
    max-height: 85px !important;
    width: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
}

.space-switcher {
    display: flex !important;
    background: #f1f5f9 !important;
    padding: 4px !important;
    border-radius: 30px !important;
    border: 1px solid #e2e8f0 !important;
    gap: 2px !important;
    margin: 0 !important;
}

body:not(.portal-body) {
    padding-top: 140px;
}

.hero {
    padding-top: 140px !important;
}
/* ==========================================================================
   Comprehensive Mobile & Responsive Optimization (Smartphones & Tablets)
   ========================================================================== */

/* Universal Overflow & Box Sizing Prevention */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

* {
    box-sizing: border-box;
}

/* Tablet & Mobile Layout (max-width: 768px) */
@media (max-width: 768px) {
    /* Navbar Adjustment */
    .navbar .nav-container {
        padding: 8px 15px !important;
        flex-wrap: wrap;
        position: relative;
    }

    .nav-left {
        gap: 4px !important;
    }

    .nav-left .logo img {
        height: 55px !important;
        max-height: 55px !important;
    }

    .space-switcher {
        padding: 3px !important;
    }

    .switcher-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Page top padding for smaller header height */
    body:not(.portal-body) {
        padding-top: 110px !important;
    }

    .hero {
        padding-top: 110px !important;
        min-height: auto !important;
        padding-bottom: 50px !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.25 !important;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 25px !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .hero-buttons .btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Mobile Navigation Drawer */
    .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px) !important;
        padding: 20px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
        gap: 15px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        z-index: 1000 !important;
    }

    .nav-links.active li {
        width: 100% !important;
        text-align: center !important;
    }

    .nav-links.active a {
        display: block !important;
        padding: 10px 0 !important;
        font-size: 1.05rem !important;
        width: 100% !important;
    }

    /* Grids & Cards Stacking */
    .grid-2-large,
    .services-grid,
    .team-grid,
    .features-grid,
    .portal-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .section {
        padding: 40px 15px !important;
    }

    .section-header h2 {
        font-size: 1.6rem !important;
    }

    .section-header p {
        font-size: 0.95rem !important;
    }

    .service-card,
    .team-card,
    .chiffre-card,
    .contact-box,
    .mascot-illustration-box {
        padding: 20px 16px !important;
    }

    /* Form Mobile Layout */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .contact-box input,
    .contact-box select,
    .contact-box textarea {
        font-size: 0.95rem !important;
        padding: 12px 14px !important;
    }

    .contact-box button[type="submit"] {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
    }

    /* Floating Contact Button */
    .floating-contact-btn {
        bottom: 15px !important;
        right: 15px !important;
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    }
}

/* Small Smartphone Screen Layout (max-width: 480px) */
@media (max-width: 480px) {
    .nav-left .logo img {
        height: 48px !important;
        max-height: 48px !important;
    }

    .space-switcher {
        width: 100% !important;
        justify-content: center !important;
    }

    .switcher-btn {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
    }

    body:not(.portal-body) {
        padding-top: 105px !important;
    }

    .hero-title {
        font-size: 1.5rem !important;
    }

    .chiffre-number {
        font-size: 2.2rem !important;
    }

    /* Portal Page Mobile */
    .portal-container {
        padding: 15px !important;
    }

    .portal-header {
        margin-bottom: 25px !important;
    }

    .portal-logo-img {
        max-height: 60px !important;
    }

    .portal-brand-name {
        font-size: 1.5rem !important;
    }

    .portal-subtitle {
        font-size: 0.9rem !important;
    }

    .portal-card {
        padding: 25px 18px !important;
    }
}
/* --- Hero Grid Container & Universal Mobile Anti-Truncation --- */
.hero-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .hero-grid-container,
    div[style*="grid-template-columns"],
    .container[style*="grid-template-columns"],
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.25 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        word-break: break-word !important;
    }

    .v19-dialogue-box {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .v19-badge {
        font-size: 0.75rem !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    .container,
    .hero .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

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