/* ==========================================================================
   Poissonnerie Berger : feuille de style commune
   Aucun style dans les pages : tout est ici.
   ========================================================================== */

:root {
  --bleu: #1D3C91;
  --bleu-clair: #28409E;
  --bleu-bord: #3A54B8;
  --rouge: #E30613;
  --rouge-fonce: #b30410;
  --creme: #FDFAF4;
  --encre: #0E2E3F;
  --sable: #e3d9c2;
  --sable-fonce: #cbbfa3;
  --blanc: #FFFFFF;
  --font-titre: 'Bitter', serif;
  --font-texte: 'Open Sans', sans-serif;
  --gutter: clamp(16px, 5vw, 32px);
  --bp-mobile: 1020px;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-texte); background: var(--creme); color: var(--encre); }
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--rouge); color: var(--blanc); }
a { color: var(--bleu); }
a:hover { color: var(--rouge); }
input:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--rouge); outline-offset: 1px; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
[hidden] { display: none !important; }

/* --- Boutons --- */
.btn { display: inline-block; border: 1px solid transparent; padding: 13px 26px; font-size: 15px; font-weight: 700; border-radius: 4px; text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.btn--primary { background: var(--rouge); color: var(--blanc); }
.btn--primary:hover { background: var(--rouge-fonce); color: var(--blanc); }
.btn--outline { background: transparent; color: var(--blanc); border-color: #fbf6ec; }
.btn--outline:hover { background: var(--bleu); color: var(--blanc); }

/* --- Barre du haut --- */
.topbar { background: var(--bleu); color: var(--blanc); font-size: 13px; letter-spacing: .02em; }
.topbar__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.topbar__call { display: none; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; color: var(--blanc); text-decoration: none; font-weight: 600; }
.topbar__call:hover { color: var(--blanc); }
.topbar__link { color: var(--blanc); }
.topbar__link:hover { color: var(--blanc); text-decoration: none; }

/* --- En-tête et menu --- */
.site-header { background: var(--creme); border-bottom: 1px solid var(--bleu); position: sticky; top: 0; z-index: 20; }
.site-header__inner { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { height: 46px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; flex-wrap: wrap; }
.nav-link { text-decoration: none; color: var(--encre); font-weight: 600; font-size: 15px; }
.nav-link:hover, .nav-link.is-active { color: var(--rouge); }

.search-form { display: flex; align-items: center; background: var(--creme); border: 1px solid var(--sable-fonce); border-radius: 22px; padding: 6px 14px; gap: 8px; }
.search-form input { border: none; background: transparent; font-size: 15px; width: 210px; color: var(--encre); }

/* Suggestions de la recherche (vignettes) */
.search-form { position: relative; }
.search-suggest { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 360px; max-width: calc(100vw - 32px); max-height: min(70vh, 480px); overflow-y: auto; background: var(--blanc); border: 1px solid var(--sable); border-radius: 10px; box-shadow: 0 12px 30px rgba(14, 46, 63, .18); padding: 6px; }
.search-suggest__item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--encre); }
.search-suggest__item:hover, .search-suggest__item.is-active { background: var(--creme); color: var(--encre); }
.search-suggest__item.is-off { opacity: .6; }
.search-suggest__thumb { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: #f1ebdc; display: flex; align-items: center; justify-content: center; font-family: var(--font-titre); font-weight: 800; font-size: 20px; color: var(--bleu); }
.search-suggest__txt { display: flex; flex-direction: column; min-width: 0; }
.search-suggest__nom { font-family: var(--font-titre); font-weight: 700; font-size: 15px; color: var(--bleu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest__meta { font-size: 13px; color: #5c6a63; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest__empty { margin: 0; padding: 12px; font-size: 14px; color: #5c6a63; }
.search-suggest__all { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--sable); text-align: center; font-size: 14px; font-weight: 700; color: var(--bleu); text-decoration: none; }
.search-suggest__all:hover { color: var(--rouge); }

.cart-link { position: relative; display: flex; align-items: center; padding: 4px; text-decoration: none; color: var(--bleu); }
.cart-link__count { position: absolute; top: -4px; right: -6px; background: var(--rouge); color: var(--blanc); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--encre); display: block; }

/* --- Bas de page --- */
.site-footer { background: var(--bleu); color: var(--blanc); }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding-top: 48px; padding-bottom: 48px; }
.site-footer__brand { font-family: var(--font-titre); font-weight: 800; font-size: 20px; margin-bottom: 10px; }
.site-footer__text { font-size: 13px; line-height: 1.6; max-width: 320px; margin: 0 0 14px; }
.site-footer__social { display: flex; align-items: center; gap: 14px; }
.site-footer__social a { display: flex; align-items: center; justify-content: center; color: var(--blanc); }
.site-footer__title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.site-footer__links { display: flex; flex-direction: column; gap: 6px; }
.site-footer__links .nav-link { color: var(--blanc); font-weight: 400; font-size: 13px; }
.site-footer__list { font-size: 13px; line-height: 1.9; margin: 0; }
.site-footer__link { color: var(--blanc); }
.site-footer__closed { font-size: 13px; line-height: 1.7; margin: 10px 0 0; padding: 8px 10px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.site-footer__link:hover { color: var(--blanc); text-decoration: none; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 24px; border-top: 1px solid rgba(255, 255, 255, .2); padding: 18px var(--gutter); text-align: center; font-size: 13px; }
.site-footer__legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.site-footer__legal-links a { color: var(--blanc); }
.site-footer__legal-links a:hover { color: var(--blanc); text-decoration: none; }

/* --- Mobile --- */
@media (max-width: 1020px) {
  .topbar__inner { display: none; }
  .topbar__call { display: flex; }

  .cart-link { margin-left: auto; padding: 8px; }
  .menu-toggle { display: flex; }

  .main-nav { display: none; width: 100%; order: 10; margin-left: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 0 12px; border-top: 1px solid var(--sable); }
  .main-nav.is-open { display: flex; }
  .main-nav .nav-link { padding: 10px 0; }
  .search-form { margin-top: 8px; padding: 8px 14px; }
  .search-form input { flex: 1; width: auto; }
  .search-suggest { left: 0; right: 0; width: auto; max-width: none; max-height: 60vh; }
}

/* ==========================================================================
   Composants partagés (sections, cartes produit, pastilles, modale, formulaires)
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rouge); margin-bottom: 6px; }
.eyebrow--light { color: #FF8A80; }
.tag { display: inline-block; background: var(--rouge); color: var(--blanc); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 3px; margin-bottom: 18px; }

.section { padding: 64px 0; background: var(--creme); }
.section--divided { border-top: 1px solid #d9ccb0; padding-top: 72px; padding-bottom: 64px; }
.section--anchor { scroll-margin-top: 80px; }
.section__head { margin-bottom: 32px; }
.section__title { font-family: var(--font-titre); font-size: 30px; margin: 0 0 8px; color: var(--bleu); }
.section__title--spaced { margin-bottom: 18px; }
.section__text { font-size: 15px; margin: 0; max-width: 640px; }

.panel { background: var(--bleu-clair); border: 1px solid var(--bleu-bord); border-radius: 6px; padding: 20px 22px; }
.panel__title { font-family: var(--font-titre); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.panel__text { font-size: 15px; line-height: 1.6; margin: 0; }

/* Filtres */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { background: var(--blanc); color: var(--bleu); border: 1px solid var(--sable); padding: 8px 18px; font-size: 13px; font-weight: 700; border-radius: 20px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.chip.is-active { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }

/* Cartes produit */
.cards-row { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.card { position: relative; flex: 0 0 250px; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--sable); border-radius: 8px; overflow: hidden; }
.card__img { width: 100%; height: 170px; object-fit: cover; display: block; flex-shrink: 0; }
.card__img--empty { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; background: #f1ebdc; color: #8a8f86; font-size: 13px; }
.card__body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.card__title { font-family: var(--font-titre); font-size: 17px; margin: 0; color: var(--bleu); }
.card__meta { flex: 1; margin-bottom: 14px; }
.card__sub { font-size: 13px; margin: 0 0 4px; line-height: 1.5; }
.card__price { font-size: 13px; font-weight: 700; margin: 0; line-height: 1.5; }
.card__action { margin-top: auto; }

/* Toute la carte (photo comprise) déclenche « Réserver » : le bouton s'étend
   sur la carte par un calque invisible. Les cartes « Indisponible » ne sont pas concernées. */
.card [data-cart-action]::after,
.card [data-open-product]::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card:has([data-cart-action], [data-open-product]) { cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
.card:has([data-cart-action], [data-open-product]):hover { border-color: var(--bleu); box-shadow: 0 6px 18px rgba(14, 46, 63, .12); }

.badge { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.badge--ok { color: #2f6b46; background: #dcecdf; }
.badge--wait { color: #a15c00; background: #fce8cc; }
.badge--off { color: var(--blanc); background: #c0272d; }

.btn-card { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; background: transparent; color: var(--bleu); border: 1px solid var(--bleu); padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 4px; text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease; }
.btn-card:hover { background: var(--bleu); color: var(--blanc); }
.btn-card--in-cart { background: var(--bleu); color: var(--blanc); }
.btn-card--disabled, .btn-card--disabled:hover { background: #f6f1e6; color: #8a8f86; border-color: var(--sable); cursor: not-allowed; }

.btn--sm { padding: 11px 22px; }
.btn-mini { flex-shrink: 0; white-space: nowrap; background: transparent; color: var(--bleu); border: 1px solid var(--bleu); padding: 4px 10px; font-size: 13px; font-weight: 700; border-radius: 4px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.btn-mini:hover { background: var(--bleu); color: var(--blanc); }

/* Formulaires */
.form-grid { display: grid; gap: 14px; }
.form-grid__two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select { width: 100%; border: 1px solid var(--bleu-bord); border-radius: 4px; padding: 9px 10px; font-size: 15px; background: var(--bleu-clair); color: var(--blanc); }
.field__optional { font-weight: 400; opacity: .8; }

/* Modale de réservation */
.modal { position: fixed; inset: 0; background: rgba(14, 46, 63, .6); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal__box { background: var(--bleu); color: var(--blanc); border-radius: 10px; max-width: 440px; width: 100%; padding: 36px; position: relative; max-height: 100%; overflow-y: auto; }
.modal__close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 20px; color: var(--blanc); cursor: pointer; line-height: 1; }
.modal__title { font-family: var(--font-titre); font-size: 22px; margin: 0 0 22px; }
.modal__text { font-size: 15px; line-height: 1.6; margin: 0 0 20px; }
.modal__small { font-size: 13px; line-height: 1.5; margin: 0; }
.modal__small a { color: var(--blanc); }
.form-error--light { color: #FFB3AE; }

/* Champ piège anti-robots (doit rester invisible et vide) */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--rouge); font-size: 14px; font-weight: 600; margin: 0; }
.btn--block { width: 100%; }
