/* Update : 29/09/2025 */
/* =========================
   Variables et reset
   ========================= */
:root {
    --primary-color: #2c6e49;
    --secondary-color: #4c956c;
    --accent-color: #fefee3;
    --text-color: #333;
    --light-color: #f9f9f9;
    --dark-color: #1a1a1a;
    --background-color: #fff;
    --header-bg: #fff;
    --card-bg: #fff;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Consolidated Dark Mode - Remove duplicate declarations */
body.dark-mode {
    --primary-color: #7ed957;
    /*#7be495*/
    --secondary-color: #b8f2e6;
    --accent-color: #23272a;
    --text-color: #f0f0f0;
    --light-color: #23272a;
    --dark-color: #101214;
    --background-color: #121212;
    --header-bg: #1e1e1e;
    --card-bg: #1a1a1a;
    --border-color: #333;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Accessibilité: état focus */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Réduction des animations si préférée */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

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

section {
    scroll-margin-top: 100px;
}

/* =========================
   Header & Navigation
   ========================= */
header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Right section - horizontal layout */
.nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav {
    flex: 1 1 auto;
    min-width: 0;
}

/* Navigation menu */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

nav ul li a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Utilities - side by side */
.utilities {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
    flex-grow: 0;
}

.language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    color: var(--text-color);
}

.language-switcher button.active {
    opacity: 1;
    font-weight: bold;
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 17px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2c6e49;
}

input:focus+.slider {
    box-shadow: 0 0 1px #010d17;
}

input:checked+.slider:before {
    transform: translateX(13px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 17px;
}

.slider.round:before {
    border-radius: 50%;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 40px;
    height: 25px;
    margin: 20px 0;
}

.logo-sante-plat {
    max-width: 50%;
    height: fit-content;
    object-fit: scale-down;
}

.logo-on-dark {
    display: none;
}

body.dark-mode .logo-on-light {
    display: none;
}

body.dark-mode .logo-on-dark {
    display: block;
}


.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* =========================
   Hero
   ========================= */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    margin-top: 80px;
}

/* Parallax Utility */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Fallback for mobile devices that don't support fixed background */
@media (max-width: 1024px) {
    .hero, .parallax-section {
        background-attachment: scroll;
    }
}

.parallax-divider {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1498837167922-ddd27525d352?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
    color: white;
    text-align: center;
}

.parallax-divider-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.parallax-divider-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* =========================
   Sections génériques
   ========================= */
section {
    padding: 80px 0;
    transition: background-color 0.3s ease;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-color);
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

/* =========================
   À propos
   ========================= */
.about-content {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.about-text {
    flex: 1;
    min-width: 300px;
    text-align: justify;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.values {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.value-card {
    flex: 1;
    min-width: 200px;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.value-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* =========================
   Services
   ========================= */
.services {
    background-color: var(--light-color);
    transition: background-color 0.3s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.service-image {
    height: 300px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 20px;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* =========================
   Qualité & hygiène
   ========================= */
.quality-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.quality-text {
    flex: 1;
    min-width: 300px;
}

.quality-image {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.process-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    margin-bottom: 15px;
}

/* =========================
   Contact
   ========================= */
.contact {
    background-color: var(--light-color);
    transition: background-color 0.3s ease;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
}

form {
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

form label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

form input,
form textarea,
form select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

form textarea {
    min-height: 120px;
    resize: vertical;
}

/* =========================
   Footer
   ========================= */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    transition: background-color 0.3s ease;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

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

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 40px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #ccc;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--header-bg);
        transition: left 0.3s;
        padding: 20px;
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 15px 0;
    }

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

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

/* =========================
   Modals
   ========================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.modal:target {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    z-index: 2001;
    animation: modalSlideIn 0.3s ease-out;
    color: var(--text-color);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    color: #aaa;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-color);
}