/* ==========================================================================
   1. PALETTE DE COULEURS DE BASE
   ========================================================================== */
:root {
    /* --- Couleurs Light --- */
    --base-green-primary: #2e7d32;
    --base-green-secondary: #2ff31a;
    --base-gray-dark: #1a1a1a;
    --base-gray-light: #f4f7f6;
    --base-white: #ffffff;
    --base-text-main: #333333;
    --base-text-muted: #888888;
    --base-text-quote: #555555;
    --base-border: #dddddd;
    --base-footer-link: #aaaaaa;
    --base-footer-bottom: #999999;
    --base-footer-bg: #19451c;

    /* --- Couleurs Dark --- */
    --base-d-green-primary: #388e3c;
    --base-d-gray-dark: #e8ede9;
    --base-d-gray-light: #141a15;
    --base-d-white: #1e2620;
    --base-d-text-main: #c8d5ca;
    --base-d-text-muted: #5a7060;
    --base-d-text-quote: #a0b5a3;
    --base-d-bg-main: #111713;
    --base-d-bg-footer: #0a0f0b;
    --base-d-bg-testimonials: #1a2e1c;
    --base-d-border: #2e4030;
    --base-d-footer-link: #6a8a6e;
    --base-d-footer-bottom: #95ad9a;
    --base-d-footer-border: #1e2e20;

    /* --- Transparences & RGBA (Light) --- */
    --base-transparent: transparent;
    --base-shadow-sm-color: rgba(0, 0, 0, 0.1);
    --base-shadow-md-color: rgba(0, 0, 0, 0.05);
    --base-dropdown-hover-bg: rgba(46, 125, 50, 0.1);
    --base-highlight-bg: rgba(47, 243, 26, 0.4);
    --base-highlight-pulse: rgba(47, 243, 26, 0.8);
    --base-input-focus-shadow: rgba(46, 125, 50, 0.2);
    --base-testimonial-card-bg: rgba(255, 255, 255, 0.05);

    /* --- Transparences & RGBA (Dark) --- */
    --base-d-hero-overlay: rgba(10, 20, 12, 0.6);
    --base-d-border-subtle: rgba(78, 160, 84, 0.15);
    --base-d-shadow-sm-color: rgba(0, 0, 0, 0.5);
    --base-d-shadow-md-color: rgba(0, 0, 0, 0.4);
    --base-d-shadow-hover: rgba(47, 243, 26, 0.15);
    --base-d-dropdown-hover-bg: rgba(78, 160, 84, 0.15);
    --base-d-highlight-bg: rgba(76, 175, 80, 0.5);
    --base-d-highlight-pulse: rgba(76, 175, 80, 0.8);
    --base-d-input-focus-shadow: rgba(76, 175, 80, 0.15);
}

/* ==========================================================================
   2. VARIABLES & THÈMES (Assignation globale)
   ========================================================================== */
:root {
    --primary-color: var(--base-green-primary);
    --secondary-color: var(--base-green-secondary);
    --dark-color: var(--base-gray-dark);
    --light-color: var(--base-gray-light);
    --white: var(--base-white);
    --pure-white: var(--base-white);

    --text-color: var(--base-text-main);
    --text-muted: var(--base-text-muted);
    --text-quote: var(--base-text-quote);
    --font-main: 'Montserrat', sans-serif;

    --bg-main: var(--light-color);
    --bg-section: var(--white);
    --bg-card: var(--white);
    --bg-input: var(--pure-white);
    --bg-footer: var(--base-footer-bg);
    --bg-testimonials: var(--primary-color);
    --bg-legal-box: var(--light-color);
    --hero-overlay: var(--base-d-hero-overlay);

    --bg-testimonial-card: var(--base-testimonial-card-bg);

    --border-color: var(--base-border);
    --border-subtle: var(--base-transparent);

    --shadow-sm: 0 2px 10px var(--base-shadow-sm-color);
    --shadow-md: 0 5px 15px var(--base-shadow-md-color);
    --shadow-lg: 0 10px 30px var(--base-shadow-sm-color);
    --shadow-hover: 0 10px 20px var(--base-shadow-md-color);

    --nav-hover: var(--primary-color);
    --dropdown-hover-bg: var(--base-dropdown-hover-bg);
    --dropdown-hover-text: var(--primary-color);

    --highlight-bg: var(--base-highlight-bg);
    --highlight-pulse: var(--base-highlight-pulse);

    --input-focus-border: var(--primary-color);
    --input-focus-shadow: 0 0 5px var(--base-input-focus-shadow);

    --footer-link: var(--base-footer-link);
    --footer-bottom-text: var(--base-footer-bottom);
    --footer-border: var(--base-text-main);
}

