/* Délices d'Asie — thème mobile-first, CSS consolidé. */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;500;600;700&family=Maven+Pro:wght@400;500;600;700&display=swap');
@import url('./fonts.css');
@import url('./page-banner.css');

:root {
    --font-body: 'Maven Pro', sans-serif;
    --font-title: 'Josefin Sans', sans-serif;
    --font-h1: 'chinchanmedium', cursive;
    --ink: #020404;
    --white: #fff;
    --paper: #fbf7f0;
    --gold: #d5a43b;
    --red: #c60c17;
    --hero-image: url('../img/fond-mobile.webp');
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

h1 {
    font-family: var(--font-h1);
}

h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-title);
    line-height: 1.2;
}

h2 {
    font-size: clamp(26px, 2.4vw, 32px);
    font-weight: 600;
}

h3 {
    font-size: clamp(20px, 1.7vw, 23px);
    font-weight: 500;
}

/* ==============================
   BOUTONS
   ============================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .7rem;
    border: 1px solid transparent;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color .2s ease,
                border-color .2s ease,
                color .2s ease;
}

/* Bouton principal */
.btn-primary {
    border-color: var(--gold);
    background: rgba(255, 250, 241, .68);
    color: var(--ink);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--gold);
    color: var(--ink);
}

/* Bouton secondaire */
.btn-secondary {
    border-color: var(--gold);
    background: transparent;
    color: var(--ink);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: rgba(201, 164, 107, .15);
}

.home-welcome__actions {
    display: flex;
    justify-content: center;
}

/* Navigation et éléments communs */
.skip-link {
    position: absolute;
    z-index: 50;
    top: -100px;
    left: 1rem;
    padding: .7rem 1rem;
    background: #fff;
    color: #000;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 12;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.1rem clamp(1rem, 3vw, 3rem);
    pointer-events: none;
}

.site-header a,
.site-header button,
.site-nav {
    pointer-events: auto;
}

.site-header__name {
    font-family: var(--font-title);
    font-size: 1.3rem;
    text-decoration: none;
}

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

.single .site-header__name {
    display: none;
}

.nav-toggle {
    gap: 10px;
}

.nav-toggle__label {
    display: none;
}

.nav-toggle__icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 18px;
}

