/*
  Theme Name: Conciergerie Nantaise - Professional Edition
  Author: Conciergerie Nantaise
  Description: Styles principaux optimisés - Version nettoyée sans doublons
  Version: 3.0 - Optimisé
  Date: Janvier 2025
*/

/* ===================================
   1. VARIABLES CSS GLOBALES - UNIQUE SOURCE DE VÉRITÉ
   =================================== */
:root {
    /* Palette de couleurs */
    --primary-color: #1d4ed8;
    --primary-hover: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --accent-hover: #0284c7;
    
    /* Couleurs neutres */
    --dark-color: #0f172a;
    --dark-light: #1e293b;
    --light-color: #f8fafc;
    --light-dark: #e2e8f0;
    --white-color: #ffffff;
    --text-color: #334155;
    --text-light: #64748b;
    --heading-color: #0f172a;
    --border-color: #e2e8f0;

    /* Couleurs success/danger */
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    /* Typographie */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    --spacing-xxxl: 5rem;

    /* Design tokens */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-full: 9999px;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   2. RÉINITIALISATION MODERNE
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--primary-hover);
}

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

.logo-mobile {
    display: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ===================================
   3. TYPOGRAPHIE
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    color: var(--heading-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-light);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===================================
   4. SYSTÈME DE GRID ET LAYOUT
   =================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--spacing-sm) * -1);
    margin-right: calc(var(--spacing-sm) * -1);
}

.col-md-6, .col-lg-7, .col-lg-5 {
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
    .col-lg-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
}

.align-items-center {
    align-items: center;
}

/* ===================================
   5. COMPOSANTS GLOBAUX - SECTION HEADERS
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    margin: 0;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

/* ===================================
   6. COMPOSANTS GLOBAUX - FAQ ACCORDION (UNIQUE)
   =================================== */
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px 25px;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--heading-color);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.faq-question-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.faq-question-text i.fa-question-circle {
    color: var(--primary-color);
    font-size: 24px;
    flex-shrink: 0;
}

.faq-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #667eea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-icon i {
    color: white;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 25px 0 69px;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 25px 25px 69px;
}

.faq-answer p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 15px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 15px 0;
    padding-left: 20px;
}

.faq-answer li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 8px;
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-question {
        padding: 15px 20px;
        font-size: 15px;
    }
    
    .faq-answer {
        padding-left: 30px;
    }
    
    .faq-item.active .faq-answer {
        padding-left: 30px;
    }
}

/* ===================================
   7. COMPOSANTS GLOBAUX - CTA SECTIONS (UNIQUE)
   =================================== */
.section-cta-final {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-cta-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(32px, 5vw, 42px);
    color: white;
    margin-bottom: 20px;
}

.cta-content > p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.7;
    margin-bottom: 35px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn-cta-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 45px;
    background: white;
    color: var(--primary-color);
    border-radius: 30px;
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-cta-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    color: #764ba2;
}

.btn-cta-large i {
    font-size: 18px;
}

.btn-cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 18px 45px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

.cta-small-text {
    font-size: 14px;
    margin-top: 20px;
    opacity: 0.8;
}

/* Responsive CTA */
@media (max-width: 768px) {
    .section-cta-final {
        padding: 60px 15px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-cta-large,
    .btn-cta-secondary {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
}

/* ===================================
   8. UTILITAIRES
   =================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-danger { color: #ef4444 !important; }

.bg-light { background-color: var(--light-color); }
.bg-dark { background-color: var(--dark-color); color: var(--white-color); }

.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.rounded { border-radius: var(--border-radius); }
.rounded-circle { border-radius: 50%; }
.img-fluid { max-width: 100%; height: auto; }

.mt-4 { margin-top: var(--spacing-xl); }
.mt-5 { margin-top: var(--spacing-xxl); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.mb-5 { margin-bottom: var(--spacing-xxl); }
.py-5 { padding-top: var(--spacing-xxl); padding-bottom: var(--spacing-xxl); }

/* ===================================
   9. BOUTONS
   =================================== */
.cta-button,
.cta-secondary {
    position: relative;
    z-index: 11;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    background: #3182ce;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.cta-button:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
}

.cta-secondary {
    display: inline-block;
    padding: 16px 32px;
    background: transparent;
    color: white;
    text-decoration: none;
    border: 2px solid white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: white;
    color: #1a365d;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    white-space: nowrap;
    user-select: none;
    position: relative;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* ===================================
   10. HEADER - VERSION CORRIGÉE
   =================================== */
.main-header {
    backdrop-filter: blur(10px);
    padding: 3px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.main-header .logo img {
    height: 55px;
    transition: height var(--transition-base);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.main-header .logo {
    flex-shrink: 0;
    z-index: 1002;
}

.main-header .logo img {
    height: 55px;
    transition: height var(--transition-base);
}

/* Zone de navigation + bouton connexion */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
}

/* Bouton connexion toujours visible */
.header-actions .btn-primary {
    flex-shrink: 0;
    padding: 0.625rem 1.5rem;
    font-size: 0.95rem;
    z-index: 1002;
    position: relative;
}

/* Navigation Desktop */
.main-nav .nav-list {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.main-nav .nav-item {
    position: relative;
}

.main-nav .nav-link {
    color: var(--heading-color);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    padding: 0.5rem 0;
    display: block;
    position: relative;
    transition: color var(--transition-base);
    white-space: nowrap;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    transform: scaleX(1);
}

.main-nav .nav-link.active,
.main-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Dropdown Desktop */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--white-color);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    z-index: 1001;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xs) 0;
    top: 100%;
    left: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    border: 1px solid var(--border-color);
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu .dropdown-item {
    padding: 0;
}

.dropdown-menu .dropdown-item a {
    color: var(--text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    display: block;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
}

.dropdown-menu .dropdown-item a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding-left: calc(var(--spacing-md) + 0.5rem);
}

/* Icône chevron dans le dropdown */
.nav-link i.fa-chevron-down {
    font-size: 0.75rem;
    margin-left: 0.35rem;
    transition: transform var(--transition-base);
}

.nav-item.dropdown:hover .nav-link i.fa-chevron-down {
    transform: rotate(180deg);
}

.menu-toggle {
    display: none; /* Caché par défaut - responsive.css l'affichera sur mobile */
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: all var(--transition-base);
    z-index: 1004;
    position: relative;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: scale(1.05);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* ===================================
   11. FOOTER
   =================================== */

/* MINI FOOTER MENU MOBILE */
.mobile-menu-footer {
    display: none; /* Caché par défaut - visible uniquement dans le menu mobile */
    position: relative;
    bottom: auto;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5), rgba(248, 250, 252, 1));
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-light);
    z-index: 10;
    flex-shrink: 0;
    margin-top: auto;
}

.mobile-menu-footer p {
    margin: 0;
}

.mobile-menu-footer strong {
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
}

/* FOOTER PRINCIPAL */
.main-footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
    color: var(--white-color);
    padding: var(--spacing-xxxl) 0 var(--spacing-lg);
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    color: var(--white-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white-color);
    font-size: 1.125rem;
    transition: all var(--transition-base);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

/* ===================================
   12. ANIMATIONS GLOBALES (UNIQUE)
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* ===================================
   13. ACCESSIBILITÉ
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible pour accessibilité clavier */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===================================
   14. IMPRESSION
   =================================== */
@media print {
    .main-header,
    .main-nav,
    .menu-toggle,
    .btn,
    .section-cta-final {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 14pt; }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}


.btn-avis-verifie {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    background-color: #4285F4;
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    transition: background-color 0.2s ease;
}