/* Calendrier de l'Avent 2026 — styles repris du guide de Florence (24/11/2026), § 8.
 * Ajouts : puce « code promo », sous-titre et note de l'offre, mécanique « 5+2 » (badge marine). */
:root {
  color-scheme: light;
  --paper: #f3f5f7;          /* fond de page */
  --ink: #214152;            /* bleu marine Dental Addict */
  --ink-soft: #4f6673;
  --pink: #e8327c;           /* rose Dental Addict */
  --pink-hover: #c9226a;
  --white: #ffffff;
  --gold: #b88a3e;
  --gold-soft: #e4c88f;
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
.wrap { max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; margin: 0; }

/* En-tête */
.top { background: var(--white); border-bottom: 1px solid #e6e0d4; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.top img { height: 36px; width: auto; }
.top-links { display: flex; align-items: center; gap: 16px; }
.top a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.top a:hover { text-decoration: underline; }
.langs a { font-size: 13px; padding: 2px 6px; border-radius: 3px; }
.langs a[aria-current="true"] { background: var(--ink); color: var(--white); }

/* Bannière */
.hero { position: relative; overflow: hidden;
  background: linear-gradient(180deg, #d5d8dd 0%, #e4e6ea 55%, #f0f1f4 100%); border-bottom: 4px solid var(--pink); }
.hero::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: min(64%, 920px);
  background: url("img/banniere.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(36px, 5vw, 64px); }
.hero-text { max-width: 40rem; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); font-weight: 700; }
.hero h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; margin: 4px 0 6px; }
.hero h1 span { color: var(--pink); }
.hero p { margin: 0; color: var(--ink-soft); max-width: 34rem; font-size: 15px; }
.offers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.85); border: 1px solid #dde3e8;
  border-radius: 999px; padding: 5px 14px 5px 5px; font-size: 14px; font-weight: 500; }
.chip b { font-family: var(--display); font-weight: 700; color: var(--white); background: var(--pink); border-radius: 999px; padding: 2px 10px; font-size: 15px; }
.chip.own b { background: var(--ink); }
@media (max-width: 640px) { .hero::after { display: none; } }

/* Calendrier */
.cal-section { padding-block: 22px 24px; }
.cal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.cal-head h2 { font-size: clamp(22px, 2.6vw, 28px); }
.today-label { font-size: 15px; color: var(--ink-soft); }
.today-label b { color: var(--ink); }
.frame { position: relative; width: 100%; overflow: hidden; }
.frame::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 17%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, var(--paper) 0%, rgba(243,245,247,.85) 35%, rgba(243,245,247,0) 100%); }
.box { position: relative; width: 100%; aspect-ratio: 1916 / 821;
  background: url("img/calendrier-1916x821.jpg") center / 100% 100% no-repeat; }
@media (max-width: 760px) {
  .box { width: 151%; margin-left: -26%; }          /* mobile : seul le centre du visuel est affiché */
  .door.past::after, .door.past::before { display: none; }
  .door.future::before { width: 10px; height: 10px; }
}

/* Cases */
.door { position: absolute; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 4px;
  transition: background .2s, box-shadow .2s, transform .2s; }
.door:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.door.arch  { border-radius: 999px 999px 4px 4px; }
.door.round { border-radius: 50%; }
.door.star  { border-radius: 0;
  clip-path: polygon(50% 0%, 61.5% 35%, 98% 35.5%, 68.5% 57.5%, 79.5% 92%, 50% 71%, 20.5% 92%, 31.5% 57.5%, 2% 35.5%, 38.5% 35%); }
.door.tooth { border-radius: 0;
  -webkit-mask: url("img/masque-dent.svg") center / 100% 100% no-repeat; mask: url("img/masque-dent.svg") center / 100% 100% no-repeat; }

.door.past { background: #eef0f2 center 42% / 74% no-repeat; filter: grayscale(1); opacity: .92; cursor: help; }
.door.past::before { content: attr(data-day); position: absolute; left: 6%; top: 6%; font-family: var(--display);
  font-size: clamp(11px, 2.2vw, 16px); line-height: 1; color: var(--ink); }
.door.past::after { content: attr(data-ended); position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%);
  font-size: clamp(8px, 1.5vw, 11px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--white);
  background: rgba(34,65,82,.85); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }

.door.future { cursor: not-allowed; }
.door.future::before { content: ""; position: absolute; right: 7%; top: 14%; width: clamp(12px, 1.6vw, 22px); height: clamp(12px, 1.6vw, 22px); opacity: .75;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='%23ffffff40'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }

.door.today { background: rgba(255,255,255,.12); animation: glow 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 3px #fff, 0 0 24px 8px rgba(255,255,255,.95), inset 0 0 16px 4px rgba(255,255,255,.55); }
.door.today:hover { transform: scale(1.04); }
.door.star.today, .door.tooth.today { animation: pulse 1.6s ease-in-out infinite; }  /* le halo est masqué par clip-path/mask */
.door.done { background: var(--white) center / 78% no-repeat; box-shadow: 0 0 0 3px var(--pink); animation: none; }
.door.done::after { content: attr(data-badge); position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: var(--white); background: var(--pink); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
@keyframes pulse { 50% { background: rgba(255,255,255,.5); } }
@keyframes glow  { 50% { box-shadow: 0 0 0 4px #fff, 0 0 40px 16px rgba(255,236,190,1), inset 0 0 26px 8px rgba(255,255,255,.8); } }

/* Message temporaire */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 6px; font-size: 15px; opacity: 0;
  transition: opacity .25s, transform .25s; pointer-events: none; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mode d'emploi + pied de page */
.how { padding-block: 40px 56px; }
.how h2 { font-size: 28px; margin-bottom: 20px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; }
.step { border-top: 3px solid var(--pink); padding-top: 12px; }
.step h3 { font-size: 21px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.legal { margin-top: 32px; font-size: 13px; color: var(--ink-soft); max-width: 46rem; }
.legal a { color: var(--ink); }
footer { background: var(--ink); color: rgba(255,255,255,.8); font-size: 13px; }
footer .wrap { padding-block: 22px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* Carte à gratter */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(20,34,42,.62); backdrop-filter: blur(3px);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.card { position: relative; width: min(440px, 100%); background: var(--white); border-radius: 10px; overflow: hidden;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.5); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--ink); color: var(--white); }
.card-head h3 { font-size: 22px; }
.close { border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--white); cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.close:focus-visible { outline: 2px solid var(--pink); }
.stage { position: relative; }
.reveal { padding: 18px 22px 22px; text-align: center; min-height: 380px; }
.reveal img { width: 62%; max-width: 230px; aspect-ratio: 1; object-fit: contain; display: block; margin: 0 auto 6px; }
.badge { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--white);
  background: var(--pink); padding: 3px 14px; border-radius: 999px; margin-bottom: 8px; }
.badge.own { background: var(--ink); }
.brand { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink); font-weight: 700; }
.pname { font-weight: 600; font-size: 17px; margin: 2px 0 8px; }
.price { display: flex; justify-content: center; align-items: baseline; gap: 12px; font-variant-numeric: tabular-nums; }
.price s { color: #8a96a0; font-size: 17px; }
.price strong { font-family: var(--display); font-weight: 800; font-size: 38px; color: var(--ink); }
.price small { font-size: 13px; color: var(--ink-soft); }
.oneplus { font-size: 15px; color: var(--ink-soft); margin: 0 0 4px; }
.promo { margin: 6px auto 0; display: flex; width: fit-content; align-items: center; gap: 10px; border: 2px dashed var(--pink); border-radius: 8px; padding: 8px 12px; }
.promo code { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.promo button { border: 0; background: var(--ink); color: var(--white); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.cta { display: inline-block; margin-top: 14px; background: var(--pink); color: var(--white); text-decoration: none; font-weight: 700; padding: 12px 26px; border-radius: 6px; }
.cta:hover { background: var(--pink-hover); }
.timer { margin-top: 10px; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.timer b { color: var(--pink); }
canvas.scratch { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; transition: opacity .6s;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='13' fill='%23e4c88f' stroke='%23b88a3e' stroke-width='3'/%3E%3C/svg%3E") 16 16, crosshair; }
canvas.scratch.gone { opacity: 0; pointer-events: none; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px 14px; font-size: 13px; color: var(--ink-soft); }
.linkbtn { border: 0; background: none; color: var(--ink); text-decoration: underline; font: inherit; font-size: 13px; cursor: pointer; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .door.today, .door.star.today, .door.tooth.today, .card { animation: none; }
}

/* Ajouts (offres du tableau de JC) */
.chip.code b { background: var(--gold); }
.badge.code { background: var(--gold); }
.sous { font-size: 14px; color: var(--ink-soft); margin: -4px 0 8px; }
.note { margin: 8px auto 0; font-size: 14px; font-weight: 600; color: var(--pink); max-width: 30rem; }
.mech { font-family: var(--display); font-weight: 800; font-size: 40px; color: var(--ink); line-height: 1.1; }
/* Panneau de test (avant l'ouverture) */
.test-panel { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 45;   /* sous la carte à gratter (50) */
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; width: max-content; max-width: calc(100% - 24px);
  background: var(--ink); color: var(--white); padding: 8px 12px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 13px; }
.test-panel b { color: var(--gold-soft); letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.test-panel select, .test-panel button { font: inherit; font-size: 13px; border-radius: 6px; border: 0; padding: 5px 9px; }
.test-panel button { background: var(--pink); color: var(--white); font-weight: 700; cursor: pointer; }
.test-panel small { flex-basis: 100%; text-align: center; color: rgba(255,255,255,.7); font-size: 11px; }
.reveal img.wide { width: 100%; max-width: 100%; aspect-ratio: 2; }   /* offre à plusieurs produits : visuel avec le « + » */
.refs { font-size: 12px; color: var(--ink-soft); margin: -2px auto 8px; max-width: 32rem; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
