/* =========================================================================
   GROUPE PHARMA CI - Design System (Medical & Professional)
   ========================================================================= */

:root {
    /* Primary Colors */
    --primary: #006b54;
    /* Medical Green Dark */
    --primary-light: #00a884;
    /* Medical Green Light */
    --primary-dark: #004d3e;

    /* Secondary & Neutrals */
    --secondary: #1a1a1a;
    /* Professional Black */
    --white: #ffffff;
    --light-bg: #f8fafc;
    /* Clean Hospital White/Gray */
    --border-color: #e2e8f0;

    /* Text Colors */
    --text-dark: #1a202c;
    --text-gray: #4a5568;
    --text-muted: #718096;

    /* Functional Colors */
    --success: #10b981;
    --info: #3b82f6;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Transitions & Effects */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 50px -12px rgba(0, 107, 84, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* =========================================================================
   Base Styles
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    position: relative;
    overflow: hidden;
}

/* =========================================================================
   Typography & Layout Utilities
   ========================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    line-height: 1.2;
    font-weight: 700;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1rem;
}

.col {
    padding: 0 1rem;
    flex: 1;
}

.py-section {
    padding: 100px 0;
}

.items-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--white) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.bg-light {
    background-color: var(--light-bg);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-dark {
    background-color: var(--secondary);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-6 {
    margin-bottom: 4rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Grid Helpers */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Components: Buttons
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(0, 107, 84, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 107, 84, 0.4);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* =========================================================================
   Components: Navbar & Branding
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.6rem 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border-bottom: 2px solid var(--primary);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 107, 84, 0.2);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.logo-text span {
    color: var(--primary-light);
}

.navbar.scrolled .logo-text {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    color: var(--secondary);
    position: relative;
    padding: 0.5rem 0;
}

.navbar:not(.scrolled) .nav-link {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem;
        transition: 0.5s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .navbar:not(.scrolled) .nav-link {
        color: var(--secondary);
    }
}

/* =========================================================================
   Page Headers (Unique Designs)
   ========================================================================= */
.page-header {
    padding: 200px 0 120px;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 77, 62, 0.9) 0%, rgba(26, 26, 26, 0.8) 100%);
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* 1. Header À Propos: Design Elliptique & Doux */
.header-about {
    background-image: url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=2070&auto=format&fit=crop');
    clip-path: ellipse(150% 100% at 50% 0%);
}

/* 2. Header Services: Bordure Inférieure Distinctive */
.header-services {
    background-image: url('https://images.unsplash.com/photo-1584308666744-24d5c474f2ae?q=80&w=2070&auto=format&fit=crop');
    border-bottom: 8px solid var(--primary-light);
}

/* 3. Header Catalogue: Effet Parallaxe & Structure Centrale */
.header-catalogue {
    background-image: url('https://images.unsplash.com/photo-1583324113626-70df0f43aa2b?q=80&w=2070&auto=format&fit=crop');
    background-attachment: fixed;
}

/* 4. Header Contact: Alignement à Gauche pour Clarté */
.header-contact {
    background-image: url('https://images.unsplash.com/photo-1516549655169-df83a0774514?q=80&w=2070&auto=format&fit=crop');
    text-align: left;
}

@media (max-width: 768px) {
    .page-header {
        padding: 150px 0 80px;
        text-align: center;
    }
}

/* =========================================================================
   Hero Section (Index Only)
   ========================================================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 77, 62, 0.9) 0%, rgba(26, 26, 26, 0.7) 100%);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    max-width: 800px;
    margin-bottom: 2rem;
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 3rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

/* =========================================================================
   Cards & Content Components
   ========================================================================= */
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
    border-color: var(--primary-light);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 107, 84, 0.1);
    color: var(--primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Animations (Reveal System) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #128c7e;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
    background-color: var(--secondary);
    color: var(--white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-title {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    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-link:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Enhanced Background Utilities
   ========================================================================= */
.bg-overlay {
    position: relative;
    background-size: cover;
    background-position: center;
}

.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 77, 62, 0.94) 0%, rgba(26, 26, 26, 0.88) 100%);
    z-index: 1;
}

.bg-overlay .container {
    position: relative;
    z-index: 2;
}

.bg-medical-pattern {
    background-color: var(--light-bg);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23006b54' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.bg-img-hospital {
    background-image: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?q=80&w=2053&auto=format&fit=crop');
}

.bg-img-lab {
    background-image: url('https://images.unsplash.com/photo-1579152276506-8d184491761c?q=80&w=2070&auto=format&fit=crop');
}

.bg-img-tech {
    background-image: url('https://images.unsplash.com/photo-1551076805-e1869033e561?q=80&w=2070&auto=format&fit=crop');
}

.bg-img-pharma {
    background-image: url('https://images.unsplash.com/photo-1576602976047-174e57a47881?q=80&w=2069&auto=format&fit=crop');
}

.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}