/* =====================================
   1) FONTS
===================================== */

@font-face {
    font-family: "Cormorant Garamond";
    src: url("../fonts/CormorantGaramond.ttf") format("truetype");
    font-weight: 300 700;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter.ttf") format("truetype");
    font-weight: 300 700;
    font-style: normal;
}


/* =====================================
   2) VARIABLES
===================================== */

:root {
    --color-bg: #f3f1ed;
    --color-surface: #ffffff;
    --color-text: #24323f;
    --color-primary: #014669;
    --color-accent: #c96b3c;
    --color-muted: #aab4bf;

    --font-title: "Cormorant Garamond", serif;
    --font-body: "Inter", system-ui, sans-serif;

    --space-xs: 8px;
    --space-s: 16px;
    --space-m: 24px;
    --space-l: 40px;
    --space-xl: 64px;

    --radius: 18px;
    --header-height: 70px;
}


/* =====================================
   3) RESET + BASE
===================================== */

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

iframe {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* =====================================
   4) TYPOGRAPHIE
===================================== */

h1, h2, h3, h4 {
    font-family: var(--font-title);
    color: var(--color-primary);
    letter-spacing: 0.04em;
    margin-top: var(--space-l);
    margin-bottom: var(--space-s);
}

h1 {
    font-size: 2.6rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-top: 0;
    margin-bottom: var(--space-m);
    text-align: justify;
    hyphens: auto;
    line-height: 1.55;
}


/* =====================================
   5) LAYOUT UTILITAIRES
===================================== */

.container {
    width: min(1200px, 100% - 48px);
    margin-inline: auto;
}

@media (min-width: 1024px) {
    .container {
        width: min(1400px, 100% - 64px);
    }
}

.section {
    margin-bottom: var(--space-l);
}

.card {
    background-color: var(--color-surface);
    border-radius: var(--radius);
    padding: var(--space-m);
}


/* =====================================
   6) HEADER + NAV
===================================== */

.site-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-muted);
    padding: 8px 0;
    line-height: 1;
}

.site-header .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 46px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--space-m);
    padding: 0;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    font-family: var(--font-body);
    color: var(--color-text);
    font-size: 0.95rem;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.nav-links a[aria-current="page"] {
    border-bottom-color: var(--color-accent);
    color: var(--color-accent);
}

@media (hover: hover) {
    .nav-links a:hover {
        color: var(--color-primary);
    }
}

@media (max-width: 600px) {
    .site-header .container {
        display: flex;
        justify-content: space-between;
        gap: var(--space-s);
    }

    .logo img {
        height: 30px;
    }

    .nav-links {
        gap: var(--space-s);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        font-size: 0.85rem;
    }
}

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.header-title {
    position: relative;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #163b66;
    line-height: 1;
}

.header-title::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -8px;
    width: 36px;
    height: 2px;
    background: #d57a3a;
    border-radius: 999px;
}


/* =====================================
   7) BANNIÈRE ACCUEIL
===================================== */

.BanniereAccueil {
    width: 100%;
    height: 320px;
    background-image: url("../img/BanniereAccueil.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

@media (max-width: 600px) {
    .BanniereAccueil {
        height: 260px;
        background-position: 50% 30%;
    }
}

@media (min-width: 601px) and (max-width: 1023px) {
    .BanniereAccueil {
        height: 340px;
        background-position: 50% 35%;
    }
}

@media (max-width: 1023px) {
    .BanniereAccueil {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
    }
}

@media (min-width: 1024px) {
    .BanniereAccueil {
        height: 480px;
        background-position: 50% 45%;
        margin-top: var(--space-m);
    }
}


/* =====================================
   7bis) INTRO ACCUEIL
===================================== */

.intro {
    margin: 24px 0 40px;
    padding: 24px;
    background-color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(170, 180, 191, 0.6);
    border-radius: var(--radius);
}

.intro-title {
    margin: 0 0 12px;
    text-align: center;
}

.intro-kicker {
    margin: 0 0 12px;
    text-align: center;
    color: var(--color-accent);
    letter-spacing: 0.06em;
    font-size: 0.95rem;
}

.intro-text {
    margin: 0 auto;
    max-width: 70ch;
    text-align: center;
    hyphens: none;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .intro {
        padding: 16px;
        margin: 16px 0 24px;
    }
}


/* =====================================
   8) PLAYLISTS
===================================== */

.playlist-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-m);
}

