/* =========================================================
   LE CAFÉ DES MOTS - MAIN STYLESHEET
   Organized by component for easy editing.
   ========================================================= */

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

/* =========================================================
   2. DESIGN VARIABLES
   Change colors/fonts here to update the whole website.
   ========================================================= */
:root {
    --cream: #f7f3ec;
    --paper: #fffdf9;
    --ink: #17201c;
    --green: #18362c;
    --terra: #b9482d;
    --line: #ded6ca;
    --muted: #68665f;

    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'DM Sans', Arial, sans-serif;
    --script: 'Caveat', cursive;
}

/* =========================================================
   3. GLOBAL / RESET
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
}
a { text-decoration: none; color: inherit; }
img { width: 100%; display: block; object-fit: cover; }
.container { width: min(1180px, calc(100% - 48px)); margin: auto; }
h1, h2, h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.05;
}
p { line-height: 1.65; }

/* =========================================================
   4. BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    background: var(--terra);
    color: #fff;
    border: 1px solid var(--terra);
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn:hover { background: #963a24; transform: translateY(-1px); }
.btn.outline { background: transparent; color: var(--terra); }
.btn.small { padding: 10px 14px; font-size: 13px; }

/* =========================================================
   5. HEADER / NAVIGATION
   Moved to css/header.css (shared by every page).
   ========================================================= */

/* =========================================================
   6. HERO
   ========================================================= */
