/* Les Artisans de la Soif — Public styles */

:root {
    --cream: #f4efe6;
    --cream-dark: #e8e0d4;
    --brown: #3d2914;
    --brown-light: #5c4030;
    --sage: #6b7f5e;
    --sage-light: #8a9d7c;
    --olive: #4a5240;
    --charcoal: #1e1c1a;
    --burgundy: #722f37;
    --gold: #b8956a;
    --white: #faf8f5;

    /* 2 polices max : serif = titres, sans = tout le reste */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Outfit', system-ui, sans-serif;

    --header-h: 76px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow: 0 8px 32px rgba(30, 28, 26, 0.12);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--brown);
    background: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: min(1120px, 92vw);
    margin-inline: auto;
}

/* Grain overlay */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.header:not(.scrolled) .nav__links a {
    color: var(--white);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.header:not(.scrolled) .nav__links a::after {
    background: var(--white);
}

.header:not(.scrolled) .nav__toggle span {
    background: var(--white);
}

.header.scrolled {
    background: rgba(244, 239, 230, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 41, 20, 0.08);
}

.header.scrolled .nav__links a {
    text-shadow: none;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.nav__links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    padding: 0.25rem 0;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--burgundy);
    transition: width 0.3s var(--ease);
}

.nav__links a:hover::after { width: 100%; }

.nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.nav__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brown);
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 1px;
}

.nav__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    will-change: transform;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 80% at 50% 45%, rgba(20, 18, 16, 0.82) 0%, rgba(20, 18, 16, 0.45) 70%),
        linear-gradient(
            180deg,
            rgba(20, 18, 16, 0.72) 0%,
            rgba(20, 18, 16, 0.55) 45%,
            rgba(20, 18, 16, 0.88) 100%
        );
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: calc(var(--header-h) + 2rem) 0 4rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.hero__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__text {
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero__logo {
    position: relative;
    margin-bottom: 1.75rem;
}

.hero__logo::before {
    content: '';
    position: absolute;
    inset: -12px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    border: 1px solid rgba(184, 149, 106, 0.55);
    pointer-events: none;
}

.hero__logo::after {
    content: '';
    position: absolute;
    inset: -24px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    border: 1px solid rgba(184, 149, 106, 0.25);
    pointer-events: none;
}

.hero__logo img {
    width: clamp(160px, 32vw, 260px);
    height: clamp(160px, 32vw, 260px);
    margin: 0 auto;
    object-fit: cover;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow:
        0 0 0 4px rgba(184, 149, 106, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.45),
        0 0 80px rgba(184, 149, 106, 0.12);
}

.hero__site-name,
.hero__title,
.hero__subtitle {
    font-family: inherit;
    font-weight: 400;
    line-height: 1.35;
    color: var(--white);
}

.hero__site-name {
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    max-width: 16ch;
}

.hero__title {
    font-size: clamp(1.15rem, 2.8vw, 1.4rem);
    max-width: 28ch;
}

.hero__subtitle {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    max-width: 40ch;
    opacity: 0.85;
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 24px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.hero__scroll span {
    width: 3px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.3; }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s;
}

.btn--primary {
    background: var(--burgundy);
    color: var(--white);
}

.btn--primary:hover {
    background: #8a3a44;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(114, 47, 55, 0.35);
}

/* Sections */
.section {
    padding: 6rem 0;
}

.section--cream { background: var(--cream); }
.section--dark { background: var(--charcoal); color: var(--cream); }
.section--sage { background: var(--sage); color: var(--white); }

/* Filigrane houblon extrait du logo */
.section--pattern {
    position: relative;
    isolation: isolate;
}

.section--pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/img/pattern-hops.png') center / cover no-repeat;
    opacity: 0.13;
    pointer-events: none;
}

.section--pattern > .container {
    position: relative;
    z-index: 1;
}

.section__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 0.75rem;
}

.section__label--light { color: var(--gold); }

.section__title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
}

.section__title--light { color: var(--cream); }

.section__intro {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 50ch;
    opacity: 0.85;
}

.section__intro--light { color: var(--cream-dark); }

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__header .section__intro {
    margin: 0.5rem auto 0;
}

.section__text p {
    margin-bottom: 1rem;
    color: var(--brown-light);
}

.section__text p:last-child { margin-bottom: 0; }

/* About */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__visual {
    position: relative;
}

.about__frame {
    position: relative;
    overflow: hidden;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    aspect-ratio: 1;
    max-width: 420px;
    margin: 0 auto;
}

.about__frame-layer {
    position: absolute;
    inset: 0;
}

.about__frame-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 38% 42%;
    transform: scale(1.12);
}

.about__accent {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    width: 60%;
    height: 60%;
    border: 1px solid var(--gold);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    z-index: -1;
    opacity: 0.5;
}

.about__features {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.about__features li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.about__icon {
    color: var(--burgundy);
    font-size: 0.6rem;
    margin-top: 0.5rem;
}

.about__features strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.about__features p {
    font-size: 0.9rem;
    color: var(--brown-light);
}

/* Menu */
.menu-group { margin-bottom: 3rem; }
.menu-group:last-child { margin-bottom: 0; }

.menu-group__title {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(184, 149, 106, 0.3);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.menu-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(244, 239, 230, 0.08);
    transition: border-color 0.3s, transform 0.3s var(--ease);
}

.menu-card:hover {
    border-color: rgba(184, 149, 106, 0.3);
    transform: translateY(-3px);
}

.menu-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.menu-card h4 {
    font-size: 1.25rem;
    color: var(--cream);
}

.menu-card__price {
    font-size: 0.9rem;
    color: var(--gold);
    white-space: nowrap;
}

.menu-card p {
    font-size: 0.88rem;
    color: var(--cream-dark);
    opacity: 0.8;
}

.menu-empty, .agenda-empty {
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.65;
}

/* Agenda */
.agenda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.agenda-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-left: 3px solid var(--gold);
    transition: transform 0.3s var(--ease), background 0.3s;
}