[data-theme="dark"] {
    --primary-color: var(--base-d-green-primary);
    --secondary-color: var(--base-green-secondary);
    --dark-color: var(--base-d-gray-dark);
    --light-color: var(--base-d-gray-light);
    --white: var(--base-d-white);
    --text-color: var(--base-d-text-main);
    --text-muted: var(--base-d-text-muted);
    --text-quote: var(--base-d-text-quote);

    --bg-main: var(--base-d-bg-main);
    --bg-section: var(--base-d-bg-main);
    --bg-card: var(--white);
    --bg-input: var(--base-d-bg-main);
    --bg-footer: var(--white);
    --bg-testimonials: var(--base-d-bg-testimonials);
    --bg-legal-box: var(--white);
    --hero-overlay: var(--base-d-hero-overlay);

    --border-color: var(--base-d-border);
    --border-subtle: var(--base-d-border-subtle);

    --shadow-sm: 0 2px 10px var(--base-d-shadow-sm-color);
    --shadow-md: 0 5px 20px var(--base-d-shadow-md-color);
    --shadow-lg: 0 10px 30px var(--base-d-shadow-sm-color);
    --shadow-hover: 0 8px 30px var(--base-d-shadow-hover);

    --nav-hover: var(--secondary-color);
    --dropdown-hover-bg: var(--base-d-dropdown-hover-bg);
    --dropdown-hover-text: var(--secondary-color);

    --highlight-bg: var(--base-d-highlight-bg);
    --highlight-pulse: var(--base-d-highlight-pulse);

    --input-focus-border: var(--secondary-color);
    --input-focus-shadow: 0 0 0 3px var(--base-d-input-focus-shadow);

    --footer-link: var(--base-d-footer-link);
    --footer-bottom-text: var(--base-d-footer-bottom);
    --footer-border: var(--base-d-footer-border);
}

/* ==========================================================================
   3. RESET & BASE (Global)
   ========================================================================== */
.preload * {
    transition: none !important;
}

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

html {
    scroll-padding-top: 155px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-main), sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-main);
}

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

h1, h2, h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

/* ==========================================================================
   4. COMPOSANTS RÉUTILISABLES (Boutons, Titres de sections)
   ========================================================================== */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.btn-primary {
    background-color: var(--base-green-primary);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

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

.btn-secondary {
    background-color: var(--base-transparent);
    color: var(--pure-white);
    padding: 12px 25px;
    border: 2px solid var(--pure-white);
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ==========================================================================
   5. HEADER & FOOTER (Toutes les pages)
   ========================================================================== */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1001;
    padding: 15px 0;
}

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

.logo img {
    max-height: 100px;
    width: auto;
    display: block;
    transition: filter 0.3s ease;
}

[data-theme="dark"] .logo img {
    content: url('assets/logo_sipa_blanc.webp');
    mix-blend-mode: lighten;
}

[data-theme="dark"] .logo-footer img {
    content: url('assets/logo_sipa_blanc.webp');
    mix-blend-mode: lighten;
}

.logo span { color: var(--primary-color); }
nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

nav a:hover { color: var(--nav-hover); }

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    border-radius: 25px;
    padding: 5px 15px;
    border: 1px solid var(--border-color);
}
.search-bar input {
    border: none;
    background: var(--base-transparent);
    outline: none;
    padding: 5px;
    font-family: var(--font-main), sans-serif;
    color: var(--text-color);
    width: 200px;
}

.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: transform 0.2s;
}

.search-bar button:hover { transform: scale(1.1); }

.search-bar:focus-within {
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
}

.search-wrapper { position: relative;
    margin-left: 10px;
    margin-right: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 250px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    box-shadow: var(--shadow-md);
    list-style: none;
    padding: 10px 0;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1002;
}

.search-results-dropdown.active { display: block; }

.search-results-dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-subtle);
}

