/* ==========================================================================
   QWANDLY MINI-SITE - STYLES PERSONNALISÉS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES & CONFIGURATION GLOBALE
   -------------------------------------------------------------------------- */
:root {
    /* Couleurs standards (peuvent être remplacées par les variables PHP) */
    --primary-color: #007bff;
    --primary-color-rgb: 0, 123, 255;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --text-color: #212529;
    --header-bg-color: #F9F2EC;
    --footer-bg-color: #1F2937;
    
    /* Polices */
    --heading-font: 'Cinzel', serif;
    --body-font: 'Montserrat', sans-serif;
}

/* Style de base pour page entière avec flexbox pour footer sticky */
html, body {
    height: 100%;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   2. HEADER, LOGO ET TITRE DU SITE
   -------------------------------------------------------------------------- */
/* Header principal */
header.relative {
    min-height: 350px !important;
    background-color: var(--header-bg-color);
    position: relative;
    /* overflow: hidden; - supprimé car plus nécessaire */
}

@media (max-width: 1023px) {
    header.relative {
        min-height: 220px !important;
    }
}

/* Logo de l'entreprise - style amélioré et centré */
.business-logo {
    border: 2px solid #fff;
    border-radius: 8px; /* Forme rectangulaire avec coins arrondis */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    padding: 8px;
    max-width: 200px; /* Taille mobile */
    height: auto;
    object-fit: contain; /* Garder les proportions */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto; /* Centrer le logo */
    display: block;
}

.business-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
    .business-logo {
        max-width: 300px; /* Plus grand sur desktop */
    }
}

/* Container du logo - centré */
.logo-container {
    width: fit-content;
    margin: 0 auto;
    padding: 20px;
    z-index: 15 !important;
    position: relative;
}

@media (min-width: 1024px) {
    .logo-container {
        padding: 40px 20px;
    }
}

/* Ajuster la position du bouton menu mobile */
@media (max-width: 1023px) {
    /* Repositionner le bouton menu mobile */
    #mobile-menu-button {
        top: 1rem;
        left: 1rem;
    }
}

/* --------------------------------------------------------------------------
   3. NAVIGATION ET MENU MOBILE - DESIGN PROFESSIONNEL AMÉLIORÉ
   -------------------------------------------------------------------------- */
/* Menu principal - desktop */
@media (min-width: 640px) {
    nav#main-nav {
        position: absolute;
        top: 20px;
        right: 20px;
        transform: none;
        width: auto;
        background-color: transparent;
        box-shadow: none;
        overflow: visible;
    }
    
    nav#main-nav ul {
        display: flex;
        background-color: rgba(255, 255, 255, 0.6);
        border-radius: 30px;
        padding: 4px 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        width: auto; /* Largeur automatique basée sur le contenu */
        justify-content: flex-end;
        align-items: center;
    }
    
    nav#main-nav ul a {
        color: #1a365d !important;
        font-weight: 600 !important;
        padding: 6px 10px !important;
        border-radius: 20px;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    nav#main-nav ul a:hover {
        color: #2b6cb0 !important;
    }
    
    nav#main-nav ul a.font-bold {
        color: var(--primary-color) !important;
        border-bottom: none !important;
    }
    
    /* Spécial style pour le bouton RDV */
    nav#main-nav ul a[href="/booking"] {
        background-color: var(--accent-color);
        color: #1a365d !important;
        padding: 6px 12px !important;
        border-radius: 30px;
        margin-left: 5px;
    }
    
    nav#main-nav ul a[href="/booking"]:hover {
        background-color: #e6a800;
    }
}
    
    #mobile-menu-overlay.is-visible {
        opacity: 0;
        pointer-events: none;
    }
    
    #close-menu-button {
        display: none;
    }
}

/* Menu mobile */
#main-nav {
    transform: translateX(-100%);
    max-width: 80%;
    width: 300px;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    background-color: #1F2937;
    transition: transform 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0);
}

#main-nav.is-open {
    transform: translateX(0);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
}

#main-nav .flex.flex-col {
    padding-top: 2rem;
}

#main-nav ul {
    margin-top: 2rem;
}

#main-nav ul li {
    margin-bottom: 0.5rem;
}

#main-nav ul a {
    display: block;
    padding: 12px 20px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

#main-nav ul a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--accent-color);
}

#main-nav ul a.font-bold {
    border-left: 3px solid var(--accent-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Style spécial pour le bouton RDV en mobile */
#main-nav ul a[href="/booking"] {
    margin-top: 1rem;
    background-color: var(--accent-color);
    color: #1F2937 !important;
    border-radius: 6px;
    text-align: center;
    border-left: none;
    margin-right: 20px;
}

/* Bouton close amélioré */
#close-menu-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

#close-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Overlay du menu mobile */
#mobile-menu-overlay {
    transition: opacity 0.3s ease-in-out;
}

#mobile-menu-overlay.is-visible {
    opacity: 0.7;
    pointer-events: auto;
}

/* Style du bouton hamburger */
#mobile-menu-button {
    background-color: rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#mobile-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Hide mobile menu button on large screens */
@media (min-width: 1024px) { /* Tailwind's 'lg' breakpoint is 1024px */
    #mobile-menu-button {
        display: none !important; /* Use !important to ensure it overrides other rules */
    }
}

/* --------------------------------------------------------------------------
   4. CONTENU PRINCIPAL ET TYPO
   -------------------------------------------------------------------------- */
main {
    padding-top: 40px; /* Plus d'espace après le logo */
    padding-bottom: 20px;
}

/* Styles pour le contenu TinyMCE */
.prose img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.prose p {
    margin-bottom: 18px;
    line-height: 1.7;
}

.prose h2, .prose h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.prose h2 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-size: 1.8rem;
}

.prose h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    font-size: 1.4rem;
}

.prose ul, .prose ol {
    margin-bottom: 18px;
    padding-left: 25px;
}

.prose li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.prose a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-color);
    transition: border-bottom 0.2s ease;
}

.prose a:hover {
    border-bottom: 1px solid var(--primary-color);
}

/* --------------------------------------------------------------------------
   5. SECTION SERVICES
   -------------------------------------------------------------------------- */
/* Cartes de service */
.service-card {
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card .card-header {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.service-card h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

.service-card .card-body {
    padding: 20px;
    flex-grow: 1;
}

.service-card .card-footer {
    padding: 15px 20px;
    background-color: rgba(var(--primary-color-rgb), 0.03);
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

/* Prix mis en évidence */
.service-card .font-bold.text-primary-color {
    font-size: 1.2em;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    display: inline-block;
}

.service-card .book-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.service-card .book-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   6. PIED DE PAGE
   -------------------------------------------------------------------------- */
footer {
    background-color: var(--footer-bg-color) !important;
    color: white;
    font-size: 0.9em;
    padding: 2rem 0;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: white;
}

/* Ajout pour les polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:wght@300;400;500;600&family=Montserrat:wght@300;400;500;600;700&display=swap');