/* ==========================================================================
   RESET & BASE STYLES - Mobile First
   ========================================================================== */

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

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Optimisation tactile */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

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

/* ==========================================================================
   VARIABLES & THEME
   ========================================================================== */

:root {
    --primary-green: #139c49;
    --dark-green: #10542b;
    --black: #000000;
    --white: #ffffff;
    --light-gray: #f9f9f9;
    --gray: #6c757d;
    --light-blue: #e7f4ff;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   TYPOGRAPHY - Optimisé mobile
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-green);
}

h1 {
    font-size: 2.5rem; /* Plus petit pour mobile */
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

h2 {
    font-size: 2rem; /* Plus petit pour mobile */
    font-weight: 600;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-green);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem; /* Plus petit pour mobile */
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    font-family: var(--font-body);
    font-size: 1.1rem; /* Légèrement plus grand pour lisibilité mobile */
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--gray);
}

.hero-subtitle {
    font-size: 1.2rem; /* Adapté mobile */
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-align: center;
    padding: 0 10px;
}

/* ==========================================================================
   BUTTONS - Optimisés pour mobile (tactile)
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px; /* Plus grand pour mobile */
    border-radius: 10px; /* Arrondi plus prononcé */
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem; /* Plus grand pour mobile */
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    text-align: center;
    line-height: 1;
    position: relative;
    overflow: hidden;
    min-height: 50px; /* Hauteur minimum pour tactile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Effet tactile pour mobiles */
