/* Variables de couleur cohérentes avec la charte graphique */
/* Variables are now expected to be defined globally (e.g., in main.css) */
/* :root {
    --primary: #37726E;        
    --primary-dark: #2a5f5c;   
    --primary-light: #7EC7A8;  
    --accent: #F2FC32;         
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e8f4f2;     
    --text-dark: #333333;

    
    --transition-fast: 0.3s ease; 
    --transition-medium: 0.5s ease;
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ===== SECTION HERO ===== */

.hero-section,
.services-hero { /* Added .services-hero */
    position: relative; /* Needed for absolute positioning of children */
    z-index: 500; /* Ensure the section itself is above default flow */
    background-color: var(--primary-color, #37726E); /* Added fallback background */
    height: 100vh; /* Full viewport height for desktop */
    width: 100%;
    /* overflow: hidden; */ /* Temporarily remove to check layout issues */
    display: flex; /* Use flexbox to center content vertically */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
    color: var(--white-color); /* Use main.css variable */
}

/* Adjust height for front page */
/* Use the specific template body class for the main French homepage */
body.home #hero.hero-section,
body.front-page #hero.hero-section {
    height: 100vh !important; /* Full viewport height for homepage */
    min-height: 0 !important; /* Override min-height from home-optimized.css */
}

/* Adjust height for other pages */
/* Target body *without* the specific template class */
body:not(.home) .hero-section, 
body:not(.front-page) .hero-section, 
body .services-hero { /* Added body .services-hero */
    height: calc(60vh - 90px); /* Smaller height for inner pages */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind all other layers */
    /* Add placeholder gradient */
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); /* Use main.css variables */
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Above background div, below overlay */
}

.hero-bg-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Below video */
    display: none; /* Hidden by default, shown via JS if video fails */
}

.hero-bg-fallback img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Show fallback if video fails (JS will add .error class or similar) */
/* .hero-bg-video.error ~ .hero-bg-fallback { display: block; } */
/* Or rely on JS to directly manipulate display */


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 2; /* Above video and fallback */
}

.hero-content-wrapper {
    position: relative; /* To stack above background/overlay */
    z-index: 1001; /* Ensure it's above the fixed header (z-index: 1000) */
    width: 100%;
    max-width: 1200px; /* Match container width */
    padding: 140px 15px 2rem 15px; /* Increased top padding for breathing space below header */
    text-align: center; /* Center content */
}

.hero-content {
    max-width: 1000px; /* Increased Max width for text content */
    margin: 0 auto; /* Center the content block */
    /* opacity: 0; */ /* REMOVED For fade-in */
    /* transform: translateY(20px); */ /* REMOVED */
    /* transition: opacity 0.8s ease, transform 0.8s ease; */ /* REMOVED */
    /* Ensure layout */
    display: block;
    width: 100%;
    /* min-height: 100px; */ /* Removed min-height */
}

.hero-content.fade-in {
    opacity: 1; 
    transform: translateY(0); 
}

/* Initial state for hero content children */
.hero-content > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    /* Add a small delay between children */
    transition-delay: 0.1s; /* Adjust as needed */
}

