@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    /* --- DocMorris-like Palette --- */
    /* Primary Medical Green */
    --primary-h: 145;
    --primary-s: 70%;
    --primary-l: 35%;
    --primary-color: hsl(var(--primary-h), var(--primary-s), var(--primary-l));

    /* Lighter Green for interactions */
    --primary-light: hsl(145, 60%, 96%);

    /* Accent (Warm Orange) */
    --accent-color: hsl(32, 95%, 55%);
    --accent-hover: hsl(32, 95%, 45%);

    /* Neutral Scale */
    --text-main: hsl(210, 15%, 20%);
    --text-muted: hsl(210, 10%, 50%);
    --bg-page: hsl(0, 0%, 98%);
    --bg-surface: hsl(0, 0%, 100%);
    --border-color: hsl(210, 15%, 90%);

    /* Destructive/Urgent */
    --destructive: #dc3545;

    /* System */
    --radius: 8px;
    --radius-btn: 50px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --leading-relaxed: 1.6;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: var(--leading-relaxed);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius);
}

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

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    font-weight: 700;
    line-height: 1.2;
    color: hsl(var(--primary-h), 50%, 20%);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.text-primary {
    color: var(--primary-color);
}

.text-white {
    color: white;
}

.text-muted-foreground {
    color: var(--text-muted);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.hidden-mobile {
    display: flex;
}

.hidden {
    display: none;
}

/* --- HEADER & NAVIGATION --- */
header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
    /* Slightly increased for new logo */
}

.announcement-bar {
    background-color: hsl(var(--primary-h), 60%, 25%);
    color: white;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    height: auto;
    min-height: 70px;
}

.logo-link img {
    height: 72px;
    /* Enlarged Logo */
    width: auto;
    border-radius: 0;
    transition: all 0.2s;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu .mobile-nav-actions {
    display: none !important;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.icon-link {
    color: var(--text-muted);
    transition: color 0.2s;
    padding: 0.5rem;
    border-radius: 50%;
}

.icon-link:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 15px);
    background: var(--bg-surface);
    min-width: 240px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    z-index: 101;
}