.hero {
    min-height:540px;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: none;
}
.hero-media,
.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media img {
    object-fit: cover;
    /* object-fit: contain; */
    object-position: center;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(10,16,13,.75), rgba(10,16,13,.45), rgba(10,16,13,.08));
}
.hero-inner {
    width: min(1180px, calc(100% - 48px));
    margin: auto;
    position: relative;
    z-index: 2;
}
.hero-copy {
    max-width: 540px;
    padding: 60px 20px 70px;
    transform: translateY(-50px);
}
.script { font-family: var(--script); font-size: 28px; }
.hero h1 { font-size: clamp(54px, 7vw, 90px); letter-spacing: -2px; }
.hero p { max-width: 520px; font-family: var(--serif); font-size: 24px; }
.hero-line { width: 48px; height: 3px; margin: 25px 0; background: var(--terra); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .light { color: var(--terra); background: #fff; }
.hero-script {
    transform: translateY(-20px);
}
/* =========================================================
   7. BOOKING CARD
   Edit TOP and RIGHT to move it on desktop.
   ========================================================= */
.booking-card {
    position: absolute;
    z-index: 3;
    top: 120px;
    right: 100px;
    width: 400px;
    padding: 12px;
    background: #fff;
    color: var(--ink);
    border-radius: 5px;
    box-shadow: 0 18px 50px #0003;
}
.booking-card h3 { font-size: 27px; }
.booking-txt { margin-bottom: 0; text-align: center; font-size: 12px !important; color: #555 !important; }
.booking-icon { width: 46px; height: 46px; margin: 12px auto 16px; object-fit: contain; }
.booking-card .btn { width: 100%; }
.booking-note { margin-bottom: 0; text-align: center; font-size: 11px !important; color: #777 !important; }

/* =========================================================
   8. FEATURE STRIP
   ========================================================= */
.strip { background: #f3eee6; border-bottom: 1px solid var(--line); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item {
    padding: 23px 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-right: 1px solid #d8d0c5;
}
.strip-item:last-child { border-right: 0; }
.strip-item strong { display: block; font-family: var(--serif); }
.strip-item span { font-size: 12px; color: #666; }
.strip-icon { width: 46px; height: 46px; flex: none; object-fit: contain; }
.icon { display: none; }

/* =========================================================
   9. GENERAL SECTIONS
   ========================================================= */
.section { padding: 78px 0; }
.section-head { position: relative; margin-bottom: 38px; text-align: center; }
.section-head h2 { font-size: 43px; }
.underline { width: 45px; height: 3px; margin: 15px auto; background: var(--terra); }
.handnote {
    position: absolute;
    top: 0;
    right: 0;
    font-family: var(--script);
    font-size: 31px;
    color: #795b49;
    text-align: left;
    transform: rotate(-4deg);
}

/* =========================================================
   10. ACTIVITY CARDS
   Image + icon + text are separate DOM objects.
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { overflow: hidden; background: #fff; border: 1px solid var(--line); }
.card-image { width: 100%; height: 235px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-content { position: relative; padding: 0 22px 22px; }
.card-icon { width: 64px; height: 64px; position: relative; z-index: 2; margin-top: -30px; }
.card-icon img { width: 64px; height: 64px; object-fit: contain; }
.card-text { padding-top: 8px; }
.card-text h3 { margin: 0 0 9px; font-size: 27px; }
.card-text p { margin: 0 0 16px; color: #555; font-size: 14px; }
.link { color: var(--terra); font-weight: 600; }

/* =========================================================
   11. EVENTS
   ========================================================= */
.events { background: var(--cream); }
.events-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 25px; }
.events-head h2 { font-size: 40px; }
.event-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.event-card { background: #fff; border: 1px solid var(--line); }
.event-image { width: 100%; height: 135px; overflow: hidden; }
.event-image img { width: 100%; height: 100%; object-fit: cover; }
.event-body { padding: 14px; }
.event-date { color: var(--terra); font-weight: 700; font-size: 12px; }
.event-title { margin: 7px 0; font-family: var(--serif); font-size: 19px; }
.event-meta { margin-bottom: 13px; color: #666; font-size: 12px; }
.event-card .btn { width: 100%; font-size: 12px; }

/* =========================================================
   12. NEWS
   ========================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card { display: grid; grid-template-columns: 105px 1fr; background: #fff; border: 1px solid var(--line); }
.news-image { width: 100%; height: 100%; min-height: 150px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }
.news-copy { padding: 16px; }
.date { color: #888; font-size: 11px; }
.news-copy h3 { margin: 7px 0; font-size: 19px; }
.news-copy p { margin: 0 0 8px; color: #666; font-size: 12px; }

/* =========================================================
   13. SUPPORT / DONATION
   Compact section - adjust PADDING to change its height.
   ========================================================= */
.support { padding: 30px 0; }
.support-box {
    padding: 30px 25px;
    background: #f1e8dc;
    border: 1px solid #e0d4c5;
    text-align: center;
}
.support-box h2 { margin: 5px 0 8px; font-size: 39px; }
.support-box p { max-width: 680px; margin: 8px auto 18px; color: #555; line-height: 1.45; }
/* =========================================================
   14. FOOTER - VERY COMPACT
   ========================================================= */

.footer {
    padding: 10px 0 8px;
    background: var(--green);
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 20px;
}

/* Footer logo */

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Footer navigation */

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;

    font-size: 12px;
}

.footer-links a:hover {
    color: #ddd;
}

/* Social */

.social {
    display: flex;
    align-items: center;
    gap: 10px;

    text-align: right;
    white-space: nowrap;
}

.social > div:first-child {
    font-size: 12px;
}

.socials {
    display: flex;
    align-items: center;
    gap: 6px;
}

.socials a {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border: 1px solid #dce2de;
    border-radius: 50%;

    font-size: 12px;
}

/* Legal */

.legal {
    margin-top: 8px;
    padding-top: 6px;

    border-top: 1px solid #ffffff26;

    text-align: center;

    color: #aeb8b1;
    font-size: 9px;
}

/* =========================================================
   15. SOCIAL ICONS
   ========================================================= */

.socials a {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border: 1px solid #dce2de;
    border-radius: 50%;
}

.socials a img {
    width: 17px;
    height: 17px;

    object-fit: contain;
}

/* =========================================================
   RESPONSIVE SIZING OVERRIDES
   Content and visual identity are preserved.
   ========================================================= */

html {
    min-width: 320px;
}

body {
    overflow-x: hidden;
}

.container,
.hero-inner {
    width: min(100% - clamp(24px, 4vw, 48px), 1180px);
}

/* Fluid typography and spacing */
.hero h1 {
    font-size: clamp(42px, 6vw, 90px);
}

.hero p {
    font-size: clamp(17px, 1.8vw, 24px);
}

.section {
    padding-block: clamp(42px, 6vw, 78px);
}

.section-head h2,
.events-head h2 {
    font-size: clamp(30px, 3.4vw, 43px);
}

.support-box h2 {
    font-size: clamp(28px, 3.1vw, 39px);
}

/* Main grids adapt naturally */
.cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(16px, 2vw, 28px);
}

.event-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(14px, 1.5vw, 20px);
}

.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(16px, 2vw, 28px);
}

.card-image {
    height: clamp(190px, 20vw, 235px);
}

.event-image {
    height: clamp(125px, 12vw, 150px);
}

/* Booking card stays within the hero on medium screens */
@media (max-width: 1100px) {
    .booking-card {
        right: 24px;
        width: min(360px, 38vw);
    }

    .hero-copy {
        max-width: 55%;
    }
}

/* Tablet layout */
@media (max-width: 900px) {
    .hero {
        min-height: auto;
    }

    .hero-inner {
        display: flex;
        flex-direction: column;
    }

    .hero-copy {
        max-width: 100%;
        padding: clamp(45px, 7vw, 70px) 0 35px;
        transform: none;
    }

    .hero-script {
        display: none;
    }

    .booking-card {
        position: relative;
        top: auto;
        right: auto;
        width: min(100%, 520px);
        margin: 0 auto 28px;
    }

    .strip-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .strip-item:nth-child(2) {
        border-right: 0;
    }

    .strip-item:nth-child(-n + 2) {
        border-bottom: 1px solid #d8d0c5;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo,
    .social {
        justify-content: center;
        text-align: center;
    }
}

/* Phones */
@media (max-width: 600px) {
    .container,
    .hero-inner {
        width: calc(100% - 30px);
    }

    .hero-media {
        height: clamp(300px, 95vw, 440px);
    }

    .hero-copy {
        padding-top: 35px;
    }

    .hero h1 {
        font-size: clamp(40px, 12vw, 62px);
    }

    .hero p {
        max-width: 100%;
    }

    .booking-card {
        width: 100%;
        padding: clamp(18px, 5vw, 26px);
    }

    .booking-card h3 {
        font-size: clamp(22px, 6vw, 27px);
    }

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

    .strip-item,
    .strip-item:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #d8d0c5;
    }

    .strip-item:last-child {
        border-bottom: 0;
    }

    .cards,
    .event-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        grid-template-columns: minmax(85px, 30%) 1fr;
    }

    .events-head {
        display: block;
    }

    .events-head .link {
        display: inline-block;
        margin-top: 12px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .hero h1 {
        font-size: 39px;
    }

    .section-head h2,
    .events-head h2 {
        font-size: 29px;
    }
}

/* =========================================================
   PROCHAINS ÉVÉNEMENTS - cards built by js/main.js from the calendar
   ========================================================= */
.event-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); /* one event = one normal card */
}
.event-card { display: flex; flex-direction: column; }
.event-image { position: relative; }
.event-type {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 4px 9px;
    background: rgba(255, 253, 249, .93);
    color: var(--terra);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.event-date { text-transform: uppercase; letter-spacing: .04em; }
.event-meta { margin-bottom: 8px; line-height: 1.45; }
.event-text { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.event-sponsors { margin: 0; color: var(--muted); font-size: 12px; font-style: italic; line-height: 1.45; }
.event-empty { grid-column: 1 / -1; margin: 0; padding: 26px; border: 1px dashed var(--line); background: #fff; color: var(--muted); text-align: center; }

/* "← 1–4 sur 9  Plus d'événements →" above the event cards */
.events-nav { display: flex; align-items: center; gap: 12px; }
.events-nav[hidden] { display: none; }
.events-nav__btn {
    padding: 9px 14px;
    border: 1px solid var(--terra);
    border-radius: 4px;
    background: #fff;
    color: var(--terra);
    font: 700 14px var(--sans);
    cursor: pointer;
}
.events-nav__btn:hover:not(:disabled) { background: var(--terra); color: #fff; }
.events-nav__btn:disabled { opacity: .35; cursor: default; }
.events-nav__count { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) {
    .events-head { display: block; }
    .events-nav { margin-top: 14px; flex-wrap: wrap; }
    .events-nav__more { flex: 1; }
}
