/* ==========================================================================
   DESIGN SYSTEM - STYLE 1 (MÉDICAL MODERNE)
   Dr Adil LEKHBAL - Cabinet d'ORL Khouribga
   ========================================================================== */

/* Variables de Design */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc; /* Slate 50 */
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --primary: #0284c7; /* Sky 600 */
    --primary-hover: #0369a1; /* Sky 700 */
    --accent: #0d9488; /* Teal 600 */
    --accent-light: #ccfbf1; /* Teal 100 */
    --card-bg: #ffffff;
    --border-color: #f1f5f9; /* Slate 100 */
    --border-hover: #cbd5e1; /* Slate 300 */
    --success: #10b981; /* Emerald 500 */
    --error: #ef4444; /* Red 500 */
    
    /* Typographies */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset de base */
*, *::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-body);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typographie */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

p {
    color: var(--text-muted);
}

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

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

/* Conteneurs */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Grille flexible */
.grid {
    display: grid;
    gap: 2rem;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

.btn-lang {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.btn-lang:hover {
    background-color: var(--accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.top-bar .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.top-bar .info-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: var(--transition);
}

/* Couleurs spécifiques et effets pour les liens cliquables */
.top-bar a.info-link {
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

/* Lien Téléphone */
.top-bar a.info-link.link-phone:hover {
    color: var(--primary);
    background-color: rgba(2, 132, 199, 0.08);
}
.top-bar a.info-link.link-phone:hover .info-icon {
    color: var(--primary);
    transform: scale(1.1) rotate(-10deg);
}

/* Lien WhatsApp */
.top-bar a.info-link.link-whatsapp:hover {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.08);
}
.top-bar a.info-link.link-whatsapp:hover .info-icon {
    color: var(--success);
    transform: scale(1.1) translateY(-1px);
}

/* Élément horaire */
.top-bar .info-item.item-clock {
    color: var(--text-muted);
}
.top-bar .info-item.item-clock .info-icon {
    color: var(--accent);
}

/* Header & Menu */
header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    padding: 1rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

header .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-top: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.75rem;
}

nav a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
}

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

/* Burger Menu (Mobile Only) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at 80% 20%, #e0f2fe 0%, #ffffff 100%);
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(2, 132, 199, 0.08);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(2, 132, 199, 0.15);
}

.hero h1 {
    font-size: 3.25rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero profile adjustments */
.hero-profile-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-profile-img {
    width: 220px;
    height: auto;
    border-radius: 12px;
    border: 3px solid var(--accent-light);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.hero-profile-details {
    flex: 1;
    min-width: 250px;
    text-align: left;
}

[dir="rtl"] .hero-profile-details {
    text-align: right;
}

.hero-profile-details h1 {
    font-size: 2.25rem !important;
    margin-bottom: 0.25rem !important;
    letter-spacing: -0.5px !important;
}

.hero-specialty {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.hero-quick-info {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

/* Widget de RDV de style med.ma / med.tn */
.hero-rdv-wrapper {
    background-color: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 30px -5px rgba(2, 132, 199, 0.15), 0 10px 15px -5px rgba(2, 132, 199, 0.1);
    overflow: hidden;
    transition: var(--transition);
}

.hero-rdv-wrapper:hover {
    border-color: var(--primary-dark);
    box-shadow: 0 20px 35px -5px rgba(2, 132, 199, 0.25), 0 15px 20px -5px rgba(2, 132, 199, 0.15);
}

.med-rdv-widget {
    display: flex;
    flex-direction: column;
}

.rdv-widget-header {
    background-color: var(--primary);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 4px solid var(--primary-dark);
}

.rdv-widget-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: var(--primary-dark) transparent;
    display: block;
    width: 0;
    z-index: 10;
}

.rdv-widget-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    font-family: var(--font-display);
    color: #ffffff;
    text-align: center;
}

.rdv-widget-body {
    padding: 1rem 0.75rem 1.5rem 0.75rem;
}

/* Styles du Calendrier de style med.tn exact */
.rdv-step-instruction-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin: 1.25rem 0 0.75rem 0;
    font-family: var(--font-display);
}

.rdv-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    margin-bottom: 1rem;
}

.rdv-month-arrow {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: var(--transition);
    user-select: none;
}

.rdv-month-arrow:hover {
    color: var(--primary);
}

.rdv-month-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    font-family: var(--font-display);
}

.rdv-days-cards-slider {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 0.75rem 0.25rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    border-bottom: 1px solid var(--border-color);
}

.rdv-days-cards-slider::-webkit-scrollbar {
    height: 3px;
}
.rdv-days-cards-slider::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 2px;
}

