/* ==========================================================================
   Feryel Studio — stylesheet (V3 Figma design)
   1. Fonts          4. Buttons & text      7. Booking page
   2. Tokens         5. Hero + header       8. Thank-you page
   3. Base           6. Home blocks         9. Footer · 404
   Mobile first (Figma 376 px), desktop from 48rem (Figma 1280 px).
   ========================================================================== */

/* 1. Fonts (Inter, self-hosted) --------------------------------------------- */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* 2. Design tokens (values taken from the Figma file) ----------------------- */

:root {
    --font-sans: "Inter", Arial, sans-serif;

    --color-beige: #ded2c1;      /* essayage block, calendar, email card */
    --color-cream: #f9f3ea;      /* dépôt block */
    --color-tan: #c7b295;        /* selected day / slot, validate button */
    --color-white: #fffefc;      /* buttons, badge, inputs */
    --color-note: #aca391;       /* pricing note */
    --color-black: #000;
    --color-error: #c8102e;

    --border: 1px solid var(--color-black);
    --radius-block: 40px;

    --hero-height: 587px;        /* mobile */
    --page-max: 1280px;
}

/* 3. Base ------------------------------------------------------------------- */

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

html {
    height: 100%;
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: #fff;
    color: var(--color-black);
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

:is(a, button):focus-visible {
    outline: 2px solid var(--color-black);
    outline-offset: 2px;
}

/* Form fields: no focus ring (the white background + black border is enough) */
input:focus,
input:focus-visible { outline: none; }

/* 4. Buttons & text --------------------------------------------------------- */

/* White button with a black 1px border (Figma: 160×30 mobile, 271×51 desktop) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 30px;
    padding: 6px 16px;
    border: var(--border);
    background: var(--color-white);
    color: var(--color-black);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    transition: background-color 0.15s;
}

.btn:hover { background: var(--color-tan); }

/* Tan "validate" button (Figma: 160×46) */
.btn--tan {
    min-height: 46px;
    background: var(--color-tan);
    font-weight: 400;
    white-space: normal;
}

.btn--tan:hover { background: var(--color-beige); }

.note {
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: var(--color-note);
}

@media (min-width: 48rem) {
    .btn {
        min-width: 271px;
        min-height: 51px;
        font-size: 22px;
    }

    .btn--tan {
        min-width: 160px;
        min-height: 46px;
        font-size: 14px;
    }

    .note { font-size: 16px; }
}

/* 5. Hero + header ---------------------------------------------------------- */

.hero {
    position: relative;
    z-index: 22;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--color-beige);
}

.hero picture,
.hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
}

/* Background video: sits over the photo, fades in once it actually plays */
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.hero__video.is-playing { opacity: 1; }

.site-header {
    position: absolute;
    z-index: 1;
    top: 17px;
    left: 21px;
    right: 21px;
}

.site-header__logo {
    position: relative;
    z-index: 2;
    display: inline-block;
}

.site-header__logo img {
    width: 87px;
    height: auto;
}

/* Menu — mobile: hamburger at the right, beige panel sliding under the header */

.site-nav__toggle {
    position: absolute;
    z-index: 2;
    top: -2px;
    right: 0;
    width: 32px;
    height: 32px;
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--color-black);
}

.site-nav__toggle svg { display: block; width: 100%; height: 100%; }
.site-nav__toggle .site-nav__icon-close,
.is-open .site-nav__toggle .site-nav__icon-open { display: none; }
.is-open .site-nav__toggle .site-nav__icon-close { display: block; }

.site-nav__list {
    display: none;
    position: fixed;
    z-index: 1;
    inset: 0;
    margin: 0;
    padding: 90px 21px 40px;
    list-style: none;
    background: var(--color-beige);
    text-align: center;
}

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

.site-nav__list a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-black);
}

@media (min-width: 48rem) {
    .hero__image,
    .hero__video { object-position: 50% 40%; }

    .site-header { top: 34px; left: 45px; right: 45px; }
    .site-header__logo img { width: 147px; }

    /* Menu — desktop: links centred in the header, no hamburger */
    .site-nav__toggle { display: none; }

    .site-nav__list {
        display: flex;
        position: absolute;
        inset: 0;
        align-items: center;
        justify-content: end;
        gap: 58px;
        padding: 0;
        background: transparent;
        pointer-events: none;
    }

    .site-nav__list a {
        padding: 4px 0;
        font-size: 14px;
        font-weight: 400;
        color: var(--color-black);
        pointer-events: auto;
    }
}

/* 6. Home blocks ------------------------------------------------------------ */

.block {
    position: relative;
    padding: 150px 22px;
    text-align: center;
}

.block--beige { background: var(--color-beige); }
.block--cream { background: var(--color-cream); }

.block__inner {
    max-width: 333px;
    margin: 0 auto;
}

.block__text {
    font-size: 18px;
    line-height: 1.5;
}

.block__text p + p { margin-top: 18px; }

.block__title {
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 700;
}

.block__action {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}


@media (min-width: 48rem) {
    .block {
        padding: 0;
        text-align: left;
    }

    .block__inner {
        position: relative;
        max-width: var(--page-max);
        margin: 0 auto;
        min-height: 662px;
        padding: 150px 152px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 48px;
    }

    /* Rounded blocks overlap the hero (beige) and each other (cream under beige) */
    .block--beige {
        margin-top: -35px;
        border-radius: var(--radius-block);
        z-index: 2;
    }

    .home .block--cream {
        margin-top: -177px;
        padding-top: 177px;
        border-radius: var(--radius-block);
        z-index: 1;
    }

    .home .block--cream .block__inner { min-height: 485px; padding: 150px 152px; }

    .block__text {
        flex: 0 1 492px;
        font-size: 18px;
        line-height: 1.5;
    }

    .block__title {
        margin-bottom: 30px;
        font-size: 18px;
    }

    .block__action {
        flex: 0 0 auto;
        margin-top: 74px;
        align-items: center;
        gap: 22px;
    }

    .block__action .note { max-width: 505px; }
}

