/* =========================================
   GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #275efe;
    --secondary-color: #ff7a3d;
    --primary-dark: #204bbb;
    --secondary-dark: #e96a34;
    --background-color: #f4f6fa;
    --card-bg: #ffffff;
    --shadow: 0 8px 20px rgba(0,0,0,0.1);
    --hover-shadow: 0 15px 30px rgba(0,0,0,0.2);
    --radius: 20px;
    --max-width: 1300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- CORRECTION BUG REBOND / SCROLL MOBILE --- */
html {
    width: 100%;
    /* On enlève overflow sur html pour éviter le blocage */
}

body {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    background: var(--background-color);
    color: #333;
    line-height: 1.6;
    /* Gestion propre du scroll */
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    /* STOPPE L'EFFET ELASTIQUE (REBOND) */
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: var(--primary-color);
}

.logo-wrapper {
    padding: 0.3rem 0.8rem;
    display: inline-flex;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

    nav a {
        position: relative;
        font-size: 1rem;
        font-weight: 500;
        padding-bottom: 4px;
        color: var(--primary-color);
        transition: 0.3s;
    }

        nav a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -2px;
            width: 0;
            height: 2px;
            background: var(--secondary-color);
            transition: width 0.3s;
        }

        nav a:hover::after {
            width: 100%;
        }

        nav a:hover {
            color: var(--secondary-color);
            transform: translateY(-2px);
        }

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 28px;
    border-radius: 20px;
    background: var(--primary-color);
    box-shadow: var(--shadow);
    transition: 0.3s;
}

    .lang-flag img {
        width: 24px;
        height: 18px;
        border-radius: 3px;
    }

    .lang-flag:hover {
        transform: translateY(-2px);
        background: var(--primary-dark);
    }

.hamburger-menu {
    display: none;
}

.mobile-lang {
    display: none;
}

.desktop-only {
    display: flex;
}

/* --- STYLE DU LOGO MAISON --- */
.header-logo {
    height: 120px; /* On garde la même taille */
    width: auto;
    /* 1. RAPPROCHER DU TITRE */
    /* J'ai réduit la marge de 20px à 8px pour qu'il soit plus près */
    margin-right: 3px;
    /* 2. DESCENDRE LE LOGO */
    /* J'ajoute 10px de marge en haut pour le pousser vers le bas */
    margin-top: 15px;
    display: block;
}

/* Ajustement pour la version Hébreu */
html[dir="rtl"] .header-logo {
    margin-right: 0;
    /* On applique les mêmes changements pour l'hébreu */
    margin-left: 8px;
    margin-top: 10px;
}

/* =========================================
   SECTIONS & HERO
   ========================================= */
section {
    padding: 4rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    margin: 0;
    max-width: none;
}