.search-results-dropdown li:last-child a { border-bottom: none; }

.search-results-dropdown li a:hover {
    background-color: var(--dropdown-hover-bg);
    color: var(--dropdown-hover-text);
}

.no-result {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

mark.highlight {
    background-color: var(--highlight-bg);
    color: inherit;
    padding: 0;
    font-weight: inherit;
    border-radius: 2px;
    box-shadow: 0 0 5px var(--highlight-bg);
    animation: pulseHighlight 2s ease-out;
}

@keyframes pulseHighlight {
    0% { background-color: var(--highlight-pulse); }
    100% { background-color: var(--highlight-bg); }
}

.theme-toggle {
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-family: var(--font-main), sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (hover: hover) {
    .theme-toggle:hover {
        background-color: var(--primary-color);
        color: var(--pure-white);
    }
}

.theme-toggle:active {
    background-color: var(--primary-color);
    color: var(--pure-white);
    transform: scale(0.90);
    transition: transform 0.1s ease;
}

.theme-toggle .icon-sun, .theme-toggle .icon-moon {
    font-size: 1rem;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.dropdown { position: relative;
    z-index: 1000;}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    list-style: none;
    padding: 10px 0;
    min-width: 220px;
    border-radius: 5px;
}

.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li { margin: 0; }

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
}

.dropdown-menu a:hover {
    background-color: var(--dropdown-hover-bg);
    color: var(--dropdown-hover-text);
}

.dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: var(--text-color);
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: var(--nav-hover);
}

footer {
    background-color: var(--bg-footer);
    color: var(--pure-white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

footer h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; }

footer a { color: var(--footer-link); }
footer a:hover { color: var(--secondary-color); }

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--footer-border);
    padding-top: 20px;
    color: var(--footer-bottom-text);
    font-size: 0.9rem;
}

/* ==========================================================================
   6. PAGE D'ACCUEIL (index.html)
   ========================================================================== */
.hero {

    color: var(--pure-white);
    text-align: center;
    padding: 100px 0;
    z-index: 1000;
}

.hero h1 {
    color: var(--pure-white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.services {
    padding: 80px 0;
    background-color: var(--bg-main);
}

.grid-services {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.grid-services .card {
    flex: 0 1 calc(33.333% - 20px);
}

.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.card:not(.nature-card):hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card h3 { color: var(--primary-color); }
.card:hover h3 { color: var(--secondary-color); }

.card-img {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.card-img img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.card:hover .card-img { border-color: var(--secondary-color); }
.card:hover .card-img img { transform: scale(1.1); }

.about {
    position: relative;
    padding: 80px 0;
    background-color: var(--bg-section);
    z-index: 0;
}
.about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("assets/hero/Banddeau aqaurelle v2.webp");
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: -1;
}
[data-theme="dark"] {
    .about::before {
        filter: brightness(0.8) grayscale(0.9);
    }
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: auto;

}

.quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-quote);
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin-bottom: 30px;
}

.quote span {
    font-weight: bold;
    font-size: 1rem;
}

.testimonials {
    padding: 80px 0;
    background-color: var(--bg-testimonials);
    color: var(--pure-white);
}

.testimonials .section-title { color: var(--pure-white); }
.testimonials .section-title::after { background-color: var(--pure-white); }

.grid-testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.grid-testimonials .testimonial-card {
    flex: 0 1 calc(33.333% - 20px);
}

.testimonial-card {
    background: var(--bg-testimonial-card);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.testimonial-card h3 {
    margin-top: 20px;
    color: var(--secondary-color);
}

.linkedin-section {
    padding: 80px 0;
    background-color: var(--bg-section);
    text-align: center;
}

.linkedin-feed {
    max-width: 800px;
    margin: 40px auto 0;
}

.testimonial-card span {
    font-size: 0.9rem;
    color: var(--pure-white);
}

.contact {
    padding: 40px 0 80px;
    background-color: var(--bg-main);
    scroll-margin-top: -40px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-main), sans-serif;
    background-color: var(--bg-input);
    color: var(--text-color);
    font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-quote);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--input-focus-border);
    box-shadow: var(--input-focus-shadow);
    outline: none;
}

.contact-form select:invalid { color: var(--text-quote); }
.contact-form button { width: 100%; font-size: 1.1rem; cursor: pointer; }

