/* ====================================
   CABINET Değirmenci
   Custom Styles avec Bootstrap 5
   ==================================== */

/* --- 1. VARIABLES GLOBALES --- */
:root {
    /* --- 1. TES VARIABLES (La source de vérité) --- */
    --primary-color: #0a2444;       /* Bleu Nuit */
    --secondary-color: #c9a961;     /* Doré */
    --primary-color-hover: #b09350; /* Doré foncé (Hover) */
    --text-light: #f4f4f4;

    /* Nouvelles variables pour standardiser */
    --bg-light: #f8f9fb;            /* Gris très clair pour les fonds alternés */
    --text-dark: #333333;           /* Texte standard */
    --text-muted: #666666;          /* Texte secondaire */
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 10, 36, 68;

    --bs-secondary: var(--secondary-color);
    --bs-secondary-rgb: 201, 169, 97;

    /* Liens par défaut */
    --bs-link-color: var(--primary-color);
    --bs-link-hover-color: var(--secondary-color);

    /* Polices (Optionnel : Pour forcer Bootstrap à utiliser tes fonts) */
    --bs-body-font-family: 'Manrope', sans-serif;
    --bs-font-sans-serif: 'Manrope', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

/* Base */
html, body {
    color: var(--text-muted);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
}

/* --- 2. COMPOSANT : PAGE HEADER (Bandeau titre) --- */
/* --- HERO INTERNE --- */
.page-header-global {
    background: linear-gradient(to right, rgba(10, 36, 68, 0.9), rgba(10, 36, 68, 0.8)),
    url('../img/hero.avif'); /* Remplace par une belle photo de bureau/livres */
    background-size: cover;
    background-position: center;
    padding: 150px 0 80px;
    color: white;
    margin-bottom: 0;
}
.page-header-global .container { position: relative; z-index: 1; }

/* --- 3. COMPOSANT : IMG FRAME OFFSET (Le cadre photo décalé) --- */
/* C'est LA classe à utiliser partout pour les photos d'équipe/profil */
.img-frame-offset {
    position: relative;
    margin: 1rem;
    z-index: 1;
}

.img-frame-offset img {
    width: 100%;
    height: 500px; /* Hauteur standardisée */
    object-fit: cover;
    border-radius: 2px;
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Le cadre doré */
.img-frame-offset::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--secondary-color);
    z-index: 1;
    transition: transform 0.4s ease;
}

/* Variante : Cadre décalé vers la GAUCHE */
.img-frame-left::after { bottom: -15px; left: -15px; }

/* Variante : Cadre décalé vers la DROITE */
.img-frame-right::after { bottom: -15px; right: -15px; }

/* Animation au survol */
.img-frame-offset:hover::after {
    transform: translate(0, 0); /* Le cadre revient sous l'image */
    bottom: 0; left: 0; right: 0; /* Reset position */
}

/* --- 4. COMPOSANT : ICON CARD (Services / Valeurs) --- */
.icon-card {
    background: white;
    padding: 2.5rem 2rem;
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.icon-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--secondary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.icon-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* --- 5. UTILITAIRES TEXTE --- */
.text-gold { color: var(--secondary-color) !important; }
.bg-light-gray { background-color: var(--bg-light); }
.section-padding { padding: 80px 0; }

a {
    transition: all 0.3s ease;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}
.text-primary {
    color: var(--primary-color); !important;
}

/* --- Navbar Simplifiée pour le contexte --- */
.navbar {
    background: transparent;
    width: 100%;
    z-index: 1000;
    padding-top: 1rem;
    position: absolute;
    top: 0;
}
/* Mobile first */
.navbar-logo {
    width: 250px;
}
@media (min-width: 768px) {
    .navbar-logo {
        width: 220px;
    }
}
@media (min-width: 992px) {
    .navbar-logo {
        width: var(--logo-size-desktop, 250px);
    }
    body.index {
        --logo-size-desktop: 350px;
    }
    .navbar {
        padding-top: 2rem;
    }
}

/* =========================================
   STYLE NAVBAR MOBILE (Max-width: 991px)
   ========================================= */
@media (max-width: 991.98px) {

    /* 1. Le Panneau Déroulant Principal */
    .navbar-collapse {
        background-color: var(--primary-color); /* Fond Bleu Nuit */
        /* Optionnel : Ajoute un léger flou si le navigateur le supporte */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        position: absolute; /* Se superpose au contenu */
        top: 100%; /* Juste en dessous de la barre */
        left: 0;
        width: 100%;
        padding: 20px 30px 40px; /* Espacement interne confortable */
        box-shadow: 0 15px 30px rgba(0,0,0,0.2); /* Ombre portée vers le bas */
        border-top: 1px solid rgba(255,255,255,0.1); /* Ligne de séparation subtile */
        z-index: 1000;
    }

    /* 2. Les Liens Principaux */
    .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.9) !important; /* Blanc cassé */
        font-family: 'Playfair Display', serif; /* Police titres pour l'élégance */
        font-size: 1.2rem;
        padding: 15px 0; /* Zone de clic plus grande */
        border-bottom: 1px solid rgba(255,255,255,0.05); /* Séparateur très fin */
        transition: all 0.3s ease;
    }

    /* État Au survol / Actif */
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link.show { /* Pour le dropdown ouvert */
        color: var(--secondary-color) !important; /* Doré */
        padding-left: 10px; /* Petit décalage vers la droite (Animation moderne) */
        border-bottom-color: var(--secondary-color);
    }

    /* 3. Gestion du Dropdown (Expertises) sur Mobile */
    .navbar-nav .dropdown-menu {
        background-color: transparent; /* Pas de fond blanc moche */
        border: none; /* Pas de bordure */
        padding: 0;
        margin: 0;
        padding-left: 20px; /* Indentation pour hiérarchie */
    }

    .navbar-nav .dropdown-item {
        color: rgba(255,255,255,0.6) !important; /* Gris clair */
        font-family: 'Manrope', sans-serif;
        font-size: 0.95rem;
        padding: 10px 0;
        background: transparent !important; /* Force la transparence */
        transition: 0.3s;
    }

    .navbar-nav .dropdown-item:hover {
        color: var(--secondary-color) !important;
        background: transparent;
        transform: translateX(5px);
    }

    /* La petite flèche du dropdown */
    .dropdown-toggle::after {
        float: right; /* Flèche à droite */
        margin-top: 10px;
        color: var(--secondary-color);
    }

    /* 4. Le Bouton "Prendre RDV" */
    .navbar-nav .btn {
        margin-top: 25px;
        width: 100%; /* Pleine largeur */
        padding: 15px;
        background-color: var(--secondary-color);
        color: var(--primary-color) !important;
        font-weight: 700;
        text-transform: uppercase;
        border: none;
    }

    /* 5. Customisation du Hamburger (Toggler) */
    /* Assure-toi que ton bouton <button class="navbar-toggler"> a bien cette classe */
    .navbar-toggler {
        border-color: rgba(255,255,255,0.1) !important;
    }

    /* Les 3 traits du hamburger */
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(201, 169, 97, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
}