/* Make children visible when parent fades in */
.hero-content.fade-in > * {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the delay for children for a nicer effect (optional) */
.hero-content.fade-in > *:nth-child(1) { transition-delay: 0.1s; }
.hero-content.fade-in > *:nth-child(2) { transition-delay: 0.2s; }
.hero-content.fade-in > *:nth-child(3) { transition-delay: 0.3s; }
.hero-content.fade-in > *:nth-child(4) { transition-delay: 0.4s; }
.hero-content.fade-in > *:nth-child(5) { transition-delay: 0.5s; }
/* Add more if needed */

/* Override initial hidden state for inner page hero content (including .services-hero and standard .hero-section when not on front page) */
body:not(.skitterskoon-front-page) .hero-section .hero-content, /* Added standard hero section */
section.services-hero div.hero-content { /* Kept existing rule */
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    display: block !important;
    visibility: visible !important;
}
body:not(.skitterskoon-front-page) .hero-section .hero-content > *, /* Added standard hero section children */
section.services-hero div.hero-content h1.hero-title,
section.services-hero div.hero-content p.hero-subtitle,
section.services-hero div.hero-content div > a.btn { /* Kept existing rule */
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    /* display: block !important; */ /* Removed display block to allow natural flow (inline-block for button) */
    visibility: visible !important;
    color: var(--white-color, #ffffff) !important; /* Force text color */
}
/* Make services hero title yellow (Keep specific to .services-hero if needed, or apply more broadly) */
/* If standard inner page heroes should also have yellow title, add: body:not(.skitterskoon-front-page) .hero-section .hero-content h1.hero-title */
section.services-hero div.hero-content h1.hero-title {
    color: var(--accent-color, #F2FC32) !important; /* Force title color to accent */
}
/* Ensure the div containing the button is also visible */
body:not(.skitterskoon-front-page) .hero-section .hero-content div, /* Added standard hero section div */
section.services-hero div.hero-content div { /* Kept existing rule */
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    /* display: block !important; */ /* Removed display block */
    visibility: visible !important;
}


/* Eyebrow label */
.hero-eyebrow {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    color: var(--accent-color); /* Use main.css variable */
}

.hero-stars {
    display: inline-block;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-top: 0.25rem;
}

/* Title, Subtitle, Buttons etc. */
.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--white-color); /* Use main.css variable */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 4rem;
}

.hero-title-accent {
    color: var(--accent-color, #F2FC32) !important; /* Use main.css variable with fallback */
    font-weight: 900;
}
.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 90%;
}
.hero-description {
    font-size: 1.15rem;
    line-height: 1.6;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 90%;
}

/* Button Styles */
.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

/* Base .btn styles removed - Inherited from main.css */

/* Specific styles for .btn-primary within the hero */
.hero-cta-group .btn-primary {
    /* background-color: var(--primary-color); */ /* Inherited */
    /* color: var(--white-color); */ /* Inherited */
    /* border-color: var(--primary-color); */ /* Inherited */
    box-shadow: var(--shadow-soft);
    border-radius: 50px;
    padding: 1.25rem 2.5rem; /* Override padding */
    font-size: 1.2rem; /* Override font-size */
    font-weight: 700; /* Override font-weight */
    text-transform: uppercase; /* Add text-transform */
    letter-spacing: 1px; /* Add letter-spacing */
}

.hero-cta-group .btn-primary:hover {
    /* background-color: var(--primary-dark); */ /* Inherited hover state might need adjustment if main.css hover is different */
    /* color: var(--white-color); */ /* Inherited */
    /* border-color: var(--primary-dark); */ /* Inherited */
    transform: translateY(-3px); /* Keep transform */
    box-shadow: var(--shadow-medium); /* Keep shadow */
}

.hero-cta-group .btn-primary i { 
    margin-left: 10px; 
    transition: transform 0.3s ease; 
}

.hero-cta-group .btn-primary:hover i { 
    transform: translateX(5px); 
}

/* Base .btn-outline styles removed - Inherited from main.css */
/* Specific styles for .btn-outline within the hero */
.hero-cta-group .btn-outline {
    background-color: transparent;
    color: var(--white-color); 
    border-color: var(--white-color); 
}

.hero-cta-group .btn-outline:hover {
    background-color: var(--white-color); 
    color: var(--primary-dark); 
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}


/* Hero Features */
.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    position: relative; /* Needed for z-index */
    z-index: 5; /* Ensure features are below scroll indicator */
}

.hero-feature-item {
    display: flex;
    align-items: center;
    color: var(--white-color); /* Use main.css variable */
}

.feature-icon {
    margin-right: 0.5rem;
    color: var(--accent-color); /* Use main.css variable */
    font-size: 1.25rem;
}

.hero-feature-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Explicitly higher z-index */
    color: var(--white-color); /* Use main.css variable */
}
.scroll-indicator:hover { opacity: 1; }
.scroll-text { font-size: 0.85rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; color: var(--white-color); } /* Use main.css variable */
.scroll-arrow { font-size: 1.2rem; animation: float 2s infinite; color: var(--white-color); } /* Use main.css variable */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title { font-size: 3rem; }
}
@media (max-width: 1200px) {
    .hero-title { font-size: 3.25rem; }
}
/* ===== TABLET BREAKPOINT (768px - 1023px) ===== */
@media (max-width: 1023px) and (min-width: 768px) {
    /* Hero section - allow scrolling on tablets */
    .hero-section,
    #hero.hero-section,
    body.home #hero.hero-section,
    body.front-page #hero.hero-section {
        height: auto !important;
        min-height: 60vh !important;
        max-height: none !important;
        padding: 100px 30px 60px 30px !important;
        display: block !important;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-content-wrapper {
        padding: 120px 30px 2rem 30px; /* Increased top padding for tablet */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #hero .form-container {
        max-width: 600px;
        padding: 25px;
        margin: 30px auto;
    }

    #hero .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    #hero .form-control,
    #hero .form-select {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* CRITICAL: Ensure content sections are visible on tablets */
    #content,
    .site-content,
    #primary,
    .content-area,
    #main,
    .site-main,
    .advantages-section,
    .commercial-services-section,
    .contact-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        height: auto !important;
        min-height: 0 !important;
    }
}

