/* =====================================================
   Le Grand Bistrot — Composants pop bricolés
   Boutons ombre dure, tampons rotatifs, polaroids,
   stickers, marquees, chiffres XXL héros, ardoise.
   ===================================================== */

/* ---- Boutons — style néo-brutaliste pop ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1.6rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
    border: 2px solid var(--noir);
    border-radius: 0;
    cursor: pointer;
    transition:
        background var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out),
        transform var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    box-shadow: var(--shadow-hard-sm);
}

.btn:hover, .btn:focus-visible { text-decoration: none; }

.btn:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--noir);
}

.btn:active:not(:disabled) {
    transform: translate(0, 0);
    box-shadow: 0 0 0 var(--noir);
}

.btn-primary {
    background: var(--rouge);
    color: #FFF;
}
.btn-primary:hover { background: var(--rouge-deep); color: #FFF; }

.btn-noir {
    background: var(--noir);
    color: var(--moutarde);
}
.btn-noir:hover { background: var(--noir); color: #FFF; }

.btn-moutarde {
    background: var(--moutarde);
    color: var(--noir);
}
.btn-moutarde:hover { background: var(--moutarde-deep); color: var(--noir); }

.btn-cobalt {
    background: var(--cobalt);
    color: #FFF;
}
.btn-cobalt:hover { background: var(--cobalt-deep); color: #FFF; }

.btn-outline {
    background: transparent;
    color: var(--noir);
}
.btn-outline:hover {
    background: var(--noir);
    color: var(--moutarde);
}

.btn-lg { padding: 1.25rem 2.2rem; font-size: 1.125rem; }
.btn-sm { padding: 0.7rem 1.2rem; font-size: 0.875rem; }

.btn-icon {
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--noir);
    background: var(--pink);
    border: 2px solid var(--noir);
    box-shadow: 3px 3px 0 var(--noir);
    transition: all var(--dur-fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}
.btn-icon:hover {
    background: var(--moutarde);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--noir);
}

/* ---- Tampon rouge (signature visuelle forte) ----
   Rendu "encre légèrement bavée" via :
   - double bordure subtle (box-shadow inset + outer)
   - rotation appliquée en JS au load (--rot, aléatoire)
   - mix-blend-mode multiply pour la sensation d'encre absorbée
*/
.tampon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-family: var(--font-machine);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rouge-tampon);
    background: transparent;
    border: 2.5px solid var(--rouge-tampon);
    border-radius: 0;
    transform: rotate(var(--rot, -3deg));
    box-shadow:
        inset 0 0 0 1px var(--rouge-tampon),
        0 0 0 1px rgba(155, 26, 20, 0.18);
    mix-blend-mode: multiply;
}

.tampon-rond {
    width: 80px; height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2.5px solid var(--rouge-tampon);
    border-radius: 50%;
    color: var(--rouge-tampon);
    font-family: var(--font-machine);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transform: rotate(var(--rot, -8deg));
    background: transparent;
    box-shadow:
        inset 0 0 0 1px var(--rouge-tampon),
        0 0 0 1px rgba(155, 26, 20, 0.18);
    mix-blend-mode: multiply;
}

.tampon-prix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.8rem;
    font-family: var(--font-machine);
    font-size: 1rem;
    font-weight: 700;
    color: var(--rouge-tampon);
    border: 2.5px solid var(--rouge-tampon);
    transform: rotate(var(--rot, -2deg));
    background: transparent;
    box-shadow:
        inset 0 0 0 1px var(--rouge-tampon),
        0 0 0 1px rgba(155, 26, 20, 0.18);
    mix-blend-mode: multiply;
    white-space: nowrap;
}

/* ---- Polaroid (photo cadrée scotchée) ---- */
.polaroid {
    background: #FFFFFF;
    padding: 12px 12px 56px;
    box-shadow: var(--shadow-paper);
    position: relative;
    transform: rotate(var(--rot, -1.5deg));
    display: inline-block;
    transition: transform var(--dur-base) var(--ease-out);
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.02);
    z-index: 5;
}

.polaroid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.polaroid-caption {
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 14px;
    text-align: center;
    font-family: var(--font-marker);
    font-size: 1.1rem;
    color: var(--noir);
    line-height: 1;
}

