/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-cream: #FDFBF7;
    --bg-sand: #EFE8D8;
    --text-dark: #4A4238;
    --accent-terra: #C07A5C;
    --morocco-red: #A63434;
    --morocco-green: #006233;
    --whatsapp-green: #25D366;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. LAYOUT & HEADER (OPTIMISÉ UNE LIGNE)
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: rgba(253, 251, 247, 0.95);
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between; /* Extrémité gauche / Extrémité droite */
    align-items: center;
    width: 100%;
    
    /* CRITIQUE : Empêche le retour à la ligne */
    flex-wrap: nowrap; 
}

.logo-img {
    max-height: 50px;
    width: auto;
    /* Permet au logo de rétrécir si l'écran est minuscule */
    flex-shrink: 1; 
    transition: all 0.3s ease;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Empêche les boutons de se faire écraser */
    flex-shrink: 0; 
}

.lang-selector {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

/* BOUTON INSTAGRAM COLORÉ */
.insta-header {
    font-size: 2rem;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #d6249f; 
    transition: transform 0.3s ease;
}

.insta-header:hover {
    transform: scale(1.2) rotate(8deg);
}

/* =========================================
   3. HERO & SECTIONS
   ========================================= */
.hero {
    height: calc(100vh - 80px);
    min-height: 500px;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-sub {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* BADGE MAROCAIN */
.badge {
    display: inline-block;
    background-color: var(--morocco-red);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--morocco-green);
    box-shadow: 0 4px 15px rgba(0, 98, 51, 0.25);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

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

/* Boutons */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-terra);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.2s;
    white-space: nowrap; /* Garde le texte sur une ligne */
}

.btn-cta:hover { transform: translateY(-3px); }

.btn-whatsapp {
    background-color: var(--whatsapp-green);
}

/* =========================================
   4. GRILLES & CONTENU
   ========================================= */
.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.intro-highlight { color: var(--accent-terra); font-weight: bold; }

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

.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-10px); }

.card .icon {
    font-size: 2.5rem;
    color: var(--accent-terra);
    margin-bottom: 20px;
    display: block;
}

/* Galerie */
.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    text-align: center;
}

.sector-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.sector-tag {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 20px;
    color: #666;
}

/* Equipe */
.team-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.team-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.team-role {
    display: block;
    color: var(--accent-terra);
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.location-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.store-img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.rating { color: #FFD700; margin: 10px 0; }
.map-link { color: var(--accent-terra); font-weight: bold; text-decoration: underline; }

/* Footer */
footer {
    background-color: var(--text-dark);
    color: #ddd;
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a { font-size: 1.5rem; color: white; }

/* Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* ============================================================
   FONCTIONNALITÉS (BOUTON & MODAL)
   ============================================================ */

/* BOUTON WHATSAPP FLOTTANT */
.floating-wa {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--whatsapp-green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s;
}
.floating-wa:hover {
    transform: scale(1.1);
    background-color: #1ebc57;
}

/* MODAL MENTIONS LÉGALES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    text-align: left;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.legal-text-content h3 {
    margin-top: 20px;
    font-size: 1.1rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--morocco-red);
    display: inline-block;
}

.legal-text-content p {
    font-size: 0.95rem;
    margin-top: 10px;
    color: #444;
}

/* ============================================================
   RESPONSIVE (Header Compact)
   ============================================================ */
@media (max-width: 768px) {
    /* 1. On réduit le padding du container pour gagner de la place */
    .container {
        padding: 0 15px; 
    }

    /* 2. On réduit la taille du logo */
    .logo-img {
        height: 35px; /* Était 50px */
    }

    /* 3. On réduit l'espacement entre les éléments de droite */
    .nav-actions {
        gap: 8px; /* Était 20px */
    }

    /* 4. On réduit l'icône Instagram */
    .insta-header {
        font-size: 1.6rem; 
        margin-right: 2px;
    }

    /* 5. On compacte le sélecteur de langue */
    .lang-selector {
        padding: 3px;
        font-size: 0.85rem;
    }
    
    /* Titre Hero */
    .hero h1 { font-size: 2.2rem; }
}