.hero-carousel, .hero-carousel img, .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

    .hero-carousel img {
        object-fit: cover;
        opacity: 0;
        transition: opacity 1.5s ease;
    }

        .hero-carousel img.active {
            opacity: 1;
        }

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.hero-left-panel {
    flex: 1 1 55%;
    background: rgba(0, 0, 0, 0.55);
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

    .hero-left-panel h1 {
        font-size: 3rem;
        margin-bottom: 1rem;
        line-height: 1.2;
        color: var(--secondary-color);
    }

.hero-intro {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hero-intro-small {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cta {
    padding: 0.8rem 1.8rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

    .cta.primary {
        background: var(--secondary-color);
        color: #fff;
    }

        .cta.primary:hover {
            background: var(--secondary-dark);
            transform: translateY(-3px);
        }

    .cta.secondary {
        background: transparent;
        color: var(--secondary-color);
        border: 2px solid var(--secondary-color);
    }

        .cta.secondary:hover {
            background: var(--secondary-color);
            color: #fff;
            transform: translateY(-3px);
        }

.hero-badges {
    list-style: none;
    font-size: 0.9rem;
}

    .hero-badges li {
        display: flex;
        align-items: center;
        margin-bottom: 0.4rem;
    }

    .hero-badges .badge-icon {
        margin-right: 0.5rem;
        color: var(--secondary-color);
        font-weight: bold;
    }

.hero-chef-panel {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.chef-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

    .chef-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 62% 50%;
    }

.chef-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    max-width: 280px;
}

.chef-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.chef-desc {
    font-size: 0.9rem;
    color: #555;
}

/* =========================================
   GRIDS & CARDS
   ========================================= */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-text, .about-img {
    flex: 1 1 400px;
}

.about-img {
    min-height: 300px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
}

/* --- 4 Colonnes pour Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --- 3 Colonnes pour Projets --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card, .project-card, .testimonial {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .service-card:hover, .project-card:hover, .testimonial:hover {
        transform: translateY(-10px);
        box-shadow: var(--hover-shadow);
    }

    .service-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

.service-body {
    padding: 1rem;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Slider Comparateur */
.project-card {
    display: flex;
    flex-direction: column;
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-after-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.project-before-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    z-index: 2;
}

.label-badge {
    position: absolute;
    top: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 5;
}

.label-before {
    left: 10px;
}

.label-after {
    right: 10px;
}

.project-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: col-resize;
    z-index: 10;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: #fff;
    z-index: 9;
    pointer-events: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.project-info {
    padding: 1rem;
    background: #fff;
    text-align: center;
    border-top: 1px solid #eee;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.project-city {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.testimonial {
    padding: 1.5rem;
}

.testimonial-stars {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: auto;
}

/* --- CONTACT AVEC GRILLE FIXE (ALIGNEMENT PARFAIT) --- */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-info, .contact-form {
    flex: 1 1 300px;
}

    .contact-info h3 {
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

.info-item {
    display: grid;
    grid-template-columns: 40px 1fr; /* Colonne icône fixe + reste pour texte */
    align-items: start;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.icon-box {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.info-item img, .info-item .icon {
    width: 24px;
    height: auto;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.info-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* Formulaire */
.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.3rem;
    }

    .form-group input, .form-group textarea {
        width: 100%;
        padding: 0.8rem;
        border-radius: 10px;
        border: 1px solid #ccc;
        background: #f9f9f9;
    }

/* --- BOUTON ENVOYER (BLEU & ANIMÉ) --- */
form button[type="submit"] {
    display: block;
    width: 100%;
    padding: 12px 0;
    margin-top: 10px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(39, 94, 254, 0.4);
    transition: all 0.3s ease;
}

    form button[type="submit"]:hover {
        background-color: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(39, 94, 254, 0.6);
    }

.btn-loading {
    opacity: 0.8;
    cursor: wait;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1);
    }
}

.fade-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

    .fade-section.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* =========================================
   VERSION MOBILE
   ========================================= */
@media screen and (max-width: 1024px) {
    /* Tablette : 2 colonnes */
    .services-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    /* J'ai supprimé ici le html, body qui causait le conflit */

    /* --- CENTRAGE DU BLOC LOGO + TITRE --- */
    .logo-wrapper {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center; /* Centre verticalement */
        justify-content: center;
        width: max-content;
    }

    /* --- LOGO PLUS PETIT SUR MOBILE --- */
    .header-logo {
        height: 80px; /* Taille réduite pour le mobile (essaie 35px ou 40px) */
        margin-top: 0; /* On enlève le décalage du PC pour que ça reste aligné */
        margin-right: -10px; /* Petit espace entre logo et texte */
        /* Ajustement vertical */
        margin-top: 5px;
        display: block;
    }

    /* Ajustement spécial pour l'Hébreu sur Mobile */
    html[dir="rtl"] .header-logo {
        margin-right: 0;
        margin-left: -10px;
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
    }

        .hamburger-menu span {
            width: 25px;
            height: 3px;
            background-color: var(--primary-color);
            border-radius: 5px;
            transition: 0.3s;
        }

    .desktop-only {
        display: none !important;
    }

    header {
        padding: 0 15px;
    }

    nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s, opacity 0.4s;
        margin-left: 0;
    }

        nav.open {
            max-height: 600px;
            opacity: 1;
            border-top: 1px solid #eee;
            display: flex;
        }

        nav a {
            width: 100%;
            text-align: center;
            padding: 15px 0;
            font-size: 1.1rem;
            border-bottom: 1px solid #f9f9f9;
        }

    .mobile-lang {
        display: block;
        margin-top: 15px;
    }

    .hamburger-menu.toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger-menu.toggle span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero {
        height: auto;
        min-height: 100vh;
        display: block;
        padding-top: 20px;
    }

    .hero-content {
        flex-direction: column;
        padding: 0 15px;
        gap: 40px;
        margin-top: 30px;
    }

    .hero-left-panel {
        text-align: center;
        margin-top: 20px;
        width: 100%;
    }

        .hero-left-panel h1 {
            font-size: 2rem;
        }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-left-panel .cta {
        width: 100%;
        display: block;
    }

    .hero-badges {
        align-items: center;
    }

    .hero-chef-panel {
        margin-bottom: 30px;
    }

    .about-content, .contact-container {
        flex-direction: column;
    }

    .about-img {
        width: 100%;
        height: 250px;
    }

    /* Mobile : 1 colonne */
    .services-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        text-align: center;
    }
    /* Sur mobile, on remet les icones au centre */
    .info-item {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 5px;
    }

    .info-text {
        align-items: center;
    }

    input, textarea, button {
        font-size: 16px;
    }
}

/* =========================================
   SUPPORT RTL SPECIFIQUE (HEBREU)
   ========================================= */
html[dir="rtl"] .hero-badges .badge-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

html[dir="rtl"] nav a {
    text-align: center;
}

html[dir="rtl"] .hamburger-menu.toggle span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

html[dir="rtl"] .hamburger-menu.toggle span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* --- CORRECTION ALIGNEMENT DES NUMEROS HEBREU --- */
html[dir="rtl"] .info-item {
    text-align: right;
}

html[dir="rtl"] .info-text {
    align-items: flex-start;
}

html[dir="rtl"] .info-link {
    text-align: right;
    display: block;
    width: 100%;
}

/* --- FIX FORMULAIRE HEBREU (AJOUTÉ) --- */
/* Le texte à l'intérieur s'écrit de droite à gauche */
html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea {
    text-align: right;
    direction: rtl;
}

/* =========================================
   CORRECTION SPECIFIQUE : IMAGE TOILETTE
   ========================================= */

/* =========================================
   CORRECTION FINALE : POSITION IMAGE TOILETTE
   ========================================= */

/* On cible l'image spécifique */
.project-after-img.img-dezoom {
    /* 1. On remet les valeurs pour qu'elle remplisse tout le cadre (pas de bordures blanches) */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Important : ça remplit le cadre en coupant ce qui dépasse */
    /* 2. LA LIGNE MAGIQUE : On change le point de focus */
    /* Par défaut c'est "center center". On change pour "center bottom". */
    /* Cela force l'image à s'aligner sur le bas du cadre, montrant ainsi le toilette. */
    object-position: center bottom;
    /* 3. On nettoie les anciennes règles de positionnement si elles traînent */
    top: 0;
    left: 0;
    transform: none;
    background-color: transparent;

}


