/* ═══════════════════════════════════════════
   JustNow — Page restaurateurs
   Le chevalet (ardoise) est le seul élément décoratif :
   tout le reste reste plat et sobre.
   ═══════════════════════════════════════════ */

.resto {
    --resto-paper: #f3f4f1;
    --resto-ink: #1c2421;
    --resto-muted: #56615c;
    --resto-rule: rgba(28, 36, 33, 0.16);
    --resto-orange: #ff6b35;
    --resto-orange-hover: #ff8150;
    --resto-slate: #2c3833;
    --resto-chalk: #efeee8;
    --resto-chalk-orange: #ff9466;
    --resto-wood: #8a5b3a;
    --resto-wood-light: #a26f49;
    --resto-wood-dark: #6d4429;

    --resto-font-title: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
    --resto-font-text: "Sofia Sans", "Helvetica Neue", Arial, sans-serif;
    --resto-font-chalk: "Caveat", "Segoe Print", "Bradley Hand", cursive;

    --resto-gutter: clamp(1.25rem, 4vw, 2rem);

    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--resto-paper);
    color: var(--resto-ink);
    font-family: var(--resto-font-text);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Conteneurs alignés sur la même grille */
.resto-header,
.resto-hero,
.resto-footer__inner {
    width: 100%;
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--resto-gutter);
    padding-right: var(--resto-gutter);
}

/* Texte réservé aux lecteurs d'écran */
.resto-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus clavier visible partout */
.resto a:focus-visible {
    outline: 3px solid var(--resto-ink);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ─── En-tête ─────────────────────────────────────────── */

.resto-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
}

.resto-header__home {
    display: inline-block;
}

.resto-header__logo {
    display: block;
    width: 6.5rem;
    height: auto;
}

/* ─── Hero ────────────────────────────────────────────── */

.resto-hero {
    flex: 1 0 auto;
    padding-top: clamp(2rem, 5vw, 3.5rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
}

/* Titre en escalier : 1re ligne à gauche, 2e ligne poussée à droite */
.resto-title {
    display: flex;
    flex-direction: column;
    margin: 0 0 clamp(2rem, 5vw, 3.5rem);
    font-family: var(--resto-font-title);
    font-weight: 800;
    /* taille calée pour que « se passe autour de vous » tienne sur une ligne */
    font-size: clamp(1.5rem, calc((80vw - 2 * var(--resto-gutter)) / 8.2), 5rem);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--resto-ink);
}

.resto-title__line--offset {
    align-self: flex-end;
    text-align: right;
}

.resto-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
    grid-template-areas:
        "intro board"
        "pro   board";
    column-gap: clamp(2.5rem, 7vw, 6rem);
    row-gap: 3rem;
    align-items: start;
}

.resto-hero__intro {
    grid-area: intro;
}

.resto-intro {
    max-width: 36rem;
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-size: clamp(1.125rem, 1.6vw, 1.3rem);
    line-height: 1.55;
    color: var(--resto-ink);
    text-wrap: pretty;
}

.resto-intro--types {
    font-weight: 700;
}

.resto-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--resto-ink);
    text-decoration: underline;
    text-decoration-color: var(--resto-orange);
    text-decoration-thickness: 3px;
    text-underline-offset: 0.3em;
}

.resto-link:hover {
    color: var(--resto-ink);
    text-decoration-color: var(--resto-ink);
}

/* ─── Bloc restaurateurs ──────────────────────────────── */

.resto-pro {
    grid-area: pro;
    max-width: 34rem;
    padding-top: 2rem;
    border-top: 1px solid var(--resto-rule);
}

.resto-pro__title {
    margin: 0 0 0.75rem;
    font-family: var(--resto-font-title);
    font-weight: 800;
    font-size: 1.9rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    line-height: 1.05;
    letter-spacing: -0.005em;
    color: var(--resto-ink);
    text-wrap: balance;
}

.resto-pro__text {
    margin: 0 0 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--resto-muted);
    text-wrap: pretty;
}