/* Scotch transparent (déco) */
.polaroid::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 70px;
    height: 22px;
    background: rgba(255, 250, 200, 0.55);
    border-left: 1px dashed rgba(255,255,255,0.4);
    border-right: 1px dashed rgba(255,255,255,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

/* Variante polaroid sans scotch (pour les grilles uniformes) */
.polaroid-clean::before { display: none; }

/* ---- Sticker SVG décoratif ---- */
.sticker {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 0.875rem;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    background: var(--moutarde);
    color: var(--noir);
    border: 2px solid var(--noir);
    transform: rotate(var(--rot, 8deg));
    z-index: 3;
    padding: 0.6rem;
}

.sticker-rouge { background: var(--rouge); color: #FFF; }
.sticker-cobalt { background: var(--cobalt); color: #FFF; }

/* ---- Chiffres XXL (héros) ---- */
.huge-num {
    font-family: var(--font-display);
    font-size: var(--fs-mega);
    font-weight: 400;
    line-height: 0.82;
    letter-spacing: -0.05em;
    color: var(--noir);
    text-transform: uppercase;
}

.huge-num sup {
    font-size: 0.25em;
    vertical-align: 0.8em;
    margin-left: 0.05em;
    letter-spacing: 0;
}

/* ---- Marquee défilant ---- */
.marquee {
    overflow: hidden;
    width: 100%;
    border-block: 3px solid var(--noir);
    background: var(--moutarde);
    padding-block: 0.9rem;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: var(--s-5);
    white-space: nowrap;
    animation: marquee 28s linear infinite;
    will-change: transform;
}

/* Mobile : ralentir la marquee pour la lisibilité et la perf CPU */
@media (max-width: 768px) {
    .marquee-track { animation-duration: 48s; }
}

/* Reduced motion : couper la marquee — texte statique, accessibilité */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
        transform: none;
        flex-wrap: wrap;
        white-space: normal;
    }
}

.marquee-item {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--noir);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.marquee-sep {
    color: var(--rouge);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    flex-shrink: 0;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-rouge { background: var(--rouge); }
.marquee-rouge .marquee-item { color: var(--moutarde); }
.marquee-rouge .marquee-sep { color: var(--moutarde); }

.marquee-cobalt { background: var(--cobalt); }
.marquee-cobalt .marquee-item { color: var(--moutarde); }
.marquee-cobalt .marquee-sep { color: var(--moutarde); }

/* ---- Bloc Ardoise (chalkboard) ---- */
.ardoise {
    background: var(--ardoise);
    color: var(--ardoise-craie);
    padding: var(--s-6);
    border: 2px solid var(--noir);
    box-shadow: var(--shadow-hard);
    position: relative;
    /* Texture craie subtile */
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px),
        radial-gradient(ellipse at top right, rgba(255,255,255,0.04), transparent 60%);
}

.ardoise *, .ardoise h1, .ardoise h2, .ardoise h3, .ardoise h4 {
    color: var(--ardoise-craie);
}

.ardoise .marker {
    color: var(--ardoise-craie);
    text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

/* ---- Ticket Bristol (récap commande, fidélité) ---- */
.ticket {
    background: var(--creme);
    color: var(--noir);
    padding: var(--s-5) var(--s-5) var(--s-3);
    box-shadow: var(--shadow-paper);
    border: 1px solid var(--gris-light);
    font-family: var(--font-machine);
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    /* Bord dentelé en bas */
}

.ticket::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -10px;
    height: 12px;
    background:
        radial-gradient(circle at 6px 6px, transparent 5px, var(--creme) 5px) -3px 0 / 12px 12px repeat-x;
    border-bottom: 1px solid var(--gris-light);
}

.ticket-line {
    display: flex;
    justify-content: space-between;
    padding-block: 0.2rem;
    border-bottom: 1px dashed var(--gris-light);
}

.ticket-line:last-child { border-bottom: none; }

/* ---- Badges (pop) ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    font-family: var(--font-machine);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--noir);
    background: var(--moutarde);
    border: 1.5px solid var(--noir);
    border-radius: 0;
}

.badge-veg { background: #B8DBA3; }
.badge-gf  { background: #FFD9A8; }
.badge-rouge { background: var(--rouge); color: #FFF; }
.badge-cobalt { background: var(--cobalt); color: #FFF; }

/* ---- Étoiles avis ---- */
.stars { display: inline-flex; gap: 2px; color: var(--moutarde); }
.stars svg { width: 18px; height: 18px; fill: currentColor; stroke: var(--noir); stroke-width: 1.2; }

/* ---- Avis (style carte postale) ---- */
.review {
    background: var(--creme);
    padding: var(--s-5);
    border: 2px solid var(--noir);
    box-shadow: var(--shadow-hard);
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    transform: rotate(var(--rot, -0.8deg));
    transition: transform var(--dur-base) var(--ease-out);
}

.review:hover { transform: rotate(0deg) translateY(-3px); }

.review-quote {
    font-family: var(--font-machine);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--noir);
}