.rdv-day-card {
    flex: 1;
    min-width: 58px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.25rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.rdv-day-card .card-day-name {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.rdv-day-card .card-day-num {
    font-size: 1.15rem;
    color: #1e293b;
    font-weight: 800;
    margin: 3px 0;
}

.rdv-day-card .card-day-month {
    font-size: 0.7rem;
    color: #64748b;
}

.rdv-day-card:hover:not(.active) {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

.rdv-day-card.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-sm);
}

.rdv-day-card.active .card-day-name,
.rdv-day-card.active .card-day-num,
.rdv-day-card.active .card-day-month {
    color: #ffffff !important;
}

.rdv-day-card.sunday-card {
    opacity: 0.5;
}

.rdv-hours-section-wrapper {
    display: flex;
    flex-direction: column;
}

.rdv-cabinet-closed-msg {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 1.5rem 1rem;
    background-color: #f8fafc;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.rdv-hours-med-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-top: 0.5rem;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}

.rdv-hours-med-grid::-webkit-scrollbar {
    width: 4px;
}
.rdv-hours-med-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.rdv-med-time-btn {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.65rem 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.rdv-med-time-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

.rdv-med-time-btn.active {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-sm);
}

.rdv-med-time-btn:disabled {
    background-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 0.55;
    text-decoration: line-through;
}

.rdv-field-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
}

.rdv-submit-btn {
    background-color: #FFC909 !important;
    color: #1B2746 !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 0.85rem 1.5rem !important;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.rdv-submit-btn:hover {
    background-color: #e5b408 !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.rdv-submit-btn:active {
    transform: translateY(0);
}

/* Sections Standards */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Section À Propos (Parcours) */
.about {
    background-color: var(--bg-primary);
}

.about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.about-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
}

.timeline-badge {
    position: absolute;
    left: calc(-2rem - 13px);
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.95rem;
}

/* Section Spécialités */
.specialties {
    background-color: var(--bg-secondary);
}

.specialties-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background-color: rgba(2, 132, 199, 0.08);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card p {
    font-size: 0.95rem;
}

