/* Annuaire CSE — feuille de style unique, pensée téléphone d'abord. */

:root {
  --bleu: #0E3A5F;
  --bleu-vif: #1B5E9B;
  --dore: #D4A24C;
  --ciel: #8FCBEB;
  --ciel-fond: #E8F4FC;
  --marine: #0B2C48;
  --or: #1B5E9B;
  --or-clair: #8FCBEB;
  --fond: #F7F8FA;
  --carte: #FFFFFF;
  --encre: #101A24;
  --encre-douce: #51616F;
  --trait: #E1E6EC;
  --trait-fort: #C9D2DB;
  --vert: #1B7A55;
  --vert-fond: #E6F4EE;
  --rouge: #B4342B;
  --ombre: 0 1px 2px rgba(14,58,95,.06), 0 6px 18px rgba(14,58,95,.07);
  --ombre-haute: 0 2px 6px rgba(14,58,95,.08), 0 18px 44px rgba(14,58,95,.14);
  --r: 14px;
  --r-petit: 9px;
  --barre: 68px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 16px/1.55 "Public Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--barre) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .titre {
  font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -.018em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: 1.65rem; line-height: 1.15; }
h2 { font-size: 1.22rem; line-height: 1.2; }
h3 { font-size: 1rem; line-height: 1.25; }
p { margin: 0 0 .8em; }
a { color: var(--bleu-vif); text-decoration: none; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--or-clair); outline-offset: 2px; border-radius: 4px; }

