/* =========================================================
   LE CAFÉ DES MOTS - SHARED HEADER / TOP MENU
   ---------------------------------------------------------
   This is the ONLY place where the top menu is styled.
   Every page links this file:   <link rel="stylesheet" href="…/css/header.css">
   and uses the same markup (see README.md → "Top menu").

   All class names are prefixed with "site-header" on purpose:
   they can never clash with the .container / .btn / .logo / .nav
   classes that individual pages define for their own content
   (for example .btn is the full-width submit button on the
   contact page).

   To change the menu on ALL pages, edit this file only.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

/* ---------------------------------------------------------
   1. HEADER TOKENS - change the menu's look here
   --------------------------------------------------------- */
.site-header {
    --sh-bg: #fffdf9;
    --sh-line: #eee8df;
    --sh-ink: #17201c;
    --sh-accent: #b9482d;
    --sh-accent-dark: #963a24;
    --sh-font: 'DM Sans', Arial, sans-serif;
}

/* ---------------------------------------------------------
   1b. ANCHOR OFFSET
   The menu is sticky, so a link like galerie.html#houmous would
   land with its title hidden behind it. This keeps every anchor
   target clear of the menu, on every page.
   Value = menu height at that screen size + ~20px.
   (menu heights: 81px desktop, up to 137px tablet, up to 155px
   phone - if you add menu items, re-check these numbers)
   --------------------------------------------------------- */
html {
    scroll-padding-top: 100px;
}

@media (max-width: 1000px) {
    html {
        scroll-padding-top: 158px;
    }
}

@media (max-width: 600px) {
    html {
        scroll-padding-top: 176px;
    }
}

/* ---------------------------------------------------------
   2. BAR
   Font/size/line-height are set here so the menu looks the
   same on every page, whatever the page body uses.
   --------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--sh-bg);
    border-bottom: 1px solid var(--sh-line);
    color: var(--sh-ink);
    font-family: var(--sh-font);
    font-size: 16px;
    line-height: normal;
}

.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-header a {
    text-decoration: none;
}

.site-header__inner {
    width: min(100% - clamp(24px, 4vw, 48px), 1180px);
    margin: auto;
    min-height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 25px);
}

/* ---------------------------------------------------------
   3. LOGO (overlaps the content below on large screens)
   --------------------------------------------------------- */
.site-header__logo {
    position: absolute;
    left: 0;
    top: 0px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: flex-start;
    background: #fff;
    z-index: 30;
}

.site-header__logo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

/* ---------------------------------------------------------
   4. MENU LINKS (margin-left leaves room for the logo)
   --------------------------------------------------------- */
.site-header__links {
    display: flex;
    gap: clamp(12px, 2vw, 25px);
    margin-left: 185px;
    font-size: clamp(12px, 1.15vw, 14px);
}

.site-header__links a {
    color: inherit;
    white-space: nowrap; /* a label ("Lecture bilingue") never breaks onto two lines */
}

.site-header__links a:hover,
.site-header__links a[aria-current="page"] {
    color: var(--sh-accent);
}

/* ---------------------------------------------------------
   5. ACTION BUTTONS (Réserver / Supportez-nous)
   --------------------------------------------------------- */
.site-header__actions {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);
    margin-left: auto;
}

.site-header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px clamp(10px, 1.5vw, 20px);
    background: var(--sh-accent);
    color: #fff;
    border: 1px solid var(--sh-accent);
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.site-header__btn:hover {
    background: var(--sh-accent-dark);
    transform: translateY(-1px);
}

.site-header__btn--outline,
.site-header__btn--outline:hover {
    background: transparent;
    color: var(--sh-accent);
}

.site-header__icon {
    width: 20px;
    height: 20px;
    max-width: none;
    display: inline-block;
    object-fit: contain;
    flex: none;
}

/* ---------------------------------------------------------
   6. RESPONSIVE (widest → narrowest)
   --------------------------------------------------------- */
@media (max-width: 1100px) {
    .site-header__logo {
        width: 105px;
        height: 105px;
    }

    .site-header__links {
        margin-left: 135px;
    }
}

/* Tablet: logo goes back into the flow, menu goes on its own row below.
   (1000px, not lower: with 7 menu items the single row stops fitting there) */
@media (max-width: 1000px) {
    .site-header__inner {
        min-height: auto;
        padding-block: 12px;
        flex-wrap: wrap;
    }

    .site-header__logo {
        position: relative;
        inset: auto;
        width: 100px;
        height: 78px;
        margin-right: auto;
    }

    .site-header__links {
        order: 3;
        width: 100%;
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Phones */
@media (max-width: 600px) {
    .site-header__inner {
        width: calc(100% - 30px);
    }

    .site-header__btn {
        padding: 9px 10px;
        font-size: 11px;
    }

    .site-header__icon {
        width: 15px;
        height: 15px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .site-header__inner {
        gap: 8px;
    }

    .site-header__logo {
        width: 86px;
        height: 70px;
    }

    .site-header__actions {
        gap: 4px;
    }

    .site-header__btn {
        padding-inline: 8px;
        font-size: 10px;
    }
}

/* =========================================================
   PAGE TITLE BAND  -  the band just under the menu, the same on every page
   ---------------------------------------------------------
   Every page (except the homepage, which has its big photo) starts with:

     <section class="page-head">
       <div class="page-head__inner">
         <p class="page-head__eyebrow">Optional small line</p>     (optional)
         <h1 class="page-head__title">Title</h1>
         <div class="page-head__line"></div>
         <p class="page-head__intro">One or two sentences.</p>
       </div>
     </section>

   Fonts, sizes and spacing are set here, so the band looks the same
   whatever the page's own stylesheet does. Change it here only.
   ========================================================= */
.page-head {
    --ph-bg: #f7f3ec;
    --ph-line: #ded6ca;
    --ph-ink: #17201c;
    --ph-muted: #4f4d47;
    --ph-accent: #b9482d;
    padding: clamp(46px, 6.5vw, 84px) 0 clamp(36px, 5vw, 58px);
    background: var(--ph-bg);
    border-bottom: 1px solid var(--ph-line);
    color: var(--ph-ink);
    text-align: center;
}

.page-head__inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.page-head__eyebrow {
    margin: 0 0 14px;
    color: var(--ph-accent);
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.page-head__title {
    margin: 0;
    color: var(--ph-ink);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(38px, 5.6vw, 62px);
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.08;
}

.page-head__title span {
    color: var(--ph-accent);
}

.page-head__line {
    width: 45px;
    height: 3px;
    margin: 18px auto 22px;
    background: var(--ph-accent);
}

.page-head__intro {
    max-width: 700px;
    margin: 0 auto;
    color: var(--ph-muted);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.6;
}

/* optional row of links or a button under the intro */
.page-head__links {
    margin: 20px 0 0;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
}

.page-head__links a {
    color: var(--ph-accent);
    text-decoration: none;
}

.page-head__links a:hover {
    text-decoration: underline;
}

.page-head__links a + a {
    margin-left: 22px;
}