/* Section Plateau Technique */
.tech {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.tech-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tech-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tech-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.tech-list-icon {
    color: var(--accent);
    background-color: var(--accent-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.tech-list-text h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.tech-list-text p {
    font-size: 0.95rem;
}

.tech-summary {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.tech-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.tech-summary p {
    margin-bottom: 1.5rem;
}

/* Section Rendez-vous & Contact */
.appointment-contact {
    background-color: var(--bg-secondary);
}

.appointment-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
}

/* Formulaire */
.appointment-form-wrapper {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.appointment-form-wrapper h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.appointment-form-wrapper p {
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

select.form-control {
    background-color: #ffffff;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Message de statut du formulaire */
.form-status {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-status.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Contact Infos */
.contact-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(2, 132, 199, 0.08);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.contact-details p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-card {
    margin: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Maps block */
.map-container {
    height: 320px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Section Galerie */
.gallery-section {
    background-color: var(--bg-primary);
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.gallery-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-secondary);
}

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

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

.gallery-caption {
    padding: 1.25rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    color: var(--text-main);
    border-top: 1px solid var(--border-color);
}

/* Styles obsolètes nettoyés */

/* Texte récapitulatif du créneau choisi */
.selected-slot-alert {
    background-color: #f0fdfa;
    border: 1px dashed var(--primary);
    color: var(--primary-dark);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: none;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

[dir="rtl"] .selected-slot-alert {
    background-color: #f0fdfa;
    border: 1px dashed var(--primary);
    color: var(--primary-dark);
}

/* Transition d'affichage des champs patients */
.patient-fields-wrapper {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.patient-fields-wrapper.visible {
    max-height: 500px;
    opacity: 1;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}



/* Pied de page (Footer) */
footer {
    background-color: var(--text-main);
    color: #ffffff;
    padding: 4rem 0 2rem 0;
}

footer .content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-deontology {
    max-width: 450px;
}

.footer-deontology h4 {
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.footer-deontology p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Styles pour la direction RTL (Arabe) */
[dir="rtl"] {
    font-family: 'IBM Plex Sans Arabic', var(--font-body);
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
    font-family: 'IBM Plex Sans Arabic', var(--font-display);
}

[dir="rtl"] .top-bar-left {
    order: 2;
}

[dir="rtl"] .top-bar-right {
    order: 1;
}

[dir="rtl"] .hero {
    background: radial-gradient(circle at 20% 20%, #e0f2fe 0%, #ffffff 100%);
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 2rem;
    border-left: none;
    border-right: 2px solid var(--border-color);
}

[dir="rtl"] .timeline-badge {
    left: auto;
    right: calc(-2rem - 13px);
}

[dir="rtl"] .tech-list-icon {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .contact-icon {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] select.form-control {
    padding-left: 2rem;
    padding-right: 1rem;
}

[dir="rtl"] .logo-subtitle {
    letter-spacing: 0.5px;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MEDIAS QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-grid, .about-grid, .tech-grid, .appointment-grid {
        gap: 3rem;
    }
}

@media (max-width: 968px) {
    /* Menu Mobile */
    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 0;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1.25rem;
        align-items: stretch;
        padding: 0 1.5rem;
    }

    nav .btn-cta {
        justify-content: center;
    }

    /* Grilles */
    .hero-grid, .about-grid, .tech-grid, .appointment-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        text-align: center;
        padding: 4rem 0;
    }

    .hero-tag {
        margin-left: auto;
        margin-right: auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-profile-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1.5rem;
        justify-content: center;
    }
    
    .hero-profile-img {
        width: 160px;
        height: auto;
        border-radius: 12px;
        object-fit: cover;
    }
    
    .hero-profile-details {
        text-align: center !important;
    }

    [dir="rtl"] .hero-profile-details {
        text-align: center !important;
    }
    
    .hero-profile-details h1 {
        font-size: 1.85rem !important;
    }
    
    .hero-specialty {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-description {
        display: none !important;
    }
    
    .hero-quick-info {
        display: none !important;
    }
    
    .contact-page-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    .tech-summary {
        order: -1;
    }
}

@media (max-width: 568px) {
    html {
        font-size: 15px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .top-bar {
        display: none; /* Cache la top bar sur mobile pour maximiser l'espace */
    }

    section {
        padding: 4rem 0;
    }

    .appointment-form-wrapper {
        padding: 1.5rem 1rem !important;
    }
    
    .rdv-time-slots-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Règle globale pour les numéros de téléphone (évite les bugs RTL) */
a[href^="tel:"], .info-item a[href^="tel:"] {
    direction: ltr !important;
    unicode-bidi: isolate;
    display: inline-block;
}

/* ==========================================================================
   LIGHTBOX GALERIE PHOTO (NATIVE)
   ========================================================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-sm);
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.active .lightbox-img {
    transform: scale(1);
}

.lightbox-caption {
    color: #ffffff;
    font-family: var(--font-display);
    margin-top: 1.25rem;
    font-size: 1.15rem;
    text-align: center;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 200;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: var(--transition);
    z-index: 2010;
}

.lightbox-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 3.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.5rem;
    transition: var(--transition);
    user-select: none;
    z-index: 2010;
}

.lightbox-arrow:hover {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* Version mobile de la lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
    }
    .lightbox-arrow {
        font-size: 2.5rem;
        padding: 0.5rem;
    }
    .lightbox-prev { left: 0.25rem; }
    .lightbox-next { right: 0.25rem; }
    .lightbox-close { top: 1rem; right: 1rem; font-size: 2.5rem; }
}

/* ==========================================================================
   TRANSITIONS MICRO-ANIMATIONS WIDGET RDV
   ========================================================================== */
.rdv-hours-section-wrapper {
    transition: opacity 0.25s ease-in-out;
}
.rdv-day-card {
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.rdv-day-card:hover:not(.sunday-card) {
    transform: translateY(-2px);
}
.rdv-med-time-btn:hover {
    transform: scale(1.03);
}

/* ==========================================================================
   SECTION ACTES & SOINS (OPTIMISATION SEO DISCRÈTE)
   ========================================================================== */
.actes-seo {
    padding: 2.5rem 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.actes-accordion {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.actes-accordion:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.actes-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    outline: none;
    user-select: none;
    transition: var(--transition);
}

.actes-summary::-webkit-details-marker {
    display: none;
}

.summary-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.actes-summary:hover .summary-title {
    color: var(--primary-hover);
}

.summary-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    transition: var(--transition);
}

.actes-summary:hover .summary-icon {
    background-color: var(--accent-light);
    color: var(--accent);
}

.summary-icon svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.actes-accordion[open] .summary-icon svg {
    transform: rotate(180deg);
}

.actes-content {
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.actes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Version Desktop large : 5 colonnes */
@media (min-width: 1024px) {
    .actes-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Version Tablette : 2 colonnes */
@media (max-width: 768px) {
    .actes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Version Mobile : 1 colonne */
@media (max-width: 480px) {
    .actes-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.actes-category {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.actes-category h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.actes-category ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.actes-category li {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    position: relative;
    padding-left: 0.9rem;
    transition: var(--transition);
}

.actes-category li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.actes-category li:hover {
    color: var(--text-main);
    transform: translateX(2px);
}

/* Support RTL (Arabe) */
[dir="rtl"] .actes-seo {
    text-align: right;
}

[dir="rtl"] .actes-category li {
    padding-left: 0;
    padding-right: 0.9rem;
}

[dir="rtl"] .actes-category li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .actes-category li:hover {
    transform: translateX(-2px);
}

[dir="rtl"] .actes-category h3 {
    border-bottom: 2px solid var(--accent-light);
}