.dropdown:hover .dropdown-menu {
    transform: translate(-50%, 5px);
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    border-radius: 4px;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Mobile & Burger */
.burger-menu {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
    cursor: pointer;
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: all 0.2s ease;
}

.burger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.burger-menu:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    .hidden-mobile {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .nav-container {
        padding: 0.5rem 0;
        position: relative;
    }

    .logo-link img {
        height: 48px;
    }

    .nav-menu {
        display: flex;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 0.4rem 0;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-color);
        border: 1px solid var(--border-color);
        border-radius: 14px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.2s ease;
        z-index: 200;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-link {
        width: 100%;
        padding: 0.9rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link::after {
        display: none;
    }

    .dropdown {
        width: 100%;
    }

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

    .dropdown > .nav-link::before {
        content: '+';
        font-weight: 700;
        color: var(--primary-color);
        margin-right: 0.5rem;
        order: 2;
    }

    .dropdown.active > .nav-link::before {
        content: '-';
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0.25rem 0.75rem 0.75rem 1rem;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
        visibility: visible;
        opacity: 1;
    }

    .dropdown-item {
        padding: 0.6rem 0.8rem;
        border-radius: 8px;
    }

    body.mobile-nav-open .nav-menu .mobile-nav-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
        width: 100%;
        padding: 0.9rem 1rem 1rem;
    }

    .mobile-nav-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: capitalize;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

.btn-primary:hover {
    background-color: hsl(var(--primary-h), 70%, 30%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    background-color: hsl(var(--primary-h), 20%, 97%);
}

.hero-section h2 {
    font-family: var(--font-heading);
    color: hsl(var(--primary-h), 60%, 20%);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* --- CARDS & PRODUCTS --- */
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.product-img-placeholder {
    width: 100%;
    height: 180px;
    background-color: #f4f6f5;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- SECTIONS --- */
.category-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    margin: 0 auto;
}

a:hover .category-circle {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

#ordonnance {
    background: var(--bg-page);
}

.promo-banner {
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
}

.promo-banner:hover {
    transform: scale(1.01);
}

.bg-white {
    background-color: var(--bg-surface);
}

.border-gray-100 {
    border-color: var(--border-color);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.rounded-xl {
    border-radius: 12px;
}

/* --- FORMS --- */
form {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.input,
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    color: Var(--text-main);
    background-color: #fff;
    transition: all 0.2s;
}

.input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* --- ACCORDION --- */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    background: var(--bg-surface);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.2rem;
    background: white;
    border: none;
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    transition: background 0.2s;
}

.accordion-header:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #fafafa;
    border-top: 1px solid transparent;
}

.accordion-content.active {
    max-height: 1000px;
    border-top-color: var(--border-color);
    padding-bottom: 1rem;
}

.accordion-content .p-6 {
    padding: 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    background-color: var(--primary-light);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- FOOTER --- */
footer {
    background: linear-gradient(135deg, #16563f 0%, #1a6b4a 50%, #16563f 100%);
    color: white;
    padding: 2.5rem 1rem 1.5rem;
    font-size: 0.9rem;
    margin-top: auto;
    border-top: none;
    position: relative;
    overflow: hidden;
}

/* Animated gradient glow at top */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(34, 197, 94, 0.8) 0%, 
        rgba(255, 255, 255, 0.6) 50%,
        rgba(34, 197, 94, 0.8) 100%);
    animation: footerGlow 4s ease-in-out infinite;
}

@keyframes footerGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Subtle wave pattern */
footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47,0,47,53,94,53s47-53,94-53,47,53,94,53,47-53,94-53,47,53,94,53,47-53,94-53,47,53,94,53c28.71,0,55.42-11.59,77-31,21.63,19.41,48.26,31,77,31s55.42-11.59,77-31c21.63,19.41,48.26,31,77,31,28.71,0,55.42-11.59,77-31,21.63,19.41,48.26,31,77,31s55.42-11.59,77-31c21.63,19.41,48.26,31,77,31,28.71,0,55.42-11.59,77-31,21.63,19.41,48.26,31,77,31s55.42-11.59,77-31c21.63,19.41,48.26,31,77,31s55.42-11.59,77-31c21.63,19.41,48.26,31,77,31,28.71,0,55.42-11.59,77-31,21.63,19.41,48.26,31,77,31,28.71,0,55.42-11.59,77-31V120H0V0Z' fill='%23ffffff' fill-opacity='0.02'%3E%3C/path%3E%3C/svg%3E") no-repeat top center;
    background-size: cover;
    pointer-events: none;
    opacity: 0.5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.footer-logo {
    height: 40px;
    width: auto !important;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1) !important;
    opacity: 0.95 !important;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.03);
}

footer p {
    color: rgba(255, 255, 255, 0.75) !important;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    max-width: 280px;
    font-size: 0.85rem;
}

footer h4 {
    color: #fff !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    opacity: 1;
    position: relative;
    display: inline-block;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 24px;
    height: 2px;
    background: rgba(34, 197, 94, 0.6);
    border-radius: 1px;
}

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

footer ul li {
    margin-bottom: 0.5rem;
}

footer ul li a {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 400;
    font-size: 0.85rem;
    display: inline-block;
    position: relative;
}

footer ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: width 0.3s ease;
}

footer ul li a:hover {
    color: white !important;
    padding-left: 0;
    transform: translateX(4px);
}

footer ul li a:hover::after {
    width: 100%;
}

footer .text-white {
    color: white !important;
}

/* Footer Icons */
footer .social-icons {
    display: flex;
    gap: 12px;
    margin-top: 1rem;
}

footer .social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

footer .social-icon:hover {
    background: rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    margin: 0;
    max-width: none;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

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

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (max-width: 900px) {
    footer {
        padding: 2rem 1.25rem 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        text-align: left;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .footer-logo {
        margin: 0 0 0.75rem;
    }

    footer p {
        margin: 0 0 0.75rem;
    }

    footer h4 {
        margin-top: 0.5rem;
        color: #fff !important;
    }

    footer .social-icons {
        justify-content: flex-start;
    }
}

/* Additional footer helper classes */
.footer-about {
    max-width: 280px;
}

.footer-contact {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 0.5rem;
}

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

/* --- ORDONNANCE PAGE --- */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

/* --- DOCMORRIS HEALTH GUIDE --- */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.guide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.guide-card:hover img {
    transform: scale(1.05);
    /* Zoom effect */
}

.guide-label {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    z-index: 2;
    min-width: 140px;
    text-align: center;
}
