/* ============================================
   Cabinet de Neurologie - Dr de Fays
   Theme: Modern Medical - Deep Blue & White
   ============================================ */

:root {
    --primary: #1a365d;
    --primary-light: #2b5797;
    --primary-dark: #0f2440;
    --accent: #4a90d9;
    --accent-light: #6ba3e0;
    --gold: #c9a84c;
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-card: #ffffff;
    --text: #1a202c;
    --text-light: #4a5568;
    --text-muted: #718096;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.navbar.scrolled .nav-logo {
    color: var(--primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.navbar.scrolled .nav-links a {
    color: var(--text-light);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--gold);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-cta:hover {
    background: #b8943f;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--primary);
}

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(74,144,217,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.1) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 0 24px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.hero h1 .highlight {
    color: var(--gold);
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.8;
    opacity: 0.8;
    max-width: 550px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--gold);
    color: white;
    box-shadow: 0 4px 15px rgba(201,168,76,0.3);
}

.btn-primary:hover {
    background: #b8943f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201,168,76,0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(26,54,93,0.08);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   EXPERTISE
   ============================================ */

.expertise {
    background: var(--bg-soft);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.expertise-card {
    background: var(--bg-card);
    padding: 36px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.expertise-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.expertise-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   CABINET
   ============================================ */

.cabinet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cabinet-info h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--primary-dark);
    margin: 16px 0 20px;
}

.cabinet-info p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 28px;
}

.cabinet-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cabinet-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text);
}

.feature-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(26,54,93,0.08);
    color: var(--primary);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.cabinet-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-card {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.visual-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.visual-card p {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ============================================
   HORAIRES
   ============================================ */

.horaires {
    background: var(--bg-soft);
}

.horaires-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.horaire-card {
    background: var(--bg-card);
    padding: 36px 28px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.horaire-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.horaire-jour {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.horaire-heures {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

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

.horaires-cta {
    text-align: center;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.contact-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.contact-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
}

.footer-copy {
    font-size: 0.85rem;
}

/* ============================================
   PAGE RDV - Formulaire & Creneaux
   ============================================ */

.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 120px 0 60px;
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}

.page-header p {
    opacity: 0.8;
    font-size: 1.05rem;
}

.rdv-container {
    max-width: 900px;
    margin: -30px auto 60px;
    padding: 0 24px;
}

.rdv-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.rdv-steps {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.rdv-step {
    flex: 1;
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
}

.rdv-step.active {
    color: var(--primary);
}

.rdv-step.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 3px;
    background: var(--gold);
    border-radius: 3px;
}

.rdv-step.done {
    color: var(--accent);
}

.rdv-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-soft);
    margin-right: 8px;
    font-size: 0.8rem;
}

.rdv-step.active .rdv-step-number {
    background: var(--primary);
    color: white;
}

.rdv-step.done .rdv-step-number {
    background: var(--accent);
    color: white;
}

.rdv-body {
    padding: 40px;
}

.rdv-section {
    display: none;
}

.rdv-section.active {
    display: block;
}

/* Date picker */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.date-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text);
    transition: var(--transition);
}

.date-nav-btn:hover {
    background: var(--bg-soft);
    border-color: var(--accent);
}

.date-display {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-dark);
    min-width: 250px;
    text-align: center;
}

/* Creneaux */
.creneaux-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.creneau-btn {
    padding: 14px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.creneau-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

.creneau-btn.occupied {
    background: var(--bg-soft);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
    border-color: transparent;
}

.creneau-btn.reserved {
    background: #fef3cd;
    color: #856404;
    cursor: not-allowed;
    border-color: transparent;
    font-size: 0.8rem;
}

.no-creneaux {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.form-group label .required {
    color: #e53e3e;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    transition: var(--transition);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74,144,217,0.1);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

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

.btn-back:hover {
    background: var(--border);
}

/* Confirmation */
.confirmation {
    text-align: center;
    padding: 20px 0;
}

.confirmation-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.confirmation h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.confirmation p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.confirmation-details {
    background: var(--bg-soft);
    padding: 24px;
    border-radius: var(--radius);
    margin: 24px 0;
    text-align: left;
}

.confirmation-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.confirmation-details .detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text);
}

.detail-value {
    color: var(--text-light);
}

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
    color: var(--text-muted);
}

/* Alert */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.alert-success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #c6f6d5;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: var(--text) !important;
        font-size: 1rem;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .expertise-grid,
    .horaires-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .cabinet-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cabinet-visual {
        order: -1;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

    /* RDV responsive */
    .creneaux-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .rdv-steps {
        font-size: 0.75rem;
    }

    .rdv-step-number {
        display: none;
    }

    .rdv-body {
        padding: 24px;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .date-nav {
        gap: 12px;
    }

    .date-display {
        font-size: 1rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .creneaux-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2rem;
    }
}
