/*
Theme Name: AtypikHouse
Description: Thème personnalisé pour AtypikHouse - Location d'habitations insolites
Version: 2.2
Author: Angele Laetitia Njoiazong & Zineb Benzidane 
Text Domain: atypikhouse
*/

/* ============================================================================
   VARIABLES CSS - CHARTE GRAPHIQUE UNIFIÉE
   ============================================================================ */
:root {
    /* Verts Principaux - Nature & Durabilité */
    --green-forest: #244136;
    --green-emerald: #3A7A5E;
    --green-prairie: #4A9670;
    
    /* Accents Chauds - Chaleur & Authenticité */
    --terracotta: #E07B39;
    --terracotta-dark: #C96A2E;
    --sage-light: #8BC4A8;
    
    /* Neutres */
    --cream: #FEFDFB;
    --beige-natural: #F8F5F0;
    --sand: #E8E3D8;
    --gray-stone: #8B8677;
    --charcoal: #2C2A27;
    
    /* Ombres */
    --light-shadow: rgba(44, 42, 39, 0.05);
    --deep-shadow: rgba(44, 42, 39, 0.15);
    
    /* Breakpoints */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large: 1200px;
}

/* ============================================================================
   RESET ET BASE
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', 'Open Sans', sans-serif;
    background-color: var(--cream);
    color: var(--charcoal);
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Container responsive */
.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

/* ============================================================================
   TYPOGRAPHIE RESPONSIVE
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--green-forest);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-family: 'Playfair Display', serif;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.2rem);
    font-family: 'Playfair Display', serif;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--green-emerald);
}

p {
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.small-text {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--gray-stone);
}

.caption-label {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    color: var(--gray-stone);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================================================
   HEADER ET NAVIGATION - RESPONSIVE COMPLET
   ============================================================================ */
.main-header {
    background-color: var(--cream);
    color: var(--green-forest);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--light-shadow);
    border-bottom: 1px solid var(--sand);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    gap: 1rem;
}

/* Logo responsive */
.site-logo {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    flex-shrink: 0;
    min-width: 0;
}

.site-logo a {
    color: var(--green-forest);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    font-weight: 700;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
}

.logo-icon {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    background: linear-gradient(135deg, var(--green-forest) 0%, var(--green-emerald) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(45, 95, 76, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logo-icon svg {
    width: clamp(18px, 4vw, 24px) !important;
    height: clamp(18px, 4vw, 24px) !important;
    stroke: var(--cream) !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* Navigation principale */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: var(--green-forest) !important;
    text-decoration: none;
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    position: relative;
    overflow: hidden;
    border: 1.5px solid transparent;
    background: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link svg {
    width: clamp(16px, 3vw, 18px) !important;
    height: clamp(16px, 3vw, 18px) !important;
    stroke: var(--green-forest) !important;
    flex-shrink: 0;
}

/* User greeting responsive */
.user-greeting {
    color: var(--green-forest);
    font-weight: 600;
    margin-left: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1rem, 2vw, 1.25rem);
    background: rgba(45, 95, 76, 0.05);
    border-radius: 50px;
    border: 1.5px solid var(--sage-light);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    white-space: nowrap;
}

/* ============================================================================
   CORRECTION MENU HAMBURGER MOBILE - VERSION FINALE
   ============================================================================ */

/* État ouvert du menu hamburger */
.menu-toggle.active .hamburger-inner {
    background-color: transparent !important;
}

.menu-toggle.active .hamburger-inner::before {
    top: 0 !important;
    transform: rotate(45deg) !important;
}

.menu-toggle.active .hamburger-inner::after {
    bottom: 0 !important;
    transform: rotate(-45deg) !important;
}
/* Navigation mobile - VERSION FINALE CORRIGÉE */
@media (max-width: 768px) {
    /* Bouton hamburger visible */
    .menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 1002;
        /* AJOUTS POUR LE RENDRE VISIBLE */
        background: var(--green-forest); /* Fond vert pour contraste */
        border: none;
        border-radius: 8px;
        padding: 0.5rem;
        margin-left: 0.5rem;
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }

    /* Style pour les barres du hamburger */
    .menu-toggle .hamburger-box {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-toggle .hamburger-inner {
        width: 20px;
        height: 2px;
        background-color: var(--cream); /* Barres blanches pour contraste */
        position: relative;
        transition: all 0.3s ease;
    }

    .menu-toggle .hamburger-inner::before,
    .menu-toggle .hamburger-inner::after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: var(--cream); /* Barres blanches */
        transition: all 0.3s ease;
    }

    .menu-toggle .hamburger-inner::before {
        transform: translateY(-6px);
    }

    .menu-toggle .hamburger-inner::after {
        transform: translateY(6px);
    }

    /* État actif (menu ouvert) */
    .menu-toggle.active {
        background: var(--terracotta); /* Fond orange pour indiquer l'état actif */
    }
    
    /* Menu principal caché par défaut */
    .main-navigation {
        display: none;
        position: fixed;
        top: 70px; /* Ajustez selon la hauteur de votre header */
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--cream);
        padding: 1rem;
        z-index: 1001;
        overflow-y: auto;
        height: calc(100vh - 70px);
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    /* Menu actif = visible et animé */
    .main-navigation.active {
        display: flex !important;
        animation: slideIn 0.3s ease;
    }

    /* Style des liens en mobile */
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 1rem;
        width: 100%;
        border-radius: 8px;
        font-size: 1rem;
        border: 1px solid var(--sand);
        background: var(--beige-natural);
    }

    /* Style du bouton de déconnexion/connexion */
    .nav-link.login,
    .nav-link.logout {
        background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%) !important;
        color: var(--cream) !important;
        border: none !important;
        justify-content: center !important;
    }

    /* Empêcher le scroll du body quand le menu est ouvert */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}