.playlist-tile {
    border: 1px solid var(--color-muted);
    background: var(--color-surface);
}

.playlist-tile h3 {
    margin: 0 0 var(--space-s);
}

.playlist-tile iframe {
    width: 100%;
    height: 352px;
    border: 0;
    border-radius: 14px;
}

@media (min-width: 768px) {
    .playlist-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =====================================
   9) LIVRES
===================================== */

.books-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-m);
}

.book-item {
    display: flex;
    gap: var(--space-m);
    align-items: flex-start;
    border: 1px solid var(--color-muted);
    border-radius: var(--radius);
    padding: var(--space-m);
    background-color: var(--color-bg);
}

.book-cover {
    width: 110px;
    height: 160px;
    border-radius: 16px;
    object-fit: cover;
}

.book-body {
    flex: 1;
}

.book-body h3 {
    margin: 0 0 var(--space-xs);
}

.book-body p {
    margin: 0;
}

@media (min-width: 1024px) {
    .book-body p {
        text-align: left;
        hyphens: none;
    }
}


/* =====================================
   10) FILMS & SÉRIES
===================================== */

.stack {
    display: grid;
    gap: var(--space-l);
}

.mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-s);
}

.media-title {
    background-color: var(--color-surface);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.media-title img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

@media (min-width: 1024px) {
    .mosaic {
        grid-template-columns: repeat(6, 1fr);
    }
}


/* =====================================
   11) RECETTES
===================================== */

.page-recettes {
    --space-xs: 6px;
    --space-s: 10px;
    --space-m: 16px;
    --space-l: 24px;

    --radius-m: 16px;
    --radius-l: 22px;

    --card-bg: #ffffff;
    --box-bg: #f7ebe6;
    --box-border: rgba(185, 120, 95, 0.25);

    --title: #163b66;
    --accent: #d57a3a;
    --text: #0f172a;

    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.recipe-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-l);
}

.recipe.card {
    background: var(--card-bg);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow);
    padding: clamp(18px, 2vw, 28px);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.recipe-title {
    margin: 0 0 var(--space-m);
    color: var(--title);
    font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.recipe-title::after {
    content: "";
    width: 70px;
    height: 3px;
    background: var(--accent);
    border-radius: 999px;
    display: block;
    margin-top: 12px;
}

.recipe-layout {
    display: grid;
    gap: var(--space-l);
}

.recipe-img {
    width: 100%;
    border-radius: var(--radius-m);
    object-fit: cover;
}

.recipe-box {
    background: var(--box-bg);
    border: 1px solid var(--box-border);
    border-radius: var(--radius-m);
    padding: var(--space-l);
}

.recipe-box h4 {
    margin: 0 0 var(--space-m);
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.recipe-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
        "title"
        "media"
        "ingredients"
        "steps";
}

.recipe-title { grid-area: title; }
.recipe-media { grid-area: media; }
.recipe-ingredients { grid-area: ingredients; }
.recipe-steps { grid-area: steps; }

@media (min-width: 1024px) {
    .page-recettes { --recipe-row-h: 420px; }

    .recipe-layout {
        gap: 20px;
        align-items: stretch;
    }

    .recipe--split .recipe-layout {
        grid-template-columns: 1.25fr 1fr 1fr;
        grid-template-rows: auto var(--recipe-row-h);
        grid-template-areas:
            "title title title"
            "media ingredients steps";
    }

    .recipe--triple .recipe-layout {
        grid-template-columns: 1fr 1fr 1.25fr;
        grid-template-rows: auto var(--recipe-row-h);
        grid-template-areas:
            "title title title"
            "ingredients steps media";
    }

    .recipe-media,
    .recipe-ingredients,
    .recipe-steps {
        height: var(--recipe-row-h);
    }

    .recipe-img {
        height: 100%;
    }

    .recipe-box {
        overflow: auto;
    }
}

.recipes {
    padding-top: 32px;
}