.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-feedback {
    margin-top: -8px;
    margin-bottom: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 0.95rem;
    display: none;
}

.form-feedback:empty {
    display: none;
}

.form-feedback:not(:empty) {
    display: block;
}

.form-feedback--success {
    background-color: color-mix(in srgb, var(--primary-color) 15%, transparent);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
}

.form-feedback--error {
    background-color: rgba(211, 47, 47, 0.1);
    border: 1px solid #d32f2f;
    color: var(--text-color);
}

altcha-widget {
    --altcha-border-radius: 5px;
    --altcha-border-width: 1px;
    --altcha-border-color: var(--border-color);
    --altcha-color-base: var(--bg-input);
    --altcha-color-base-content: var(--text-color);
    --altcha-color-primary: var(--primary-color);
    --altcha-color-primary-content: var(--pure-white);
    --altcha-input-background-color: var(--bg-input);
    --altcha-input-color: var(--text-color);
    --altcha-checkbox-border-color: var(--border-color);
    --altcha-spinner-color: var(--primary-color);
    display: block;
    margin-bottom: 20px;
    font-family: var(--font-main), sans-serif;
    font-size: 0.9rem;
    max-width: 100%;
}

.map-section {
    background-color: var(--bg-main);
    padding: 50px 0;
    width: 100%;
}

#map {
    height: 50vh;
    width: 50vw;
    margin: 0 auto;
    border-radius: 5px;
}

.popup-title { font-weight: bold; font-size: 16px; }

/* ==========================================================================
   BOUTON GÉOLOCALISATION (Carte Leaflet)
   ========================================================================== */

.map-section {
    background-color: var(--bg-main);
    padding: 50px 0;
    width: 100%;
    height: 800px;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#btn-geoloc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--base-green-primary);
    color: #ffffff;
    font-family: var(--font-main), sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 25px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 30px;
    z-index: 1;
}

#btn-geoloc:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--pure-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

#btn-geoloc:active {
    transform: translateY(1px);
}


/* ==========================================================================
   7. PAGES DE SERVICES DÉTAILLÉS (elagage, expertise, etc.)
   ========================================================================== */

/* ==========================================================================
   HERO VIDEO BACKGROUND
   ========================================================================== */

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 100vw;
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.77vh;

    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--hero-overlay);
    z-index: 1;
}

/* ==========================================================================
   HERO PLEIN ÉCRAN (vidéo/image locale)
   ========================================================================== */

.service-hero.hero-fullscreen {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.service-hero.hero-fullscreen .hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    transform: none;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.service-hero.hero-fullscreen .hero-overlay {
    background: radial-gradient(
            ellipse at center,
            rgba(0, 0, 0, 0.28) 0%,
            rgba(0, 0, 0, 0.14) 45%,
            rgba(0, 0, 0, 0.05) 75%,
            rgba(0, 0, 0, 0) 100%
    );
}

#heroImage + .hero-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.service-hero.hero-fullscreen .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--pure-white);
    padding: 0 20px;
}

.service-hero.hero-fullscreen .hero-content h1 {
    color: var(--pure-white);
    font-size: clamp(1.6rem, 4vw + 1rem, 3.4rem);
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 15px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.service-hero.hero-fullscreen .hero-content p {
    font-size: clamp(0.9rem, 1vw + 0.7rem, 1.15rem);
    max-width: 620px;
    margin: 0 auto 30px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.5);
}

.service-hero.hero-fullscreen .hero-content .btn-primary {
    opacity: 0.8;
    transition: opacity 0.3s ease, background 0.3s;
}

.service-hero.hero-fullscreen .hero-content .btn-primary:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease, background 0.3s;}

.scroll-indicator {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.scroll-arrow {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--pure-white);
    border-bottom: 2px solid var(--pure-white);
    transform: rotate(45deg);
    animation: scrollArrow 1.6s infinite;
}

@keyframes scrollArrow {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

body.has-fullscreen-hero header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   STYLES DES PAGES SERVICES
   ========================================================================== */
.service-page { background-color: var(--bg-section); }

.service-hero {
    padding: 120px 0 60px;
    text-align: center;
    color: var(--pure-white);
    background-color: var(--hero-overlay);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}

.service-hero h1 {
    color: var(--pure-white);
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.service-details {
    padding: 80px 0;
    background-color: var(--bg-section);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.benefits-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;

}

.benefits-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 35px;
    font-weight: 600;

}

.benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.service-media img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
}