.page { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ── l'en-tête ─────────────────────────────────────────────── */
.entete {
  background: linear-gradient(158deg, var(--cse-couleur, #0E3A5F) 0%, #0A2B47 78%);
  color: #fff;
  padding: 18px 0 26px;
  position: relative;
  overflow: hidden;
}
.entete::after {
  content: ""; position: absolute; right: -70px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--cse-accent, #8FCBEB); opacity: .20;
}
.entete .page { position: relative; z-index: 1; }
.entete a { color: #fff; }

.marque { display: flex; align-items: center; gap: 11px; }
.marque .rond {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1rem;
  color: #fff;
}
.marque .nom { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.02rem; line-height: 1.15; }
.marque .sous { font-size: .76rem; opacity: .72; letter-spacing: .04em; text-transform: uppercase; }

.accroche { margin-top: 20px; }
.accroche h1 { font-size: 1.72rem; }
.accroche p { margin: 8px 0 0; opacity: .82; font-size: .95rem; max-width: 34em; }

/* ── la recherche ──────────────────────────────────────────── */
.recherche { display: flex; gap: 8px; margin-top: 18px; }
.recherche input {
  flex: 1; min-width: 0; border: 0; border-radius: var(--r);
  padding: 14px 16px; font: inherit; font-size: 1rem;
  background: #fff; color: var(--encre); box-shadow: var(--ombre-haute);
}
.recherche input::placeholder { color: #8B98A5; }
.recherche button {
  border: 0; border-radius: var(--r); padding: 0 20px;
  background: var(--dore); color: #241A05;
  font: inherit; font-weight: 700; cursor: pointer;
}

/* ── les sections ──────────────────────────────────────────── */
.section { margin: 30px 0; }
.chapeau { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chapeau .tout { font-size: .86rem; font-weight: 600; white-space: nowrap; }
.oeil {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--or); display: block; margin-bottom: 3px;
}

/* ── les catégories ────────────────────────────────────────── */
.categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cat {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r);
  padding: 14px; display: flex; align-items: center; gap: 11px;
  color: var(--encre); transition: border-color .15s, transform .15s;
}
.cat:hover { border-color: var(--trait-fort); transform: translateY(-1px); }
.cat .ic { font-size: 1.35rem; line-height: 1; flex: none; }
.cat .nom { font-weight: 600; font-size: .93rem; line-height: 1.2; }
.cat .n { font-size: .78rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; }

/* ── les cartes partenaires ────────────────────────────────── */
.grille { display: grid; gap: 12px; }
.fiche-carte {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r);
  padding: 15px; display: block; color: var(--encre); position: relative;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.fiche-carte:hover { border-color: var(--trait-fort); box-shadow: var(--ombre); transform: translateY(-1px); }
.fiche-carte .haut { display: flex; align-items: flex-start; gap: 12px; }
.jeton {
  width: 46px; height: 46px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.05rem;
  background: #EDF2F7; color: var(--bleu);
}
.jeton.logo {
  width: 66px; height: 52px; background: #fff; border: 1px solid var(--trait);
  object-fit: contain; padding: 4px; border-radius: 10px;
}
.jeton.logo.grand { width: 122px; height: 78px; border-radius: 14px; padding: 7px; }

.fiche-carte h3 { font-size: 1.02rem; }
.fiche-carte .metier { font-size: .85rem; color: var(--encre-douce); margin-top: 2px; line-height: 1.35; }
.fiche-carte .lieu { font-size: .8rem; color: var(--encre-douce); margin-top: 6px; }
.fiche-carte .avantage {
  margin-top: 11px; padding: 9px 11px; border-radius: var(--r-petit);
  background: var(--vert-fond); color: #10553B; font-size: .86rem; font-weight: 600;
}

.etoile {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
  border: 0; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1;
  color: var(--trait-fort); border-radius: 50%; display: grid; place-items: center;
}
.etoile[aria-pressed="true"] { color: var(--or-clair); }
.etoile:hover { background: #F1F4F8; }

.puce {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 99px;
  background: #EDF2F7; color: var(--bleu); margin-right: 5px;
}
.puce.or { background: var(--ciel-fond); color: var(--marine); }
.puce.vert { background: var(--vert-fond); color: #10553B; }

/* ── les offres ────────────────────────────────────────────── */
.offre-carte {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
}
.offre-carte .corps { padding: 15px; flex: 1; }
.offre-carte .titre-offre { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.offre-carte .chez { font-size: .84rem; color: var(--encre-douce); margin-top: 4px; }
.offre-carte .cond { font-size: .8rem; color: var(--encre-douce); margin-top: 9px; }
.offre-carte .pied {
  border-top: 1px dashed var(--trait); padding: 11px 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.code-promo {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 700;
  font-size: .86rem; letter-spacing: .06em; background: var(--ciel-fond); color: var(--marine);
  padding: 5px 10px; border-radius: var(--r-petit); border: 1px dashed #A9CFE8;
}

/* ── les boutons ───────────────────────────────────────────── */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 17px; border-radius: var(--r-petit); border: 1px solid var(--trait);
  background: var(--carte); color: var(--encre); font: inherit; font-weight: 600;
  font-size: .92rem; cursor: pointer; text-align: center;
}
.bouton:hover { border-color: var(--trait-fort); }
.bouton.plein { background: var(--cse-couleur, #0E3A5F); color: #fff; border-color: transparent; }
.bouton.or { background: var(--cse-accent, #8FCBEB); color: var(--marine); border-color: transparent; }
.bouton.large { width: 100%; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }

/* ── la fiche ──────────────────────────────────────────────── */
.fiche-tete { background: var(--carte); border-bottom: 1px solid var(--trait); padding: 20px 0 22px; }
.fiche-tete .jeton { width: 62px; height: 62px; font-size: 1.4rem; border-radius: 16px; }
.fiche-tete h1 { font-size: 1.5rem; margin-top: 12px; }
.bloc {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r);
  padding: 16px; margin-bottom: 12px;
}
.bloc h2 { font-size: 1.02rem; margin-bottom: 10px; }
.ligne { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--trait); align-items: flex-start; }
.ligne:last-child { border-bottom: 0; padding-bottom: 0; }
.ligne .cle { font-size: .8rem; color: var(--encre-douce); width: 88px; flex: none; padding-top: 1px; }
.ligne .val { font-size: .93rem; }

/* ── le coupon ─────────────────────────────────────────────── */
.coupon {
  background: var(--carte); border-radius: 18px; box-shadow: var(--ombre-haute);
  overflow: hidden; margin: 18px 0; position: relative;
}
.coupon .haut { background: var(--cse-couleur, #0E3A5F); color: #fff; padding: 20px 18px; }
.coupon .haut .titre-offre { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.45rem; line-height: 1.15; }
.coupon .dents {
  height: 22px; background:
    radial-gradient(circle at 11px 0, var(--fond) 11px, transparent 11px) repeat-x 0 0 / 22px 22px;
  border-bottom: 1px dashed var(--trait);
}
.coupon .bas { padding: 18px; text-align: center; }
.coupon .grand-code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 700;
  font-size: 1.5rem; letter-spacing: .14em; color: var(--marine);
  padding: 14px; border: 2px dashed var(--trait-fort); border-radius: var(--r);
  margin: 4px 0 12px; background: #FBFCFE;
}
.coupon .ref { font-size: .74rem; color: var(--encre-douce); letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* ── les actualités ────────────────────────────────────────── */
.actu {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--r);
  padding: 15px; margin-bottom: 11px;
}
.actu .quand { font-size: .76rem; color: var(--encre-douce); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.actu h3 { margin: 4px 0 6px; }
.actu p { font-size: .92rem; color: var(--encre-douce); margin: 0; }

/* ── la barre du bas ───────────────────────────────────────── */
.barre-bas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--trait);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.barre-bas a {
  padding: 9px 2px 8px; text-align: center; color: var(--encre-douce);
  font-size: .68rem; font-weight: 600; letter-spacing: .01em;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.barre-bas a .ic { font-size: 1.22rem; line-height: 1; }
.barre-bas a.ici { color: var(--cse-couleur, #0E3A5F); }
.barre-bas a.ici .ic { transform: translateY(-1px); }

/* ── divers ────────────────────────────────────────────────── */
.filtres { display: flex; gap: 7px; overflow-x: auto; padding: 4px 0 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtres a {
  flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--trait);
  background: var(--carte); color: var(--encre-douce); font-size: .86rem; font-weight: 600;
  white-space: nowrap;
}
.filtres a.ici { background: var(--cse-couleur, #0E3A5F); color: #fff; border-color: transparent; }

.vide { text-align: center; padding: 48px 20px; color: var(--encre-douce); }
.vide .gros { font-size: 2.4rem; margin-bottom: 10px; }

.note { font-size: .82rem; color: var(--encre-douce); line-height: 1.5; }
.pied-page { padding: 26px 0 30px; text-align: center; }
.pied-page .note { max-width: 32em; margin: 0 auto 10px; }

.compteur { font-size: .85rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; margin-bottom: 12px; }

.avantages { display: grid; gap: 10px; }
.avantage-cse {
  background: var(--carte); border: 1px solid var(--trait); border-left: 3px solid var(--cse-accent, #8FCBEB);
  border-radius: var(--r-petit); padding: 13px 15px;
}
.avantage-cse h3 { font-size: .95rem; }
.avantage-cse p { font-size: .87rem; color: var(--encre-douce); margin: 4px 0 0; }

/* ── l'écran du code ───────────────────────────────────────── */
.portail { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #0E3A5F, #071F35); }
.portail .boite { background: #fff; border-radius: 20px; padding: 30px 24px; max-width: 400px; width: 100%; box-shadow: var(--ombre-haute); }
.portail h1 { font-size: 1.4rem; }
.portail input {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 1.15rem; font-weight: 700;
  letter-spacing: .12em; text-align: center; text-transform: uppercase;
  border: 2px solid var(--trait); border-radius: var(--r); margin: 6px 0 14px;
}
.portail input:focus { border-color: var(--bleu-vif); outline: none; }
.erreur { background: #FCECEA; color: var(--rouge); padding: 10px 13px; border-radius: var(--r-petit); font-size: .88rem; margin-bottom: 12px; }

/* ── le grand écran ────────────────────────────────────────── */
@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .barre-bas {
    position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--trait);
    display: flex; justify-content: center; gap: 4px; padding: 6px 12px;
  }
  .barre-bas a { flex-direction: row; gap: 7px; font-size: .9rem; padding: 9px 15px; border-radius: var(--r-petit); }
  .barre-bas a.ici { background: #EDF2F7; }
  .categories { grid-template-columns: repeat(4, 1fr); }
  .grille { grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }
  .accroche h1 { font-size: 2.3rem; }
  .fiche-tete h1 { font-size: 1.9rem; }
  .actions { grid-template-columns: repeat(4, 1fr); }
  .fiche-deux { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
}

/* ── la page imprimée (le coupon au comptoir) ──────────────── */
@media print {
  .barre-bas, .entete, .bouton, .pied-page { display: none !important; }
  body { background: #fff; padding: 0; }
  .coupon { box-shadow: none; border: 1px solid #999; }
}

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

/* ── la fiche complète ─────────────────────────────────────── */
.encadre-avantage { border-color: #BEE3D2; background: linear-gradient(180deg, #F2FBF7, #fff); }
.encadre-avantage .titre-offre {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 1.12rem; line-height: 1.2;
}
.offre-suivante { border-top: 1px solid var(--trait); padding-top: 13px; margin-top: 13px; }

.savoir-faire { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.savoir-faire li {
  position: relative; padding-left: 22px; font-size: .93rem; line-height: 1.45;
}
.savoir-faire li::before {
  content: ""; position: absolute; left: 3px; top: .55em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--cse-accent, #8FCBEB);
}

.video { position: relative; padding-top: 56.25%; border-radius: var(--r-petit); overflow: hidden; background: #0B1620; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.reseaux { display: flex; flex-wrap: wrap; gap: 8px; }
.reseaux .bouton { padding: 9px 14px; font-size: .86rem; }

.carte-lien {
  display: flex; gap: 11px; align-items: flex-start; color: var(--encre);
  padding: 13px; border-radius: var(--r-petit); background: #F1F5F9;
  border: 1px solid var(--trait);
}
.carte-lien .epingle { color: var(--rouge); font-size: 1.1rem; line-height: 1.2; }

.panneau .bloc:last-of-type { margin-bottom: 8px; }
.actions-panneau { grid-template-columns: repeat(2, 1fr); }

/* ── le coupon : le QR et les façons de s'en servir ────────── */
.coupon .qr {
  width: 200px; height: 200px; margin: 4px auto 10px; display: block;
  border: 1px solid var(--trait); border-radius: var(--r-petit); padding: 8px; background: #fff;
}
.moyens { display: grid; gap: 10px; }
.moyen {
  display: flex; gap: 12px; align-items: flex-start; background: var(--carte);
  border: 1px solid var(--trait); border-radius: var(--r); padding: 14px;
}
.moyen .rang {
  flex: none; width: 27px; height: 27px; border-radius: 50%;
  background: var(--cse-couleur, #0E3A5F); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .84rem;
  font-variant-numeric: tabular-nums;
}
.moyen strong { font-size: .95rem; }
.moyen p { margin: 3px 0 0; }

/* ── la vérification par le commerçant ─────────────────────── */
.verdict {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; color: #fff;
}
.verdict.oui { background: var(--vert); }
.verdict.non { background: var(--rouge); }

@media (min-width: 720px) {
  .fiche-deux { align-items: start; }
  .panneau { position: sticky; top: 74px; }
  .actions-panneau { grid-template-columns: repeat(2, 1fr); }
  .moyens { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .moyens, h2 { display: none !important; }
  .coupon .qr { width: 210px; height: 210px; }
}

/* ── la vitrine publique ───────────────────────────────────── */
.fil { font-size: .82rem; opacity: .8; margin: 0 0 10px; }
.fil a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.entete .marque .nom a { color: #fff; }

.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquette {
  font-size: .78rem; padding: 4px 9px; border-radius: 99px;
  background: #EDF2F7; color: var(--encre-douce); border: 1px solid var(--trait);
}
