/* nano4life - Base Styles: Variables, Reset, Typography, Layout, Utilities */

/* ===== VARIABLES & RESET ===== */
:root {
    /* Combined Color Variables - Using the more comprehensive set */
    --primary: #083344;      /* Deep navy blue - from logo */
    --secondary: #3b82f6;    /* Bright blue accent */
    --accent: #0e7490;       /* Teal accent */
    --light: #f8fafc;        /* Light background */
    --dark: #1e293b;         /* Dark text */
    --gray: #64748b;         /* Medium gray */
    --light-gray: #cbd5e1;   /* Light gray */
    --white: #ffffff;        /* White */
    --success: #10b981;      /* Green */
    --warning: #f59e0b;      /* Amber */
    --danger: #ef4444;       /* Red */

    /* Nano4Life Brand Colors - Kept for compatibility */
    --nano-blue: #0056b3;
    --nano-orange: #f28b00;
    --nano-gray-light: #f0f0f0;
    --nano-gray-medium: #e0e0e0;
    --nano-text-dark: rgba(2, 34, 73, 0.25);
    --nano-text-medium: #495057;
    --nano-text-light: #6c757d;
    --nano-black: #000000;

    /* Shadow System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

/* ===== TYPOGRAPHY ===== */
body {
    font-family: 'Inter', 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.025em;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
}

h2.section-title-small {
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

h3.section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

p {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    color: var(--dark);
}

strong {
    font-weight: 700;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, border-color 0.2s ease;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-content {
    padding: 4rem 0;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-24 { margin-bottom: 6rem; }
.ml-4 { margin-left: 1rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-6 { padding: 1.5rem; }
.p-16 { padding: 4rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-xl); }
.object-cover { object-fit: cover; }
.w-full { width: 100%; }
.h-auto { height: auto; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-8 { gap: 2rem; }
.gap-16 { gap: 4rem; }
.items-center { align-items: center; }
.order-1 { order: 1; }
.order-2 { order: 2; }

/* Color Utilities */
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }
.text-red-600 { color: #dc2626; }
.text-blue-500 { color: #3b82f6; }
.text-yellow-500 { color: #eab308; }
.text-green-500 { color: #22c55e; }
.text-purple-500 { color: #a855f7; }
.text-gray-600 { color: var(--gray); }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-white { color: var(--white); }
.font-bold { font-weight: 700; }
.font-light { font-weight: 300; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-2xl { font-size: 1.5rem; }
.text-xl { font-size: 1.25rem; }
.text-sm { font-size: 0.875rem; }

/* Hover Utilities */
.group:hover .group-hover\:text-blue-700 { color: #1d4ed8; }
.group:hover .group-hover\:text-yellow-700 { color: #b45309; }
.group:hover .group-hover\:text-green-700 { color: #047857; }
.group:hover .group-hover\:text-purple-700 { color: #7e22ce; }
.hover\:shadow-xl:hover { box-shadow: var(--shadow-xl); }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2.section-title { font-size: 2.25rem; }
    .hero h1 { font-size: 3.5rem; }

    .site-slogan {
        font-size: clamp(1.3rem, 2.5vw, 1.8rem);
        text-align: left;
        max-width: 500px;
    }

    .header-main-flex {
        flex-direction: initial;
        text-align: center;
        gap: 1.5rem;
        min-height: auto;
        padding: 1.5rem 0;
    }
}

/* ===== MOBILE RESPONSIVE (768px and below) ===== */
@media (max-width: 768px) {
    /* Afficher le bouton hamburger mobile */
    .mobile-toggle {
        display: block;
    }

    /* Navigation mobile */
    .header-nav {
        overflow: hidden;
        max-height: 60px;
        transition: max-height 0.4s ease;
    }

    .header-nav.active {
        max-height: 500px;
    }

    .header-nav ul {
        flex-direction: column;
        height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .header-nav li {
        width: 100%;
        border-bottom: 1px solid var(--nano-gray-medium);
    }

    .header-nav li:last-child {
        border-bottom: none;
    }

    .header-nav a {
        padding: 15px 20px;
        justify-content: flex-start;
        width: 100%;
        text-transform: none;
        font-size: 1rem;
    }

    /* Dropdown mobile */
    .dropdown-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--nano-gray-medium);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: var(--nano-gray-light);
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 300px;
    }

    .dropdown-menu li a {
        padding-left: 40px;
        font-size: 0.95rem;
        background-color: var(--nano-gray-light);
    }

    h1 { font-size: 2.5rem; }
    h2.section-title { font-size: 2rem; }
    h2.section-title-small { font-size: 1.75rem; }
    .hero { height: 70vh; min-height: 500px; }
    .hero h1 { font-size: 2.75rem; }
    .hero p { font-size: 1.25rem; }
    .content-media-block { margin-bottom: 4rem; }
    .page-content { padding: 3rem 0; }
    .final-cta { padding: 3rem 1.5rem !important; }

    /* Header Responsive */
    .header-main {
        padding: 15px 0;
        position: relative;
    }

    .header-main-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .site-slogan {
        font-size: 1.2rem;
        text-align: center;
        max-width: 100%;
        margin: 0;
        padding: 0 15px;
    }

    .header-main .logo img {
        max-width: 200px;
        max-height: 60px;
    }

    /* Navigation Responsive */
    .nav-container {
        height: auto;
        min-height: 70px;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-menu {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    /* Form Responsive */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-form-container {
        padding: 25px 20px;
        margin: 30px auto;
    }

    .contact-form-container h2 {
        font-size: 1.75rem;
    }

    .contact-form-container p {
        font-size: 1rem;
    }
}

/* ===== SMALL MOBILE (640px and below) ===== */
@media (max-width: 640px) {
    h1 { font-size: 2rem; }
    h2.section-title { font-size: 1.75rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero p { font-size: 1.125rem; }
    .cta-button { padding: 0.875rem 2rem; font-size: 1rem; }
    .container { padding: 0 1rem; }

    .site-slogan {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .header-main .logo img {
        max-width: 180px;
        max-height: 50px;
    }

    .nav-menu { gap: 1rem; }
    .nav-link { font-size: 0.85rem; }

    .header-nav a {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .dropdown-menu li a {
        padding-left: 35px;
    }
}

/* ===== VERY SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2.section-title { font-size: 1.5rem; }

    .hero {
        height: 60vh;
        min-height: 400px;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .header-main .logo img {
        max-width: 150px;
        max-height: 40px;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .contact-form-container {
        padding: 20px 15px;
        margin: 20px auto;
    }

    .contact-form-container h2 {
        font-size: 1.5rem;
    }
}

/* Responsive Grid Utilities */
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:order-1 { order: 1; }
    .lg\:order-2 { order: 2; }
}