.service-cta {
    background-color: var(--bg-main);
    text-align: center;
    padding: 60px 0;
    border-top: 1px solid var(--border-subtle);
}

.service-cta h2 { margin-bottom: 15px; }
.service-cta p { margin-bottom: 30px; }


/* ==========================================================================
   8. PAGES LÉGALES (Mentions, CGU...)
   ========================================================================== */
.legal-page {
    padding: 80px 0;
    background-color: var(--bg-section);
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-legal-box);
    padding: 50px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.legal-container h1 {
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    font-size: 2.2rem;
}

.legal-container h2 {
    font-size: 1.4rem;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    display: inline-block;
}

.legal-container p, .legal-container ul {
    margin-bottom: 15px;
    line-height: 1.7;
}

.legal-container ul { padding-left: 20px; }
.legal-container li { margin-bottom: 8px; }
.legal-container a { color: var(--primary-color); font-weight: 600; }

/* ==========================================================================
   PAGE 404
   ========================================================================== */
.error-page {
    padding: 60px 0 120px;
    background-color: var(--bg-main);
    text-align: center;
}

.error-image-large {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    margin: 0 auto 40px auto;
    display: block;
}

.error-text {
    max-width: 800px;
    margin: 0 auto;
}

.error-text h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-text p {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 30px;
}

/* ==========================================================================
   9. TRANSITIONS GLOBALES & RESPONSIVE
   ========================================================================== */


.card:not(.nature-card), .card-img, .card-img img, .contact-form input,
.contact-form select, .contact-form textarea, nav a {
    transition:
            border-color 0.35s ease,
            box-shadow 0.35s ease,
            transform 0.4s ease;
}

.card h3, footer a {
    transition: color 0.3s ease;
}




