/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: #2c3e50;
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #1B5E8E; text-decoration: none; }
a:hover { text-decoration: underline; color: #154a72; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }
address { font-style: normal; }

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: #1B5E8E;
    padding: 18px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-name {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.site-name-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-name-main,
.site-name-sub {
    display: block;
}

.site-logo {
    flex-shrink: 0;
    align-self: center;
}

.site-name-main {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
}

.site-name-sub {
    font-size: .82rem;
    font-weight: 400;
    color: rgba(255,255,255,.82);
    letter-spacing: .02em;
    margin-top: 2px;
}

.header-contact {
    text-align: right;
    flex-shrink: 0;
}

.header-contact a {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

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

/* ===== NAVIGATION ===== */
.site-nav {
    background: #154a72;
    border-bottom: 1px solid rgba(255,255,255,.1);
    position: relative;
}

.site-nav .container { display: flex; align-items: stretch; }

.nav-toggle { display: none; }

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 14px 4px;
    margin-left: auto;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-list li a {
    display: block;
    padding: 13px 16px;
    color: rgba(255,255,255,.88);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .02em;
    transition: background .15s, color .15s;
    border-bottom: 2px solid transparent;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-bottom-color: #5DB8F0;
}

/* ===== NAV CTA BUTTON (lien externe, ex: prise de RDV) ===== */
.nav-list-cta {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 0 auto;
    align-items: center;
    flex-shrink: 0;
}

.nav-list-cta li a {
    display: block;
    background: #27AE60;
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 4px;
    margin: 0 4px;
    letter-spacing: .02em;
    white-space: nowrap;
    transition: background .15s;
}

.nav-list-cta li a:hover {
    background: #1e9450;
    color: #fff;
    text-decoration: none;
}

/* ===== SERVICE MESSAGE ===== */
.service-message {
    background: #FEF9E7;
    border-bottom: 2px solid #F0C040;
    border-top: 2px solid #F0C040;
    padding: 14px 0;
}

.service-message .container p {
    margin: 0 0 8px;
    color: #5a4000;
    font-size: .95rem;
}

.service-message .container p:last-child { margin-bottom: 0; }

.service-message strong { color: #3a2a00; }

.service-message a { color: #1B5E8E; }

/* ===== MAIN CONTENT ===== */
.site-main {
    flex: 1;
    padding: 32px 0 48px;
}

.breadcrumb {
    font-size: .85rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.breadcrumb a { color: #1B5E8E; }
.breadcrumb span { margin: 0 6px; }

.page-content {
    background: #fff;
    border-radius: 8px;
    padding: 36px 40px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid #e9ecef;
}

.content-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.content-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1B5E8E;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f0f8;
}

.content-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 8px;
}

.content-section p { margin-bottom: 10px; }
.content-section p:last-child { margin-bottom: 0; }

.content-section ul, .content-section ol {
    margin-bottom: 10px;
}

/* ===== HORAIRES IMAGE ===== */
.horaires-image {
    margin-top: 20px;
    text-align: center;
}

.horaires-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ===== MAINTENANCE BOX ===== */
.maintenance-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid #F0C040;
    border-radius: 6px;
    padding: 28px 32px;
    text-align: center;
    max-width: 560px;
    margin: 20px auto 0;
}

.maintenance-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.maintenance-box p {
    margin-bottom: 10px;
    color: #495057;
}

.maintenance-box strong { color: #2c3e50; }

/* ===== MÉDECIN DE GARDE ===== */
.garde-highlight {
    background: #EBF5FB;
    border: 1px solid #AED6F1;
    border-radius: 8px;
    padding: 28px;
    text-align: center;
    max-width: 340px;
    margin: 20px 0;
}

.garde-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1B5E8E;
    line-height: 1;
    margin: 10px 0 6px;
}

.garde-number a {
    color: inherit;
    text-decoration: none;
}

.garde-label {
    font-size: .85rem;
    color: #6c757d;
    margin: 0 !important;
}

/* ===== PRISE DE RENDEZ-VOUS CTA ===== */
.rdv-cta {
    text-align: center;
    margin-top: 28px;
}

.rdv-cta-btn {
    display: inline-block;
    background: #1B5E8E;
    color: #fff;
    text-decoration: none;
    padding: .9rem 2.8rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .01em;
    box-shadow: 0 2px 8px rgba(27,94,142,.25);
    transition: background .15s, box-shadow .15s;
}

.rdv-cta-btn:hover {
    background: #154a72;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(27,94,142,.35);
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a2a3a;
    color: rgba(255,255,255,.7);
    padding: 24px 0;
    font-size: .85rem;
    text-align: center;
}

.site-footer .container > * { margin-bottom: 6px; }
.site-footer .container > *:last-child { margin-bottom: 0; }

.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ===== 404 PAGE ===== */
.page-404 {
    text-align: center;
    padding: 48px 20px;
}

.page-404 h1 {
    font-size: 5rem;
    color: #dee2e6;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.page-404 h2 { color: #495057; margin-bottom: 16px; }
.page-404 p { color: #6c757d; }

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
    .site-header .container { flex-direction: column; align-items: flex-start; gap: 10px; }
    .header-contact { text-align: left; }
    .header-contact a { font-size: .95rem; }

    /* Le container de la nav doit envelopper pour que les listes passent sous le hamburger */
    .site-nav .container { flex-wrap: wrap; }

    .nav-hamburger { display: flex; }

    /* Les deux listes : cachées par défaut, pleine largeur quand ouvertes */
    .nav-list,
    .nav-list-cta {
        display: none;
        flex-direction: column;
        width: 100%;
        margin: 0;
    }

    .nav-list { border-top: 1px solid rgba(255,255,255,.1); }

    .nav-toggle:checked ~ .nav-list  { display: flex; }
    .nav-toggle:checked ~ .nav-list-cta { display: flex; }

    /* Transformation hamburger → croix */
    .nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Items pleine largeur, texte sur une seule ligne */
    .nav-list li,
    .nav-list-cta li { width: 100%; }

    .nav-list li a {
        border-bottom: 1px solid rgba(255,255,255,.06);
        border-left: 3px solid transparent;
        padding: 13px 20px;
        white-space: nowrap;
    }

    .nav-list li a.active,
    .nav-list li a:hover {
        border-bottom-color: rgba(255,255,255,.06);
        border-left-color: #5DB8F0;
    }

    /* Bouton RDV en bas du menu */
    .nav-list-cta li a {
        border-radius: 0;
        margin: 0;
        padding: 13px 20px;
        background: rgba(39,174,96,.25);
        border-left: 3px solid #27AE60;
        border-bottom: 1px solid rgba(255,255,255,.06);
        white-space: nowrap;
    }

    .nav-list-cta li a:hover { background: rgba(39,174,96,.4); color: #fff; }

    .page-content { padding: 24px 20px; }
    .maintenance-box { padding: 24px 20px; }
    .garde-highlight { max-width: 100%; }
    .content-section h2 { font-size: 1.2rem; }
}

@media (max-width: 400px) {
    .site-name-main { font-size: 1.15rem; }
    .site-name-sub { font-size: .78rem; }
}