/* 7. Booking page ----------------------------------------------------------- */

.block--booking { padding: 41px 22px 45px; }

/* Pricing note: the part before ":" in bold (as in the mockup) */
.note strong { font-weight: 700; }

.block__text--desktop { display: none; }

.booking {
    max-width: 332px;
    margin: 0 auto;
    text-align: left;
}

/* Calendar (Figma group: 325 px wide) */

.calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 6px 0 16px;
}

.calendar__month {
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.calendar__nav {
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--color-black);
}

.calendar__nav svg { display: block; width: 31px; height: 14px; }
.calendar__nav:disabled { opacity: 0.3; }

.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 5px;
    margin-top: 20px;
    text-align: center;
}

.calendar__weekday {
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
}

.day {
    display: block;
    width: 30px;
    height: 30px;
    margin: 0 auto;
    padding: 0;
    border: 1px solid transparent;
    background: none;
    color: var(--color-black);
    font-size: 12px;
    line-height: 28px;
    transition: background-color 0.15s;
}

.day:hover:not(:disabled) { background: rgb(255 255 255 / 0.45); }

.day.is-active {
    border-color: var(--color-black);
    background: var(--color-tan);
}

.day:disabled { opacity: 0.3; }

/* Time slots (Figma: 100×39 cells, 3 columns) */

.slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 16px;
    margin-top: 54px;
}

.slot {
    height: 39px;
    padding: 0;
    border: var(--border);
    background: transparent;
    color: var(--color-black);
    font-size: 12px;
    transition: background-color 0.15s;
}

.slot:hover:not(:disabled) { background: rgb(255 255 255 / 0.5); }
.slot.is-active { background: var(--color-tan); }
.slot:disabled { opacity: 0.3; }

.slots__empty {
    grid-column: 1 / -1;
    font-size: 12px;
    text-align: center;
}

/* Fields (Figma group: white, black border, 332×39) */

.booking__fields {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 40px;
}

.input {
    width: 100%;
    height: 39px;
    padding: 0 14px;
    border: var(--border);
    background: #fff;
    font-size: 12px;
    outline: none;
}

.input::placeholder { color: #b9af9d; opacity: 1; }
.input:focus { background: var(--color-white); }

/* Captcha row, same box as the fields: "7 + 3 =" on the left, the answer on the right */
.captcha {
    display: flex;
    align-items: stretch;
    height: 39px;
    border: var(--border);
    background: #fff;
}

.captcha__question {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: text;
    white-space: nowrap;
}

.captcha__hint {
    color: #b9af9d;
    font-weight: 400;
}

.captcha__answer {
    width: 80px;
    padding: 0 8px;
    border: 0;
    border-left: var(--border);
    background: #fff;
    font-size: 12px;
    text-align: center;
    outline: none;
}

.captcha__answer::placeholder { color: #b9af9d; opacity: 1; }

/* Field rejected by the JavaScript or the server check */
.input.is-invalid,
.captcha.is-invalid { border-color: var(--color-error); }

.form-error {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-error);
}

.booking__submit {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

/* Same box as the fields: full width, 39px high */
.booking__submit .btn {
    width: 100%;
    min-width: 0;
    height: 39px;
    min-height: 39px;
    padding: 0 8px;
}

@media (min-width: 48rem) {
    .block--booking {
        margin-top: -25px;
        padding: 0;
        border-radius: var(--radius-block);
        z-index: 2;
    }

    .block--booking .block__inner {
        padding: 91px 152px 90px;
        align-items: flex-start;
    }

    .block__text--desktop {
        display: block;
        padding-top: 113px;
    }

    .booking { flex: 0 0 332px; margin: 0; }
}

/* 8. Thank-you page --------------------------------------------------------- */

.thanks {
    flex: 1;
    padding: 24px 0 0;
    background: var(--color-beige);
}

.thanks__card {
    max-width: 502px;
    margin: 0 auto;
    padding: 56px 45px 40px;
}

.thanks__logo img {
    width: 119px;
    height: auto;
    margin: 0 auto 60px;
}

.thanks__text {
    font-size: 12px;
    line-height: 1.5;
}

.thanks__text p + p { margin-top: 18px; }

.thanks__slot {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 30px;
    padding: 4px 12px;
    border: var(--border);
    background: var(--color-white);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.thanks__agenda {
    font-size: 12px;
    font-weight: 700;
}

/* 9. Footer · 404 ------------------------------------------------------------ */

.site-footer {
    margin-top: auto;
    padding: 48px 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
}

.site-footer__logo img { width: 69px; height: auto; }

.site-footer__find {
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-footer__phone {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.site-footer__phone svg { width: 12px; height: 12px; }

.site-footer__social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-footer__social svg { display: block; height: 14px; width: auto; }

@media (min-width: 48rem) {
    .site-footer {
        max-width: var(--page-max);
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 64px 52px 54px;
        justify-content: flex-start;
        gap: 0;
    }

    .site-footer__logo { margin-right: auto; }
    .site-footer__find { margin-right: 128px; }
    .site-footer__phone { margin-right: 127px; }
    .site-footer__social { gap: 9px; }
    .site-footer__social svg { height: 21px; }
}

.not-found {
    flex: 1;
    padding: 96px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
    background: var(--color-cream);
}

.not-found__code {
    font-size: 12px;
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
}

/* Motion preferences -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