.nav-link {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-left: 20px;
    transition: 0.3s;
}

.nav-link.active {
    color: var(--secondary-color) !important;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

.btn-primary {
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: #113055;
    --bs-btn-hover-border-color: #113055;
    --bs-btn-active-bg: #05152a;
}
.btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--secondary-color);
    --bs-btn-border-color: var(--secondary-color);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary-color-hover);
    --bs-btn-hover-border-color: var(--primary-color-hover);
}
.btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
}
/* Custom Buttons */
.btn-custom-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background: #b89850;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.btn-custom-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-custom-outline:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

.btn-custom-white {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-custom-white:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

/* Trust Bar */
.trust-bar {
    background: #f8f9fa;
    padding: 60px 0;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.trust-stat h3 {
    color: var(--secondary-color);
    font-size: 3rem;
    margin-bottom: 10px;
}

.trust-stat p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Service Card */
.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--secondary-color);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-card h3,
.service-card h4 {
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-card a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.service-card a:hover {
    color: var(--secondary-color);
}

/* Team Member Card */
.team-member {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.team-photo {
    width: 100%;
    height: 350px;
    background: #f8f9fa;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info {
    padding: 30px;
    text-align: center;
}

.team-role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.team-contact a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin: 0 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.team-contact a:hover {
    background: var(--primary-color);
    color: white;
}

/* Testimonial Card */
.testimonial-card {
    background: white;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    height: 100%;
}

.testimonial-card::before {
    content: '"';
    font-size: 5rem;
    color: var(--secondary-color);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: Manrope, serif;
}

.testimonial-rating {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.testimonial-text {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.author-info p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d3a66 100%);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 2;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d3a66 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 8px;
    position: sticky;
    top: 120px;
}

.sidebar h3 {
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sidebar a:hover,
.sidebar a.active {
    background: white;
    color: var(--primary-color);
    padding-left: 15px;
}

/* Expertise Intro */
.expertise-intro {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 50px;
    border-left: 4px solid var(--secondary-color);
}

.expertise-content ul {
    list-style: none;
    padding-left: 0;
}

.expertise-content ul li {
    padding-left: 30px;
    margin-bottom: 12px;
    position: relative;
}

.expertise-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

/* Contact Items */
.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 8px;
}

.contact-details a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.contact-details a:hover {
    color: var(--secondary-color);
}

/* Section Subtitle */
.section-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

/* Calendar Container */
.calendar-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 40px;
    min-height: 600px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .trust-stat h3 {
        font-size: 2.5rem;
    }

    .sidebar {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .team-photo {
        height: 300px;
    }
}

/* --- SECTION PROFIL --- */
.profile-section {
    padding: 80px 0;
    background-color: #fff;
    overflow: hidden; /* Pour les animations */
}

.profile-section.alt-bg {
    background-color: #f8f9fb; /* Gris très léger pour alterner */
}

/* Cadre Photo "Offset" (Réutilisation du style Team) */
.profile-img-wrapper {
    position: relative;
    margin-bottom: 30px;
    z-index: 1;
    padding: 0 20px 20px 0; /* Espace pour le cadre */
}

.profile-img {
    width: 100%;
    height: auto;
    min-height: 450px;
    object-fit: cover;
    border-radius: 4px;
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 30px rgba(10, 36, 68, 0.15);
}

.profile-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 90%;
    height: 90%;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
    z-index: 1;
}

/* Typographie */
.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.profile-role {
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 25px;
}

.bio-text {
    font-family: 'Manrope', sans-serif;
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
    text-align: justify;
}

/* Liste des diplômes / points forts */
.credential-box {
    background: #fff;
    border-left: 3px solid var(--secondary-color);
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.credential-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.credential-text strong {
    display: block;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

/* --- SECTION INFOS PRATIQUES --- */
.info-bar {
    background-color: var(--primary-color);
    padding: 60px 0;
}

.info-item i {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.info-item h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}