/* ===== MOBILE BREAKPOINT (All mobile devices up to 767px) ===== */
@media (max-width: 767px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Hero section - allow scrolling */
    .hero-section,
    #hero.hero-section,
    body.home #hero.hero-section,
    body.front-page #hero.hero-section {
        height: auto !important;
        min-height: 0 !important;
        padding: 80px 10px 40px 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-content-wrapper {
        padding: 100px 10px 0 10px !important; /* Increased top padding for mobile */
        text-align: center;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .hero-content {
        margin-bottom: 2rem;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }

    /* Hero eyebrow */
    .hero-eyebrow {
        font-size: 0.7rem !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
    }

    /* Hero text - prevent overflow */
    .hero-title {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .hero-title-accent {
        font-size: 1.5rem !important;
        word-wrap: break-word !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        word-wrap: break-word !important;
    }

    .hero-description {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
    }

    /* Container - ensure proper width */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    /* Form container - constrained properly */
    #hero .form-container {
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
        padding: 20px 15px !important;
        margin: 20px 10px !important;
        box-sizing: border-box !important;
    }

    /* Form rows - stack vertically */
    #hero .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    /* Form group */
    #hero .form-group {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Form inputs - full width */
    #hero .form-control,
    #hero .form-select,
    #hero input[type="text"],
    #hero input[type="email"],
    #hero input[type="tel"],
    #hero select {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    /* Submit button */
    #hero .btn-submit {
        width: 100% !important;
        padding: 15px !important;
        font-size: 16px !important;
    }

    /* Hero features */
    .hero-features {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* Hide scroll indicator */
    .scroll-indicator {
        display: none !important;
    }
}

/* ===== SMALL MOBILE (iPhone SE, small Android) ===== */
@media (max-width: 390px) {
    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-description {
        font-size: 0.9rem !important;
    }

    #hero .form-container {
        padding: 15px !important;
    }
}

/* ===== Hero Booking Form - New Styles ===== */

/* Using classes from the provided HTML structure */
#hero .form-container { /* Replaces #hero .hero-booking-form */
    background-color: var(--white-color); /* Use main.css variable */
    border-radius: 8px; /* Use new radius */
    padding: 30px;
    width: 100%;
    max-width: 900px; /* Use new max-width */
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Use new shadow */
    margin: 2rem auto; /* Keep centering */
    z-index: 5;
}

#hero .form-container:before { /* Add pseudo-element */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background-color: var(--accent-color); /* Use theme accent color */
}

#hero .form-title {
    margin-bottom: 25px;
    color: var(--dark-color); /* Use theme dark color */
    font-size: 22px;
    font-weight: 600;
    text-align: left; /* Align title left */
}

#hero .form-row {
    display: grid;
    grid-template-columns: 1fr; /* CHANGED: Single column by default for mobile */
    gap: 15px;
    margin-bottom: 20px;
}

/* Only use multiple columns on large desktop screens */
@media (min-width: 1200px) {
    #hero .form-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

#hero .form-group {
    position: relative;
    margin-top: 10px; /* Add margin for label */
}

#hero .form-group label {
    position: absolute;
    top: -10px;
    left: 15px;
    background-color: var(--white-color); /* Use theme white */
    padding: 0 5px;
    font-size: 12px;
    color: var(--dark-color); /* Use theme dark color */
    font-weight: 500;
}

#hero .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px; /* Use new radius */
    font-size: 14px;
    transition: all 0.3s ease; /* Use theme transition */
    box-sizing: border-box;
}

#hero .form-control:focus {
    border-color: var(--secondary-color); /* Use theme secondary color */
    box-shadow: 0 0 0 3px rgba(126, 199, 168, 0.2); /* Use theme secondary color with alpha */
    outline: none;
}

#hero .form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

#hero .consent-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 10px;
}

#hero .consent-checkbox {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-color); /* Use theme secondary color */
}

#hero .consent-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    text-align: left; /* Align text left */
}

#hero .btn-submit { /* Styles the submit button */
    background-color: var(--accent-color); /* Use theme accent color */
    color: var(--dark-color); /* Use theme dark color */
    font-weight: 600;
    border: none;
    border-radius: 8px; /* Use new radius */
    padding: 16px 24px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease; /* Use theme transition */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#hero .btn-submit:hover {
    background-color: #e0ea20; /* Darker shade of theme accent */
    transform: translateY(-2px);
}

#hero .btn-submit svg {
    margin-left: 8px;
}

/* Keep existing success message styling */
#hero .form-success-message {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--primary-color); /* Use theme primary color */
    background-color: #e8f4f2; /* Light background */
    border-radius: 6px; /* Match form container */
}

#hero .hero-booking-form .form-success-message i {
    font-size: 2.5rem;
    color: var(--primary); /* Use the homepage primary green */
    margin-bottom: 1rem;
    display: block;
}

#hero .hero-booking-form .form-success-message h3 {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary); /* Darker heading color */
}

#hero .hero-booking-form .form-success-message p {
    font-size: 1rem;
    color: var(--text-light); /* Lighter text color */
    margin-bottom: 0;
}