@media (hover: none) {
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Button Variants */
.btn-tel {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
}

.btn-call {
    background-color: var(--primary-green);
    color: var(--white);
    font-size: 1.2rem;
    padding: 20px 30px;
    min-height: 60px;
}

.btn-whatsapp:hover, .btn-whatsapp:active {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-tel:hover, .btn-tel:active {
    background-color: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-call:hover, .btn-call:active {
    background-color: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-hero {
    font-size: 1.2rem;
    padding: 20px 30px;
    border-radius: 12px;
    font-weight: 700;
    min-height: 60px;
    width: 100%;
    max-width: 350px;
}

.btn-block {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
    min-height: 50px;
}

.btn-contact {
    margin: 0 10px 10px 0;
    min-width: 160px;
    min-height: 50px;
}

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

.btn-copy:hover, .btn-copy:active {
    background-color: #545b62;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-email {
    background-color: #dc3545;
    color: var(--white);
}

.btn-email:hover, .btn-email:active {
    background-color: #c82333;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-submit {
    background-color: var(--primary-green);
    color: var(--white);
    font-size: 1.2rem;
    padding: 18px 30px;
    width: 100%;
    margin-top: 20px;
    min-height: 60px;
}

.btn-submit:hover, .btn-submit:active {
    background-color: var(--dark-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn i {
    font-size: 1.2em;
}

/* ==========================================================================
   HEADER - Logo sans texte
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 12px 0;
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow-md);
}

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

/* Logo Styles - Sans texte */
.logo a {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.logo-img {
    height: 50px; /* Adapté pour mobile */
    width: auto;
    max-width: 180px;
    transition: transform var(--transition-normal);
}

.logo-img:hover, .logo-img:active {
    transform: scale(1.05);
}

/* Suppression du texte logo */
.logo-text {
    display: none;
}

.nav {
    display: flex;
    gap: 10px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem; /* Plus grand pour mobile */
    color: var(--primary-green);
    cursor: pointer;
    padding: 8px;
    transition: color var(--transition-normal);
    min-width: 44px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
    color: var(--dark-green);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-menu-content {
    background-color: var(--white);
    width: 90%;
    max-width: 400px;
    height: 100%;
    padding: 25px;
    margin-left: auto;
    animation: slideIn 0.3s ease;
    overflow-y: auto;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

/* Logo mobile */
.logo-img-mobile {
    height: 45px;
    width: auto;
    max-width: 150px;
}

.close-menu {
    font-size: 3rem; /* Plus grand pour mobile */
    color: var(--black);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color var(--transition-normal);
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.close-menu:hover, .close-menu:active {
    color: var(--primary-green);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.mobile-link {
    padding: 20px 0; /* Plus grand pour tactile */
    color: var(--black);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.3rem; /* Plus grand pour mobile */
    font-weight: 500;
    border-bottom: 1px solid var(--light-gray);
    transition: all var(--transition-normal);
    min-height: 60px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.mobile-link:hover, .mobile-link:active {
    color: var(--primary-green);
    padding-left: 15px;
}

.mobile-menu-contact {
    margin-top: 20px;
}

/* ==========================================================================
   HERO SECTION - Optimisé mobile
   ========================================================================== */

.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Fixed peut causer des problèmes sur mobile */
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Réduit pour mobile */
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(19, 156, 73, 0.1) 0%, rgba(16, 84, 43, 0.1) 100%);
    z-index: 0;
}

.hero-overlay {
    width: 100%;
    padding: 40px 0; /* Réduit pour mobile */
    position: relative;
    z-index: 1;
}

.hero-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    animation: fadeUp 1s ease;
    padding: 0 15px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 2.8rem; /* Adapté mobile */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem; /* Adapté mobile */
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    padding: 0 10px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 2rem;
    padding: 0 10px;
}

/* ==========================================================================
   SERVICES SECTION - Optimisé mobile
   ========================================================================== */

.services {
    padding: 80px 0; /* Réduit pour mobile */
    background-color: var(--light-gray);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr; /* Une colonne par défaut sur mobile */
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--white);
    padding: 30px 25px; /* Réduit pour mobile */
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary-green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.service-card:hover, .service-card:active {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before, .service-card:active::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem; /* Réduit pour mobile */
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    transition: transform var(--transition-normal);
}

.service-card:hover .service-icon, .service-card:active .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    margin-bottom: 0.75rem;
    color: var(--dark-green);
    font-size: 1.5rem;
}

.service-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 1.1rem;
}

/* ==========================================================================
   CONTACT DIRECT SECTION - Optimisé mobile
   ========================================================================== */

.contact-direct {
    padding: 80px 0; /* Réduit pour mobile */
    background-color: var(--white);
    position: relative;
}

.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-number {
    margin-bottom: 30px;
}

.contact-number i {
    font-size: 2.5rem; /* Réduit pour mobile */
    color: var(--primary-green);
    margin-bottom: 15px;
    display: inline-block;
}

.phone-large {
    font-family: var(--font-heading);
    font-size: 2.2rem; /* Réduit pour mobile */
    font-weight: 700;
    color: var(--dark-green);
    margin: 0;
    letter-spacing: 1px;
    line-height: 1.2;
}

.contact-email {
    margin-bottom: 40px;
}

.contact-email i {
    font-size: 2rem; /* Réduit pour mobile */
    color: var(--primary-green);
    margin-bottom: 10px;
    display: inline-block;
}

.contact-email p {
    font-size: 1.3rem; /* Réduit pour mobile */
    color: var(--black);
    margin: 0;
    font-weight: 500;
    word-break: break-word;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ==========================================================================
   RESERVATION SECTION - Optimisé mobile
   ========================================================================== */

.reservation {
    padding: 80px 0; /* Réduit pour mobile */
    background-color: var(--light-gray);
    position: relative;
}

.reservation-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 30px 25px; /* Réduit pour mobile */
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUpForm 0.8s ease;
}

@keyframes fadeInUpForm {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-note {
    background-color: var(--light-blue);
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: #004085;
    font-family: var(--font-body);
    font-size: 1.1rem;
    border-left: 4px solid #004085;
    text-align: left;
}

.form-note i {
    color: #004085;
    margin-right: 10px;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark-green);
    text-align: left;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 18px; /* Plus grand pour mobile */
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background-color: #f8f9fa;
    -webkit-appearance: none;
    min-height: 50px; /* Pour tactile */
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-green);
    background-color: var(--white);
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 156, 73, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr; /* Une colonne sur mobile */
    gap: 20px;
}

/* ==========================================================================
   FOOTER MINIMALISTE - Logo d'agence en couleur naturelle
   ========================================================================== */

.footer-minimal {
    background-color: var(--dark-green);
    color: var(--white);
    padding: 25px 0; /* Réduit pour mobile */
    text-align: center;
    border-top: 3px solid var(--primary-green);
}

.agency-minimal {
    margin-bottom: 15px;
}

.dev-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    font-family: var(--font-body);
}

/* Logo d'agence en couleur naturelle (pas de filtre) */
.agency-logo-minimal {
    display: inline-block;
    margin: 0 auto;
}

.agency-logo-minimal a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.agency-logo-minimal a:hover, .agency-logo-minimal a:active {
    opacity: 0.9;
}

/* Logo sans aucun filtre - couleur naturelle */
.agency-logo-natural {
    height: 40px; /* Taille par défaut */
    width: auto;
    max-width: 150px;
    /* AUCUN FILTRE - Affichage naturel */
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1;
    transition: all 0.3s ease;
    background-color: transparent;
}

.agency-logo-natural:hover, .agency-logo-natural:active {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Pour s'assurer que le logo est visible sur fond sombre */
.agency-logo-natural {
    /* Si le logo est trop sombre, on peut ajouter un léger contour blanc */
    /* Mais d'abord, essayons sans pour voir l'effet naturel */
    /* Si nécessaire, décommenter la ligne ci-dessous */
    /* filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3)); */
}

/* Fallback texte si le logo ne charge pas */
.agency-logo-minimal:empty::after {
    content: "Khouadri.com";
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.copyright-minimal {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 15px;
    margin-top: 15px;
}

.copyright-minimal p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN - Desktop
   ========================================================================== */

@media (min-width: 768px) {
    /* Desktop et tablette */
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    .hero h1 {
        font-size: 3.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .service-card {
        padding: 40px 30px;
    }
    
    .service-icon {
        font-size: 3.5rem;
    }
    
    .phone-large {
        font-size: 3.2rem;
    }
    
    .contact-email p {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .reservation-form {
        padding: 50px;
    }
    
    .btn-hero {
        width: auto;
        max-width: none;
    }
    
    .hero-buttons {
        flex-direction: row;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .footer-minimal {
        padding: 30px 0;
    }
    
    .agency-logo-natural {
        height: 45px;
        max-width: 160px;
    }
}

@media (min-width: 992px) {
    /* Desktop large */
    .hero {
        padding-top: 100px;
    }
    
    .hero-overlay {
        padding: 80px 0;
    }
    
    .services, .contact-direct, .reservation {
        padding: 100px 0;
    }
}

/* ==========================================================================
   AMÉLIORATIONS SPÉCIFIQUES POUR MOBILE
   ========================================================================== */

@media (max-width: 767px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-contact {
        width: 100%;
        max-width: 300px;
        margin: 0 0 15px 0;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Empêcher le zoom sur les inputs iOS */
    input, textarea, select {
        font-size: 16px !important;
    }
    
    /* Boutons plus grands sur très petits écrans */
    @media (max-width: 480px) {
        .btn {
            padding: 18px 20px;
            font-size: 1rem;
        }
        
        .btn-hero {
            padding: 22px 20px;
            font-size: 1.1rem;
        }
        
        .hero h1 {
            font-size: 2.5rem;
        }
        
        .hero-subtitle {
            font-size: 1.1rem;
        }
        
        .phone-large {
            font-size: 1.8rem;
        }
        
        .agency-logo-natural {
            height: 35px;
            max-width: 140px;
        }
    }
}

/* ==========================================================================
   AMÉLIORATIONS D'ACCESSIBILITÉ
   ========================================================================== */

/* Focus visible pour navigation clavier */
.btn:focus-visible,
.mobile-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* Amélioration du contraste pour accessibilité */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #0d8038;
        --dark-green: #0a3d1f;
    }
    
    .btn-tel, .btn-call, .btn-submit {
        background-color: #0d8038;
    }
    
    .btn-tel:hover, .btn-call:hover, .btn-submit:hover {
        background-color: #0a3d1f;
    }
}

/* Mode sombre simplifié */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .service-card, .reservation-form {
        background-color: #1e1e1e;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background-color: #2a2a2a;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    /* Assurer que le logo reste visible en mode sombre */
    .agency-logo-natural {
        /* Si le logo est trop clair, ajuster */
        opacity: 0.9;
    }
}