/* Animation pour le menu mobile */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================================================
   SECTION HERO RESPONSIVE
   ============================================================================ */
.hero {
    min-height: 100vh;
    height: auto;
    background: url('assets/images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--cream);
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 2rem);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: var(--cream);
    letter-spacing: clamp(0.5px, 1vw, 1.5px);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    opacity: 0.95;
    line-height: 1.6;
    color: var(--beige-natural);
    padding: 0 clamp(0.5rem, 2vw, 1rem);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
    color: var(--cream);
    padding: clamp(0.875rem, 2vw, 1rem) clamp(2rem, 4vw, 2.5rem);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(224, 123, 57, 0.3);
    letter-spacing: 0.5px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* ============================================================================
   SECTIONS DE CONTENU RESPONSIVE
   ============================================================================ */

/* Section Statistiques */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    background-color: var(--beige-natural);
    text-align: center;
}

.stat-item {
    padding: clamp(1rem, 2vw, 1.5rem);
}

.stat-item h3 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--green-forest);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--gray-stone);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* Section À propos */
.about {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3rem);
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    background-color: var(--cream);
    align-items: center;
}

.about-content {
    text-align: center;
}

.about-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.2rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.about-content p {
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.7;
}

.about-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 25px var(--light-shadow);
    transition: transform 0.4s ease;
    border: 2px solid var(--sand);
}

/* Section Habitations */
.habitations {
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    background-color: var(--beige-natural);
}

.habitations h2 {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.habitations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

.property-card {
    background: var(--cream);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--light-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--sand);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.habitat-image {
    position: relative;
    height: clamp(180px, 30vw, 220px);
    overflow: hidden;
}

.habitat-badge {
    position: absolute;
    top: clamp(8px, 2vw, 12px);
    left: clamp(8px, 2vw, 12px);
    background: linear-gradient(135deg, var(--green-forest), var(--sage-light));
    color: white;
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.6rem, 1.5vw, 0.8rem);
    border-radius: 20px;
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-content {
    padding: clamp(1rem, 2vw, 1.5rem);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-actions {
    margin-top: auto;
    padding-top: clamp(1rem, 2vw, 1.5rem);
}

/* Section Contact */
.contact {
    background-color: var(--green-forest);
    color: var(--cream);
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    text-align: center;
}

.contact h2 {
    color: var(--cream);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
}

.contact input,
.contact textarea {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    border: none;
    border-radius: 10px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    background-color: var(--cream);
    color: var(--charcoal);
    border: 1px solid var(--sand);
}

/* ============================================================================
   COMPOSANTS RESPONSIVE
   ============================================================================ */

/* Cartes */
.card {
    background: var(--cream);
    border-radius: 12px;
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 4px 20px var(--light-shadow);
    border: 1px solid var(--sand);
    transition: all 0.3s ease;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: clamp(0.625rem, 1.5vw, 0.75rem) clamp(1.25rem, 2.5vw, 1.5rem);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    justify-content: center;
}

/* Formulaires */
.form-group {
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.form-control {
    width: 100%;
    padding: clamp(0.75rem, 2vw, 0.875rem) clamp(0.875rem, 2vw, 1rem);
    border: 2px solid var(--sand);
    border-radius: 8px;
    background: var(--cream);
    color: var(--charcoal);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    transition: all 0.3s ease;
}

/* ============================================================================
   FOOTER RESPONSIVE
   ============================================================================ */
.main-footer {
    background: linear-gradient(135deg, var(--green-forest) 0%, var(--green-emerald) 100%);
    color: var(--cream);
    padding: clamp(2rem, 4vw, 3rem) 0 clamp(1rem, 2vw, 1rem);
    margin-top: clamp(2rem, 4vw, 3rem);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    align-items: start;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: clamp(0.75rem, 2vw, 1rem);
    flex-direction: column;
}

/* ============================================================================
   BREAKPOINTS SPÉCIFIQUES
   ============================================================================ */

/* Desktop (1024px+) */
@media (min-width: 1024px) {
        .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* Tablettes (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .nav-menu {
        justify-content: center;
    }
    
    .habitations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* Mobiles (480px et moins) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        min-height: 80vh;
    }
    
    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .habitations-grid {
        grid-template-columns: 1fr;
    }
    
    .property-card {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .site-logo a {
        flex-direction: row;
    }
}

/* Très petits écrans (360px et moins) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero {
        padding: 1.5rem 0.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .nav-link {
        padding: 1rem 0.75rem;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* États de hover uniquement sur desktop */
@media (hover: hover) and (pointer: fine) {
    .nav-link:hover::before {
        left: 100%;
    }
    
    .nav-link:hover {
        background: rgba(45, 95, 76, 0.08) !important;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(45, 95, 76, 0.1);
        border-color: var(--sage-light);
    }
    
    .property-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 35px var(--deep-shadow);
    }
    
    .about-image img:hover {
        transform: scale(1.03);
    }
    
    .cta-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(224, 123, 57, 0.4);
    }
}

/* Accessibilité - Réduire les animations si demandé */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
    :root {
        --cream: #1a1a1a;
        --beige-natural: #2d2d2d;
        --sand: #404040;
        --charcoal: #f5f5f5;
        --light-shadow: rgba(0, 0, 0, 0.3);
        --deep-shadow: rgba(0, 0, 0, 0.5);
    }
}

/* Impression */
@media print {
    .main-header,
    .main-footer,
    .cta-button {
        display: none;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}