@media (max-width: 1000px) {

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

    header {
        z-index: 1001;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .header-container {
        flex-direction: column;
        gap: 8px;
    }

    .logo img {
        max-height: 45px;
        width: auto;
        display: block;
    }

    nav {
        width: 100%;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        font-size: 0.78rem;
        margin: 0;
    }

    .search-bar {
        width: 100%;
        max-width: 300px;
        height: 35px;
    }

    .search-bar input {
        width: 100%;
        padding: 6px 10px;
    }

    .theme-toggle span.label { display: none; }

    .theme-toggle {
        padding: 6px;
        border-radius: 50%;
    }

    .devis {
        padding: 5px 8px;
    }

    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .services, .about, .testimonials, .linkedin-section, .contact, .service-details, .legal-page {
        padding: 50px 0;
    }

    #map {
        width: 90vw;
        height: 60vh;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-hero { padding: 80px 0 40px; }
    .service-hero h1 { font-size: 2rem; }

    .service-media { grid-row: 1; }

    .grid-services .card,
    .grid-testimonials .testimonial-card,
    .grid-nature-cards .nature-card {
        flex-basis: 100%;
    }

}
@media screen and (max-width: 1000px) and (pointer: coarse) and (orientation: landscape) {
    .header-container {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 20px;
    }

    .logo {
        margin-left: 15px;
        flex-shrink: 0;
    }

    .logo img {
        max-height: 40px;
        width: auto;
    }

    nav {
        flex-grow: 1;
        display: flex;
        justify-content: center;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 15px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    nav ul li {
        white-space: nowrap;
    }

    .search-wrapper {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 15px;
        flex-shrink: 0;
    }

    .search-bar {
        display: flex;
        max-width: 200px;
    }

    .scroll-indicator {
        display: none;
    }

    .grid-nature-cards .nature-card {
        flex: 0 1 300px;
        max-width: 500px;
        min-width: 0;
        margin: 0 auto;
    }
}
@media screen and (max-width: 1000px) and (orientation: portrait) {
    .service-hero.hero-fullscreen {
        height: auto;
        min-height: 420px;
        aspect-ratio: 16 / 9;
    }

    .service-hero.hero-fullscreen .hero-video-bg {
        object-fit: cover;
        object-position: center center;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==========================================================================
   STYLE SPÉCIFIQUE : PAGE ÉLAGAGE (Ambiance Nature)
   ========================================================================== */
.nature-section {
    position: relative;
    background: linear-gradient(to bottom, var(--bg-section), var(--bg-main));
}

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
}

.intro-text h2 {
    color: var(--primary-color);
    font-size: clamp(1.6rem, 5vw + 0.5rem, 2.5rem);
    line-height: 1.25;
}

.intro-text p {
    font-size: clamp(0.95rem, 1.2vw + 0.7rem, 1.1rem);
    color: var(--text-color);
}

.grid-nature-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

.grid-nature-cards .nature-card {
    flex: 0 1 calc(33.333% - 20px);
    min-width: 300px;
}

.nature-card {
    border-top: 4px solid var(--primary-color);
    transition: border-top-color 0.4s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.nature-card:hover {
    border-top-color: var(--secondary-color);
}

.nature-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
    transition: opacity 0.5s ease;
    opacity: 0;
    background-repeat: no-repeat;
    z-index: 4;
}

.card-elagage::after {
    left: 0;
    right: 0;
    bottom: 0;
    aspect-ratio: 27 / 26;
    background-size: contain;
    background-position: bottom center;

    background-image: url('assets/filigranes/filigrane-drone-elagage-light.svg');

}

[data-theme="dark"] .card-elagage::after {
    background-image: url('assets/filigranes/filigrane-drone-elagage-dark.svg');
    bottom: 1%;
}

.card-gestion::after {
    width: 25rem;
    height: 15rem;
    bottom: 0;
    right: -2%;
    background-image: url('assets/filigranes/filigrane-gestion-light.svg');
    background-size: contain;
    background-position: center;
}

[data-theme="dark"] .card-gestion::after {
    background-image: url('assets/filigranes/filigrane-gestion-dark.svg');
}

.card-expertise::after {
    width: 15rem;
    height: 15rem;
    bottom: -2%;
    right: -5%;
    background-image: url("assets/filigranes/filigrane-expertise-light.svg");
    background-size: contain;
    background-position: center;
}

[data-theme="dark"] .card-expertise::after {
    bottom: -2%;
    right: -5%;
    transform: rotate(-15deg);

    background-image: url("assets/filigranes/filigrane-expertise-dark.svg");
}
.card-env::after {
    width: 25rem;
    height: 15rem;
    bottom: 0;
    right: -2%;
    background-image: url('assets/filigranes/filigrane-gestion-light.svg');
    background-size: contain;
    background-position: center;
}

[data-theme="dark"] .card-env::after {
    /*bottom: 2%;*/
    /*right: -5%;*/

    background-image: url("assets/filigranes/filigrane-gestion-dark.svg");
}

.card-photo::after {
    width: 30rem;
    height: 15rem;
    bottom: 0;
    right: 0;
    background-image: url('assets/filigranes/filigrane-photogrammetrie-light.svg');
    background-size: contain;
    background-position: top right;
}

[data-theme="dark"] .card-photo::after {
    background-image: url('assets/filigranes/filigrane-photogrammetrie-dark.svg');
}

.card-projet::after {
    left: 0;
    right: 0;
    bottom: 0;
    aspect-ratio: 27 / 26;
    background-image: url('assets/filigranes/filigrane-projet-light.svg');
    background-size: contain;
    background-position: bottom center;

}

[data-theme="dark"] .card-projet::after {
    background-image: url('assets/filigranes/filigrane-projet-dark.svg');
}

.nature-card:hover::after {
    opacity: 0.3;
}



.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.icon-nature {
    width: 4rem;
    height: 4rem;
    min-width: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--dropdown-hover-bg);
    border-radius: 35%;
    color: var(--primary-color);
    box-sizing: border-box;
}

.nature-card h3 {
    margin-bottom: 0;
    font-size: 1.3rem;
}

.nature-card p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.benefits-list.custom-leaf li::before {
    content: '🌿';
    font-size: 1rem;
    top: 2px;
}

.nature-card:has(.card-visual) {
    padding: 0;
}

.card-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 27 / 52;
    overflow: hidden;
    container-type: size;
    container-name: card-visual;
    border-radius: inherit;

    --text-zone-h: 46cqh;
    --text-fade-overlap: 6cqh;

    background-color: rgba(46, 125, 50, 0.12);
    background-color: color-mix(in srgb, var(--primary-color) 12%, var(--bg-card));
}


.card-visual::before {
    content: '';
    position: absolute;
    inset: -22cqh;
    z-index: 0;
    background:
            linear-gradient(color-mix(in srgb, var(--bg-card) 25%, transparent), color-mix(in srgb, var(--bg-card) 25%, transparent)),
            var(--card-visual-img, url('assets/cards-images/Card_drone_2.webp')) center / cover;
    transform: scaleY(-1);
}



.card-image-zone {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--text-zone-h);
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;

}