.resto-pro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.resto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.625rem 1.375rem;
    border: 2px solid transparent;
    border-radius: 6px;
    font-family: var(--resto-font-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.resto-btn:hover {
    text-decoration: none;
}

.resto-btn--primary {
    background: var(--resto-orange);
    border-color: var(--resto-orange);
    color: var(--resto-ink);
}

.resto-btn--primary:hover {
    background: var(--resto-orange-hover);
    border-color: var(--resto-orange-hover);
    color: var(--resto-ink);
}

.resto-btn--secondary {
    background: transparent;
    border-color: var(--resto-ink);
    color: var(--resto-ink);
}

.resto-btn--secondary:hover {
    background: var(--resto-ink);
    color: var(--resto-paper);
}

.resto-btn--small {
    min-height: 2.5rem;
    padding: 0.375rem 1rem;
    font-size: 0.9375rem;
}

/* ─── Chevalet & ardoise ──────────────────────────────── */

.resto-board {
    grid-area: board;
    position: relative;
    isolation: isolate;
    margin: 0;
    padding-bottom: 4.5rem; /* place pour les pieds */
}

/* Pieds du chevalet, derrière le cadre */
.resto-board::before,
.resto-board::after {
    content: "";
    position: absolute;
    z-index: -1;
    bottom: 0.5rem;
    width: 0.875rem;
    height: 50%;
    border-radius: 2px 2px 4px 4px;
    background: linear-gradient(90deg, var(--resto-wood-dark), var(--resto-wood) 45%, var(--resto-wood-dark));
    transform-origin: 50% 0;
}

.resto-board::before {
    left: 16%;
    transform: rotate(6deg);
}

.resto-board::after {
    right: 16%;
    transform: rotate(-6deg);
}

.resto-board__frame {
    padding: 0.75rem;
    border-radius: 10px;
    background: linear-gradient(
            100deg,
            var(--resto-wood-dark) 0%,
            var(--resto-wood) 20%,
            var(--resto-wood-light) 50%,
            var(--resto-wood) 80%,
            var(--resto-wood-dark) 100%
    );
    box-shadow:
            0 1.75rem 3rem -1.5rem rgba(28, 36, 33, 0.55),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.resto-board__slate {
    padding: 1.75rem 1.75rem 2rem;
    border-radius: 4px;
    background-color: var(--resto-slate);
    background-image:
            radial-gradient(ellipse 60% 40% at 28% 22%, rgba(239, 238, 232, 0.07), transparent 70%),
            radial-gradient(ellipse 50% 35% at 72% 80%, rgba(239, 238, 232, 0.05), transparent 70%),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0.09 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    box-shadow:
            inset 0 0 0 1px rgba(0, 0, 0, 0.35),
            inset 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
    color: var(--resto-chalk);
    font-family: var(--resto-font-chalk);
}

.resto-board__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.resto-board__today {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.resto-board__live {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--resto-chalk-orange);
    white-space: nowrap;
}

.resto-board__dot {
    flex: none;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--resto-chalk-orange);
    animation: resto-pulse 2.4s ease-out infinite;
}

.resto-board__list {
    margin: 0;
}

/* Trait de craie ondulé entre deux publications */
.resto-board__group + .resto-board__group {
    margin-top: 0.9rem;
    padding-top: 1.1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='8' viewBox='0 0 120 8'%3E%3Cpath d='M1 4 Q 16 0.5 30 4 T 60 4 T 90 4 T 119 4' fill='none' stroke='%23efeee8' stroke-opacity='0.3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") left top / 7.5rem 0.5rem repeat-x;
}

.resto-board__type {
    margin: 0 0 0.1rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--resto-chalk-orange);
}

.resto-board__item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    column-gap: 1rem;
    margin: 0;
    font-size: 1.7rem;
    font-weight: 500;
    line-height: 1.15;
}

.resto-board__detail {
    margin-left: auto;
    white-space: nowrap;
}

.resto-board__chalk {
    display: inline-block;
    text-shadow: 0 0 1px currentColor;
}

/* Écriture à la craie, déclenchée à l'apparition de l'ardoise */
.resto-board--waiting .resto-board__chalk,
.resto-board--waiting .resto-board__live {
    opacity: 0;
}

.resto-board--written .resto-board__chalk {
    animation: resto-write 520ms cubic-bezier(0.45, 0.05, 0.35, 1) var(--delay, 0ms) backwards;
}

.resto-board--written .resto-board__live {
    animation: resto-fade 400ms ease 300ms backwards;
}

.resto-board__today {
    --delay: 150ms;
}

.resto-board__type .resto-board__chalk {
    --delay: calc(650ms + var(--i, 0) * 420ms);
}

.resto-board__item .resto-board__chalk {
    --delay: calc(850ms + var(--i, 0) * 420ms);
}

.resto-board__item .resto-board__detail {
    --delay: calc(1000ms + var(--i, 0) * 420ms);
}

@keyframes resto-write {
    from {
        clip-path: inset(-0.5em 100% -0.5em 0);
    }
    to {
        clip-path: inset(-0.5em -0.5em -0.5em -0.5em);
    }
}

@keyframes resto-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes resto-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 148, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 0.55rem rgba(255, 148, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 148, 102, 0);
    }
}

/* ─── Pied de page ────────────────────────────────────── */

.resto-footer {
    background: var(--resto-ink);
    color: rgba(239, 238, 232, 0.72);
}

.resto-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
}

.resto-footer__logo {
    display: block;
    width: 5.5rem;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.resto-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.resto-footer__links a {
    font-size: 0.9375rem;
    color: rgba(239, 238, 232, 0.85);
    text-decoration: none;
}

.resto-footer__links a:hover {
    color: var(--resto-chalk);
    text-decoration: underline;
}

.resto-footer a:focus-visible {
    outline-color: var(--resto-chalk);
}

.resto-footer__legal {
    margin: 0;
    font-size: 0.8125rem;
    color: rgba(239, 238, 232, 0.55);
}

/* ─── Responsive ──────────────────────────────────────── */

@media (max-width: 56rem) {
    .resto-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "intro"
            "board"
            "pro";
    }

    .resto-board {
        justify-self: center;
        width: 100%;
        max-width: 25rem;
    }
}

@media (max-width: 34rem) {
    .resto-header__logo {
        width: 5.5rem;
    }

    .resto-board__slate {
        padding: 1.25rem 1.25rem 1.5rem;
    }

    .resto-board__today {
        font-size: 2.1rem;
    }

    .resto-board__item {
        font-size: 1.55rem;
    }

    .resto-pro__actions .resto-btn {
        flex: 1 1 100%;
    }

    .resto-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ─── Mouvement réduit ────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .resto-board--waiting .resto-board__chalk,
    .resto-board--waiting .resto-board__live,
    .resto-board--written .resto-board__chalk,
    .resto-board--written .resto-board__live {
        opacity: 1;
        animation: none;
    }

    .resto-board__dot {
        animation: none;
    }

    .resto-btn {
        transition: none;
    }
}