.agenda-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.agenda-card time {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.agenda-card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.5rem;
}

.agenda-card__address {
    font-size: 0.9rem;
    opacity: 0.85;
}

.agenda-card__time {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.agenda-card__note {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    opacity: 0.7;
}

/* Contact */
.contact {
    display: flex;
    flex-direction: column;
    gap: clamp(2.5rem, 5vw, 3.5rem);
}

.contact__intro {
    max-width: 36rem;
}

.contact__intro .section__intro {
    margin-top: 0.5rem;
}

.contact__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.contact-card {
    position: relative;
    flex: 1 1 min(100%, 220px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.75rem 1.5rem;
    background: var(--white);
    box-shadow: 0 2px 16px rgba(61, 41, 20, 0.05);
    overflow: hidden;
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.55s var(--ease);
}

.contact-card.visible::before {
    width: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(61, 41, 20, 0.1);
}

.contact-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    color: var(--sage);
    background: rgba(107, 127, 94, 0.1);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    transition: transform 0.45s var(--ease), color 0.35s, background 0.35s;
}

.contact-card:hover .contact-card__icon {
    transform: scale(1.08) rotate(-4deg);
    color: var(--burgundy);
    background: rgba(114, 47, 55, 0.1);
}

.contact-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    width: 100%;
}

.contact-card__label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sage);
}

.contact-card__value {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 500;
    color: var(--brown);
    word-break: break-word;
    transition: color 0.35s;
}

.contact-card:hover .contact-card__value {
    color: var(--burgundy);
}

.contact__grid .reveal:nth-child(1) { transition-delay: 0s; }
.contact__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.contact__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.contact__grid .reveal:nth-child(4) { transition-delay: 0.24s; }

/* Footer */
.footer {
    background: var(--brown);
    color: var(--cream-dark);
    margin-top: 0;
}

.footer__main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
    padding: 3.5rem 0 2.75rem;
}

.footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer__logo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.footer__name {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
}

.footer__tagline {
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.65;
    max-width: 28ch;
}

.footer__heading {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer__nav ul,
.footer__contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer__link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    opacity: 0.75;
    transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.footer__link svg {
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}

.footer__link:hover {
    opacity: 1;
    color: var(--white);
}

.footer__link:hover svg {
    opacity: 1;
    color: var(--gold);
}

.footer__bar {
    border-top: 1px solid rgba(250, 248, 245, 0.1);
}

.footer__bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 0;
}

.footer__copy {
    font-size: 0.82rem;
    opacity: 0.55;
}

.footer__social {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(250, 248, 245, 0.15);
    color: var(--cream-dark);
    opacity: 0.7;
    transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.footer__social a:hover {
    opacity: 1;
    color: var(--white);
    border-color: var(--gold);
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }

/* Responsive — mobile first */
.nav__links {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1.25rem;
    gap: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s, visibility 0.35s;
    box-shadow: var(--shadow);
    border-top: 1px solid rgba(61, 41, 20, 0.08);
}

.nav__links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav__links a {
    display: block;
    padding: 1rem 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
}

.nav__links a:active {
    background: rgba(107, 127, 94, 0.12);
}

.nav__links a::after {
    display: none;
}

.header.scrolled .nav__links a,
.header:not(.scrolled) .nav__links.open a {
    color: var(--brown);
    text-shadow: none;
}

@media (min-width: 769px) {
    :root { --header-h: 72px; }

    .nav__toggle { display: none; }

    .nav__links {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        padding: 0;
        max-height: none;
        overflow: visible;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        background: transparent;
        box-shadow: none;
        border-top: none;
    }

    .nav__links a {
        display: inline;
        padding: 0.25rem 0;
        font-size: 0.9rem;
        font-weight: 500;
        text-align: left;
    }

    .nav__links a::after {
        display: block;
    }

    .nav__links a:active {
        background: transparent;
    }
}

@media (max-width: 768px) {
    .about {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about__frame { max-width: 280px; }

    .section { padding: 4rem 0; }

    .footer__main {
        grid-template-columns: 1fr;
        gap: 2.25rem;
        padding: 3rem 0 2rem;
        text-align: center;
    }

    .footer__brand {
        align-items: center;
    }

    .footer__tagline {
        max-width: none;
    }

    .footer__bar-inner {
        flex-direction: column;
        text-align: center;
    }

    .contact__intro {
        text-align: center;
        margin-inline: auto;
    }

    .contact-card {
        flex: 1 1 100%;
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 360px) {
    .hero__logo img {
        width: 140px;
        height: 140px;
    }
}

body.nav-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .contact-card::before { width: 100%; transition: none; }
    .contact-card:hover { transform: none; }
    .contact-card:hover .contact-card__icon { transform: none; }
    .hero__scroll span { animation: none; }
    .hero__image { transform: none; }
}