.card-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
    transition: transform 0.6s ease;

}



.card-visual-text {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 100cqw;
    z-index: 3;
    display: flex;
    flex-direction: column;

    background: linear-gradient(
            to bottom,
            color-mix(in srgb, var(--bg-card) 95%, transparent 5%) 0%,
            color-mix(in srgb, var(--bg-card) 88%, transparent 12%) 70%,
            color-mix(in srgb, var(--bg-card) 0%, transparent 100%) 100%
    );

    -webkit-backdrop-filter: blur(clamp(6px, 1.8cqh, 16px)) saturate(160%);
    backdrop-filter: blur(clamp(6px, 1.8cqh, 16px)) saturate(160%);
    transition: backdrop-filter 0.5s ease, bottom 0.5s ease 0.15s;
    font-size: clamp(0.78rem, 2.3cqh, 1rem);

}

.card-summary {
    height: var(--text-zone-h);
    flex-shrink: 0;
    padding: 5.8cqh 5.8cqh 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.nature-card:hover .card-visual-text {
    bottom: 0;
    box-shadow: inset 0 -1px 0 transparent;
}

.card-visual-text .card-header {
    margin-bottom: 0.9em;
}

.card-visual-text .icon-nature {
    font-size: 1.7em;
    padding: 0.5em;
}

.nature-card .card-visual-text h3 {
    font-size: 5cqw;
    margin-bottom: 0.5em;
}

.nature-card .card-visual-text p {
    font-size: 3.5cqw;
    margin-bottom: 0;
    line-height: 1.5;
}


.card-visual-text .benefits-list {
    max-height: 0;
    margin-top: 0;
    padding: 0 5.8cqh 5cqh;
    opacity: 0;
    overflow: hidden;
    font-size: 3.2cqw;
    transition: opacity 0.25s ease, max-height 0.4s ease 0.1s, margin-top 0.4s ease 0.1s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    top: auto;
    bottom: auto;
}

.card-visual-text .benefits-list li {
    margin-bottom: 0.7em;
    padding-left: 2em;
}

.card-visual-text .benefits-list li::before {
    font-size: 1em;
    top: 0.15em;
}

.nature-card:hover .card-visual-text .benefits-list {
    max-height: 75cqh;
    margin-top: 1.2em;
    opacity: 1;
    transition: max-height 0.5s ease, margin-top 0.5s ease, opacity 0.4s ease 0.15s;
}


@media (prefers-reduced-motion: reduce) {
    .card-media,
    .card-visual-text,
    .card-visual-text .benefits-list {
        transition: opacity 0.2s ease;
    }
}
@media (hover: none) {

    .card,
    .nature-card,
    .card * {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    .card:hover,
    .card:active,
    .nature-card:hover,
    .nature-card:active {
        transform: none !important;
        box-shadow: var(--shadow-md) !important;
        border-top-color: var(--primary-color) !important;
    }

    .card:hover h3,
    .card:active h3,
    .card:hover .card-img,
    .card:active .card-img {
        color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
    }

    .card:hover .card-img img,
    .card:active .card-img img {
        transform: none !important;
    }

    .card-visual::before {
        content: '';
        display: block !important;
        position: absolute;
        inset: -22cqh;
        z-index: 0;
        background:
                linear-gradient(color-mix(in srgb, var(--bg-card) 20%, transparent), color-mix(in srgb, var(--bg-card) 20%, transparent)),
                var(--card-visual-img) center / cover;
        transform: scaleY(-1);
        pointer-events: none;
    }

    .nature-card {
        --clip-bottom: 0px;
        --clip-ratio: 0;
    }

    .card-visual-text {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: var(--clip-bottom, 100cqw);
        z-index: 2;
        display: flex;
        flex-direction: column;

        background: linear-gradient(
                to bottom,
                color-mix(in srgb, var(--bg-card) 95%, transparent 5%) 0%,
                color-mix(in srgb, var(--bg-card) 88%, transparent 12%) 70%,
                color-mix(in srgb, var(--bg-card) 0%, transparent 100%) 100%
        );

        -webkit-backdrop-filter: blur(clamp(6px, 1.8cqh, 16px)) saturate(160%);
        backdrop-filter: blur(clamp(6px, 1.8cqh, 16px)) saturate(160%);

        transition: backdrop-filter 0.5s ease;
        font-size: clamp(0.78rem, 2.3cqh, 1rem);
    }


    .card-visual-text::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        transform-origin: bottom;
        transform: scaleY(var(--clip-ratio, 0));

        background: linear-gradient(
                to top,
                color-mix(in srgb, var(--bg-card) 70%, transparent 30%) 0%,
                color-mix(in srgb, var(--bg-card) 45%, transparent 55%) 70%,
                transparent 100%
        );
    }

    .card-visual-text > * {
        position: relative;
        z-index: 2;
    }

    .card-visual-text .benefits-list {
        max-height: none;
        margin-top: 1.2em;
        opacity: var(--clip-ratio, 0);
        transition: none !important;
    }

    .nature-card,
    .card-visual,
    .card-visual *,
    .card-visual::before,
    .card-visual-text {
        pointer-events: none !important;
        touch-action: pan-y !important;
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
    }

    .nature-card::after,
    .nature-card:hover::after,
    .nature-card:active::after {
        opacity: 0 !important;
        transition: opacity 0.4s ease;
    }

    .nature-card.is-unfolded::after,
    .nature-card.is-unfolded:hover::after,
    .nature-card.is-unfolded:active::after {
        opacity: 0.3 !important;
    }
}
@supports not (container-type: size) {
    .card-visual {
        --text-zone-h: 225px;
    }

    .card-visual-text {
        font-size: 3.5cqw;
    }
}

.hero, .service-hero {
    background-blend-mode: normal;
}

@media (hover: hover) {
    .nature-card:hover {
        border-top-color: var(--secondary-color);
    }

    .card:not(.nature-card):hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-hover);
    }

    .card:hover .card-img {
        border-color: var(--secondary-color);
    }
}
/* ==========================================================================
   10. DISTINCTIONS & PARTENAIRES
   ========================================================================== */