.review-quote::before { content: '“'; color: var(--rouge); font-size: 1.6em; line-height: 0; margin-right: 0.1em; vertical-align: -0.1em; }
.review-quote::after { content: '”'; color: var(--rouge); font-size: 1.6em; line-height: 0; margin-left: 0.1em; vertical-align: -0.1em; }

.review-meta {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    font-family: var(--font-machine);
    font-size: 0.75rem;
    color: var(--gris);
    letter-spacing: 0.04em;
}

.review-author {
    font-family: var(--font-marker);
    font-size: 1.25rem;
    color: var(--rouge);
    line-height: 1;
}

/* ---- Forms ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.form-label {
    font-family: var(--font-display);
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--noir);
    font-weight: 400;
}

.form-input,
.form-textarea,
.form-select {
    background: #FFFFFF;
    border: 2px solid var(--noir);
    color: var(--noir);
    padding: 0.85rem 1rem;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: box-shadow var(--dur-fast) var(--ease-out);
    width: 100%;
    box-shadow: 3px 3px 0 var(--noir);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    box-shadow: 4px 4px 0 var(--rouge);
    border-color: var(--noir);
}

.form-textarea { min-height: 120px; resize: vertical; }
.form-help { font-size: 0.8rem; color: var(--gris); font-family: var(--font-machine); }
.form-error { color: var(--rouge); font-size: 0.8rem; margin-top: var(--s-1); font-weight: 700; }

/* ---- Cookie banner ---- */
.cookie-banner {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 100;
    background: var(--noir);
    color: var(--moutarde);
    max-width: 600px;
    margin: 0 auto;
    transform: translateY(120%);
    transition: transform var(--dur-base) var(--ease-out);
    border: 2px solid var(--noir);
    box-shadow: var(--shadow-hard-rouge);
}

.cookie-banner.is-visible { transform: translateY(0); }

.cookie-content {
    padding: var(--s-5);
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.cookie-content p {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--moutarde);
    max-width: none;
}

.cookie-content p strong { color: var(--moutarde); font-weight: 700; }

.cookie-content p a {
    color: var(--moutarde);
    text-decoration: underline;
    text-decoration-color: rgba(251,192,45,0.5);
}

.cookie-actions {
    display: flex;
    gap: var(--s-3);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-ghost-light {
    color: var(--moutarde);
    background: transparent;
    border: 2px solid var(--moutarde);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
}

.btn-ghost-light:hover { background: var(--moutarde); color: var(--noir); }

@media (max-width: 540px) {
    .cookie-actions { justify-content: stretch; }
    .cookie-actions .btn, .cookie-actions .btn-ghost-light { flex: 1; }
}

/* ---- Sticky CTA mobile ---- */
.reserve-sticky-mobile {
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 90;
    background: var(--rouge);
    color: #FFF;
    padding: 1.1rem 1.5rem;
    border: 2.5px solid var(--noir);
    box-shadow: var(--shadow-hard);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.reserve-sticky-mobile:hover {
    color: #FFF;
    background: var(--rouge-deep);
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--noir);
    text-decoration: none;
}

@media (min-width: 1024px) { .reserve-sticky-mobile { display: none; } }

.has-cookie-banner-visible .reserve-sticky-mobile {
    transform: translateY(140%);
    pointer-events: none;
}