.nav-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:first-child {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:last-child {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle:focus-visible,
.site-nav a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.site-nav {
    position: absolute;
    right: 1rem;
    top: 5rem;
    display: none;
    min-width: 11rem;
    padding: 1rem 1.2rem;
    border-radius: .75rem;
    background: rgba(255, 248, 238, .96);
    box-shadow: 0 12px 30px #43302122;
}

.site-nav.is-open {
    display: block;
}

.site-nav ul {
    display: grid;
    gap: .9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav .current-menu-item > a {
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 5px;
}

/* Hero — base mobile */
.hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 450px;
    overflow: hidden;
    background-color: #f8f1e8;
    background-image: var(--hero-image);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center bottom;
}

.hero__birds,
.hero__petals {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero__birds {
    z-index: 1;
}

.hero__petals {
    z-index: 2;
}

.hero__branch {
    position: absolute;
    z-index: 3;
    top: -7%;
    left: -3%;
    display: block;
    width: min(84vw, 400px);
    height: auto;
    aspect-ratio: 2000 / 944.13;
    border: 0;
    pointer-events: none;
    user-select: none;
    transform-origin: 0% 50%;
    animation: branch-wind 5s ease-in-out infinite;
}

@keyframes branch-wind {
    0%,
    100% {
        transform: rotate(0deg);
    }

    30% {
        transform: rotate(-.3deg);
    }

    70% {
        transform: rotate(.3deg);
    }
}

/* Bloc logo : même alignement D + H1 + baseline à toute largeur. */
.hero__branding {
    position: absolute;
    z-index: 5;
    top: 39%;
    left: 46%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: min(100vw, 620px);
    padding: 0;
    text-align: left;
    pointer-events: none;
    transform: translate(-50%, -50%);
    container-type: inline-size;
}

.hero__monogram {
    display: block;
    flex: 0 0 27%;
    width: 27%;
    min-width: 0;
    height: auto;
    transform: translateY(-1cqw);
    filter: drop-shadow(0 1px 2px rgba(255, 250, 245, .3));
}

.hero__signature {
    flex: 0 0 auto;
    min-width: 0;
    margin-left: -3cqw;
    transform: translateY(1cqw);
    text-align: left;
}

.hero__signature h1 {
    position: relative;
    display: block;
    width: max-content;
    margin: 0;
    font-family: var(--font-h1);
    font-size: 13cqw;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -.045em;
    white-space: nowrap;
}

/* Le D du H1 est conservé pour le texte accessible / SEO. */
.hero__initial {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Toujours calée à droite de « Asie », même si elle dépasse à gauche. */
.hero__baseline {
    position: absolute;
    top: 100%;
    right: 0;
    display: block;
    width: max-content;
    margin-top: -2%;
    font-family: var(--font-title);
    font-size: clamp(14px, 4.5cqw, 16px);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: nowrap;
    text-align: right;
}

.hero__cta {
    position: absolute;
    z-index: 8;
    bottom: max(5.5%, env(safe-area-inset-bottom));
    left: 50%;
    white-space: nowrap;
    transform: translateX(-50%);
}

/* Pétales animés par hero.js */
.hero__petal {
    position: absolute;
    top: var(--start-y, -5%);
    left: var(--start-x, 10%);
    width: var(--size, 22px);
    height: auto;
    opacity: 0;
    will-change: transform, opacity;
    animation: petal-drift var(--duration, 16s) linear var(--delay, 0s) infinite;
}

@keyframes petal-drift {
    0% {
        opacity: 0;
        transform: translate3d(0, -10px, 0) rotate(var(--start-rotation, 0deg)) scale(.9);
    }

    8% {
        opacity: var(--alpha, .92);
    }

    27% {
        transform: translate3d(calc(var(--wind-x, 100px) * .2), 24svh, 0) rotate(calc(var(--end-rotation, 360deg) * .19)) scale(.98);
    }

    56% {
        opacity: var(--alpha, .92);
        transform: translate3d(calc(var(--wind-x, 100px) * .67), 57svh, 0) rotate(calc(var(--end-rotation, 360deg) * .58)) scale(.86);
    }

    89% {
        opacity: var(--alpha, .92);
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--wind-x, 100px), 112svh, 0) rotate(var(--end-rotation, 360deg)) scale(.7);
    }
}

/* Oiseaux animés par hero.js */
.hero-bird {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform-origin: center;
    will-change: transform, opacity;
}

.hero-bird svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.hero-bird path {
    fill: #38322f;
}

/* Contenu et pied de page */
main.page {
    width: min(1080px, calc(100% - 0.5rem));
    min-height: 70vh;
    margin: 0 auto;
    padding: 0rem 0 4rem;
    line-height: 1.6;
}

.site-footer {
    padding: 1.4rem 1rem;
    color: #74675d;
    font-size: .82rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}



/* ==============================
   ACCUEIL - BIENVENUE
   ============================== */

.home-welcome {
    padding: 4rem 1rem 2rem;
    background: var(--paper);
}

.home-welcome__container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.home-welcome__content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.home-welcome h2 {
    margin: 0 0 1.5rem;
    font-family: var(--font-title);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 600;
}

.home-welcome p {
    margin: 0 0 1rem;
    line-height: 1.7;
}

.home-welcome .btn {
    margin-top: 1rem;
}

.home-welcome__illustration {
    display: none;
}

@media (min-width: 800px) {
    .home-welcome {
        padding: 5rem 2rem 3rem;
    }

    .home-welcome__container {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: center;
        gap: 3rem;
        max-width: 950px;
    }

    .home-welcome__illustration {
        display: block;
    }

    .home-welcome__illustration img {
        display: block;
        width: 100%;
        height: auto;
    }

    .home-welcome__content {
        max-width: 650px;
        margin: 0;
        text-align: left;
    }
}


/* ==============================
   ACCUEIL - DÉCOUVRIR LA CARTE
   ============================== */

.home-menu {
    padding: 4rem 1rem;
    background: var(--paper);
}

.home-menu__container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.home-menu__header {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
}

.home-menu__header h2 {
    margin: 0 0 1rem;
    font-family: var(--font-title);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 600;
}

.home-menu__header p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.home-menu__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.home-menu__item {
    min-width: 0;
    text-align: center;
}

.home-menu__illustration {
    position: relative;
    width: min(105%, 420px);
    aspect-ratio: 180 / 70;
    margin: 0 0 1rem 50%;
    transform: translateX(var(--shift, -50%));
    container-type: inline-size;
}

.home-menu__illustration--plats,
.home-menu__illustration--desserts {
    --shift: -46%;
}

.home-menu__illustration img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-menu__illustration h3 {
    position: absolute;
    top: 62%;
    margin: 0;
    color: var(--red);
    font-family: var(--font-h1);
    font-size: clamp(22px, 11cqw, 45px);
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.home-menu__illustration--entrees h3 {
    left: 43%;
}

.home-menu__illustration--plats h3 {
    left: 48%;
}

.home-menu__illustration--desserts h3 {
    left: 44%;
}


.home-menu__photo {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.home-menu__item p {
    max-width: 320px;
    margin: 1.25rem auto 0;
    line-height: 1.5;
}

.home-menu__footer {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}


/* Tablette : photo à gauche, texte à droite */
@media (min-width: 600px) {
    .home-menu__item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "photo illustration"
            "photo description";
        gap: 0 1.5rem;
        align-items: center;
    }
    .home-menu__item:nth-child(odd) {
    grid-template-areas:
        "illustration photo"
        "description photo";
    }

    .home-menu__illustration {
        grid-area: illustration;
        width: 100%;
        margin: 0;
        transform: none;
    }

    .home-menu__photo {
        grid-area: photo;
        height: 100%;
    }

    .home-menu__item p {
        grid-area: description;
        margin: 0 auto;
    }
}

/* Desktop : les trois catégories côte à côte */
@media (min-width: 800px) {
    .home-menu__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }

    .home-menu__item {
        display: block;
    }

    .home-menu__illustration {
        margin-bottom: 1rem;
    }

    .home-menu__photo {
        height: auto;
    }

    .home-menu__item p {
        margin: 1.25rem auto 0;
    }
}

/* Desktop */
@media (min-width: 1150px) {
    .home-menu {
        padding: 5rem 2rem;
    }

    .home-menu__grid {
        gap: 2rem;
    }
}


/* Écrans mobile > 350 px */
@media (min-width: 350px) {
    .hero__baseline {
        font-size: clamp(16px, 4.5cqw, 35px);   
    }
}

@media (max-width: 719px) {
    .hero-bird:nth-child(3) {
        display: none;
    }
}

/* Écrans tablette et desktop : bloc complet = 1/3 de l'écran. */
@media (min-width: 720px) {

    .hero {
        background-position: center calc(100% + 85px);
    }

    .site-header {
        padding-top: 1.6rem;
    }

    .hero__branch {
        top: -5%;
        left: -2%;
        width: min(60vw, 800px);
    }

    .hero__branding {
        top: 40%;
        width: clamp(620px, calc(476px + 20vw), 860px);
    }

    .hero__cta {
        bottom: 10%;
        
    }
    .nav-toggle__label {
        display: inline;
    }
}


@media (min-width: 1150px) {
    :root {
        --hero-image: url('../img/fond-desktop.webp');
    }
    .hero {
        background-position: center center;
    }
    .hero__branch {
        top: -15%;
    }
}


@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero__petal {
        opacity: 0;
        animation: none;
    }

    .hero__birds {
        display: none;
    }

    .hero__branch {
        animation: none;
    }

    .nav-toggle__icon span {
        transition: none;
    }
}