#distinctions .distinctions-intro {
    text-align: center;
    max-width: 700px;
    margin: -20px auto 60px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

#distinctions .distinctions-subtitle {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 35px;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 780px;
    margin: 0 auto 80px;
}

.award-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.award-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

.award-media {
    position: relative;
    height: 90px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}

.award-media img {
    max-height: 80px;
    max-width: min(200px, 100%);
    width: auto;
    height: auto;
    object-fit: contain;
}

.award-logo {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.award-reveal {
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
    transform: translateY(12px) scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.award-card--reveal:hover .award-logo {
    opacity: 0;
    transform: translateY(-12px);
}

.award-card--reveal:hover .award-reveal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.award-card h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pure-white);
    margin-bottom: 10px;
    line-height: 1.4;
}

.award-card p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    max-width: 1020px;
    margin: 0 auto;
}

.partner-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    flex: 1 1 260px;
    max-width: 300px;
    min-width: 240px;
    height: 240px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.partner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 255, 255, 0.3);
}

.partner-media {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.partner-media img {
    height: auto;
    max-height: 100px;
    width: auto;
    max-width: min(240px, 100%);
    object-fit: contain;
    padding: 5%;
}

.partner-media-main {
    height: auto;
    max-height: 46px;
}

.partner-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.partner-badges img {
    height: auto;
    max-height: 70px;
    width: auto;
    max-width: 100%;
    padding: 1%;
}

.partner-card span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

@media (max-width: 768px) {
    #distinctions .distinctions-intro {
        margin-top: 0;
    }

    .partners-grid {
        gap: 18px;
    }

    .partner-card {
        min-width: 220px;
        height: 220px;
        padding: 18px;
    }

    .partner-media img {
        max-height: 80px;
    }

    .partner-badges img {
        max-height: 56px;
    }

    .award-media img {
        max-height: 64px;
    }
}