/* Bandeau cookies, appel à l'action, contrastes, formulaires, mobile. */

/* ---------- Contraste : cartes épuisées lisibles ---------- */
/* Avant : toute la carte à 55 % d'opacité (texte gris à 2,7:1, sous le minimum de 4,5:1).
   Maintenant seuls l'icône et le prix sont atténués ; les textes restent lisibles. */
.card--out { opacity: 1; }
.card--out .card__icon { opacity: .45; filter: grayscale(.7); }
.card--out .price { opacity: .75; }
.stock--out, .pill--out, .denom.is-out span { color: #ff9e9e; }
.denom.is-out:not(.is-active) { opacity: .85; }

/* ---------- Appel à l'action ---------- */
.btn--cta { font-size: 1.05rem; padding: .85rem 1.4rem; }
.cta-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: none; align-items: center; justify-content: center; gap: .6rem;
  padding: .9rem 1.2rem; border-radius: 14px; text-decoration: none; font-weight: 800; font-size: 1.02rem;
  color: #0d1017; background: linear-gradient(135deg, #ffffff, #c4ccd9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .25), 0 0 34px rgba(255, 60, 100, .28);
}
.cta-bar small { font-weight: 700; opacity: .75; }
@media (max-width: 760px) {
  .cta-bar:not([hidden]) { display: flex; }
  body:has(.cta-bar:not([hidden])) .content { padding-bottom: 5.5rem; }
  body.has-consent .cta-bar { display: none; }
}

/* ---------- Bandeau de consentement ---------- */
.consent {
  position: fixed; z-index: 60; left: 50%; bottom: 16px; translate: -50% 0;
  width: min(720px, calc(100% - 24px)); display: flex; gap: 1rem; align-items: center;
  padding: 1rem 1.2rem; border-radius: 16px; color: var(--text);
  background: rgba(18, 22, 32, .97); border: 1px solid rgba(200, 212, 230, .2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  animation: consentIn .5s cubic-bezier(.16, 1, .3, 1);
}
.consent p { font-size: .9rem; line-height: 1.5; color: #c9d1de; }
.consent p strong { color: var(--text); }
.consent a { color: #fff; }
.consent__actions { display: flex; gap: .5rem; flex-shrink: 0; }
@keyframes consentIn { from { opacity: 0; translate: -50% 30px; } }
@media (max-width: 640px) {
  .consent { flex-direction: column; align-items: stretch; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .consent__actions .btn { flex: 1; }
}
.foot__cookies { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- Formulaires : erreurs visibles seulement après saisie ---------- */
.form input:user-invalid, .form select:user-invalid, .form textarea:user-invalid { border-color: #ff6b81; box-shadow: 0 0 0 3px rgba(255, 107, 129, .15); }
.form .field-hint { display: block; font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mobile : zones de toucher confortables ---------- */
@media (max-width: 760px) {
  .topbar__btn, .icon-btn, .authbtn { min-height: 44px; min-width: 44px; }
  .foot__links a, .foot__links button { display: inline-block; padding: .35rem 0; }
}

/* ---------- Page 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem 1rem; }
.notfound__box { max-width: 520px; display: grid; gap: 1rem; justify-items: center; }
.notfound__code { font-family: "Sora", sans-serif; font-size: clamp(5rem, 22vw, 9rem); line-height: 1; font-weight: 700;
  background: linear-gradient(135deg, #fff 20%, #ff4d6d 55%, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound__actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.notfound .muted { color: var(--muted); }

/* ===== Adaptation mobile (audit 320 à 768 px) ===== */
/* Barre « Recharger mes diamants » : une seule ligne, et jamais par-dessus le menu ou une fenêtre */
.cta-bar span, .cta-bar small { white-space: nowrap; }
@media (max-width: 400px) { .cta-bar { font-size: .95rem; padding: .8rem 1rem; gap: .45rem; } }
@media (max-width: 340px) { .cta-bar small { display: none; } }
body:has(.sidebar.is-open) .cta-bar,
body:has(dialog[open]) .cta-bar,
.cta-bar.is-redundant { display: none !important; }

@media (max-width: 760px), (pointer: coarse) {
  /* Cibles tactiles d'au moins 44 px (recommandation Apple / Google), téléphones et tablettes */
  body .btn--small { min-height: 44px; }
  .topbar .topbar__brand { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
  .topbar .topbar__menu { min-width: 44px; }
  body .back { display: inline-flex; align-items: center; min-height: 44px; }
  body .chip { min-height: 40px; }
  /* Petits textes : 12 px minimum pour rester lisibles */
  body .card__cat, body .badge, body .chipcard, body .section-tile__art .chipcard { font-size: max(12px, .75rem); }
  /* Les longs titres de packs ne débordent jamais */
  body .card__title { overflow-wrap: anywhere; hyphens: auto; }
}

/* Onglets de régions : le compteur gris passait à 3:1, sous le minimum de 4,5:1 */
.pu-region small { color: #a3acbd; }
.pu-region.is-active small { color: inherit; }
.welcome picture { display: block; }

/* ==========================================================================
   Fond « couloir » inspiré du logo : sombre, lumière rouge, lampe qui vacille.
   Les panneaux deviennent du verre fumé : on voit le fond à travers.
   ========================================================================== */
html { background: #06070b; }
body.has-shell { background: transparent !important; }

/* Le couloir (image tirée du logo, floutée) qui dérive lentement */
body.has-shell::after {
  content: ""; position: fixed; inset: -8%; z-index: -3; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 7, 11, .30) 0%, rgba(6, 7, 11, .55) 55%, rgba(6, 7, 11, .85) 100%),
    url("../images/fond.webp") center 35% / cover no-repeat;
  animation: fondDrift 40s ease-in-out infinite alternate;
}
@keyframes fondDrift {
  0%   { transform: scale(1.04) translate(0, 0); }
  50%  { transform: scale(1.10) translate(-1.5%, 1%); }
  100% { transform: scale(1.06) translate(1.5%, -1%); }
}

/* La lampe du plafond qui vacille + la brume rouge qui respire */
html::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(90px 38px at 50% 3%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(260px 160px at 50% 4%, rgba(220, 228, 245, .16), transparent 70%),
    radial-gradient(45% 38% at 50% 42%, rgba(200, 20, 50, .26), transparent 72%);
  animation: lampe 7s steps(1, end) infinite, brume 9s ease-in-out infinite;
}
@keyframes lampe {
  0%, 100% { opacity: 1; } 41% { opacity: .55; } 42% { opacity: 1; } 44% { opacity: .35; } 45% { opacity: .95; }
  78% { opacity: .7; } 79% { opacity: 1; }
}
@keyframes brume { 50% { filter: brightness(1.25) saturate(1.2); } }

/* Reflets au sol (comme le sol mouillé du logo) */
html::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 28vh; z-index: -2; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 46%, rgba(255, 60, 90, .08) 48%, transparent 50%),
    linear-gradient(0deg, rgba(120, 10, 30, .18), transparent);
  -webkit-mask: linear-gradient(0deg, #000, transparent); mask: linear-gradient(0deg, #000, transparent);
  animation: reflets 6s ease-in-out infinite alternate;
}
@keyframes reflets { from { opacity: .5; transform: translateX(-1%); } to { opacity: 1; transform: translateX(1%); } }

/* Verre fumé sombre */
body.has-shell :is(.panel, .card, .account, .stat, .step, .section-tile, .event, .order-card) {
  background-color: rgba(14, 16, 24, .62);
  border-color: rgba(200, 212, 230, .12);
}
body.has-shell .sidebar { background: rgba(9, 10, 16, .74); }
body.has-shell .topbar { background: rgba(9, 10, 16, .62); }
@media (hover: hover) and (pointer: fine) {
  body.has-shell :is(.panel, .card, .account, .stat, .step, .section-tile, .event, .order-card, .sidebar, .topbar) {
    -webkit-backdrop-filter: blur(12px) saturate(1.25); backdrop-filter: blur(12px) saturate(1.25);
  }
}
@media (hover: none) {
  /* Téléphones : un peu plus opaque, sans flou (plus fluide, texte toujours lisible) */
  body.has-shell :is(.panel, .card, .account, .stat, .step, .section-tile, .event, .order-card) { background-color: rgba(14, 16, 24, .80); }
  body.has-shell .topbar { background: rgba(9, 10, 16, .94); }
}

@media (prefers-reduced-motion: reduce) {
  body.has-shell::after, html::before, html::after { animation: none !important; }
}

/* ==========================================================================
   Diamant qui flotte (comme avant) : si l'appareil ne peut pas afficher le diamant 3D
   (pas de carte graphique, mode économie), ce diamant dessiné flotte à la même place.
   Dès que la 3D démarre, il s'efface pour lui laisser la place.
   ========================================================================== */
.panel.welcome { position: relative; }
.panel.welcome::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  right: 3%; top: 50%; width: clamp(130px, 13vw, 190px); aspect-ratio: 200 / 180; margin-top: calc(clamp(130px, 13vw, 190px) * -.45);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 180'%3E %3Cdefs%3E %3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='.5' stop-color='%23bfe3ff'/%3E%3Cstop offset='1' stop-color='%233b82f6'/%3E%3C/linearGradient%3E %3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23e0f2fe'/%3E%3Cstop offset='1' stop-color='%231e40af'/%3E%3C/linearGradient%3E %3ClinearGradient id='r' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%2338bdf8'/%3E%3Cstop offset='1' stop-color='%231d4ed8'/%3E%3C/linearGradient%3E %3C/defs%3E %3Cpolygon points='40,10 160,10 195,55 100,175 5,55' fill='url(%23b)'/%3E %3Cpolygon points='40,10 70,55 5,55' fill='%23f4f7fb'/%3E %3Cpolygon points='40,10 100,10 70,55' fill='url(%23a)'/%3E %3Cpolygon points='100,10 160,10 130,55' fill='%23cfe9ff'/%3E %3Cpolygon points='160,10 195,55 130,55' fill='%2360a5fa'/%3E %3Cpolygon points='100,10 130,55 70,55' fill='%23ffffff'/%3E %3Cpolygon points='5,55 70,55 100,175' fill='%2393c5fd'/%3E %3Cpolygon points='70,55 130,55 100,175' fill='url(%23r)'/%3E %3Cpolygon points='130,55 195,55 100,175' fill='%232563eb'/%3E %3Cpolyline points='40,10 70,55 100,10 130,55 160,10' fill='none' stroke='%23fff' stroke-opacity='.7' stroke-width='1.2'/%3E %3Cpolyline points='5,55 195,55' stroke='%23fff' stroke-opacity='.6' stroke-width='1.2'/%3E %3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, .5)) drop-shadow(0 0 50px rgba(37, 99, 235, .25));
  animation: diamantFlotte 5s ease-in-out infinite, diamantBrille 3.2s ease-in-out infinite;
  transition: opacity .8s ease;
}
@keyframes diamantFlotte {
  0%, 100% { transform: perspective(600px) translateY(0) rotateY(-28deg) rotate(-3deg); }
  50% { transform: perspective(600px) translateY(-14px) rotateY(28deg) rotate(3deg); }
}
@keyframes diamantBrille { 50% { filter: drop-shadow(0 0 34px rgba(56, 189, 248, .8)) drop-shadow(0 0 70px rgba(37, 99, 235, .4)) brightness(1.15); } }
body.has-3d .panel.welcome::after { opacity: 0; }
/* Le texte reste au-dessus du diamant */
.panel.welcome > * { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .panel.welcome::after { right: 8%; top: 1.4rem; margin-top: 0; width: 128px; }
}
@media (max-width: 1360px) and (min-width: 761px) {
  .panel.welcome::after { opacity: .3; } /* écran moyen : en filigrane derrière le texte */
}
@media (prefers-reduced-motion: reduce) { .panel.welcome::after { animation: none; } }

/* ===== Preuves de confiance (js/trust.js) ===== */
.trust { display: grid; gap: .9rem; }
.trust__count { font-size: 1.05rem; color: var(--muted); }
.trust__count { display: flex; flex-wrap: wrap; gap: .6rem 2rem; align-items: baseline; }
.trust__count strong { font: 700 2rem/1 "Sora", sans-serif; margin-right: .35rem; background: linear-gradient(135deg, #fff, #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trust__note .stars { color: #fbbf24; letter-spacing: .1em; margin: 0 .3rem; text-shadow: 0 0 12px rgba(251, 191, 36, .4); }
.trust__note small { color: var(--muted); }
.review__badge { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: #86efac; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .35); }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.review { margin: 0; padding: 1.1rem 1.2rem; border-radius: var(--radius, 14px); background: rgba(14, 16, 24, .62); border: 1px solid rgba(200, 212, 230, .12); display: grid; gap: .55rem; }
.review__stars { color: #fbbf24; letter-spacing: .12em; text-shadow: 0 0 12px rgba(251, 191, 36, .35); }
.review blockquote { margin: 0; line-height: 1.55; }
.review figcaption { font-size: .85rem; color: var(--muted); }


/* ===== Fenêtre « Donnez votre avis » (js/review-prompt.js) ===== */
.rvp { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem;
  background: rgba(4, 5, 9, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s ease; }
.rvp.is-open { opacity: 1; }
.rvp__card { position: relative; width: min(420px, 100%); text-align: center; display: grid; gap: .55rem; justify-items: center;
  padding: 1.8rem 1.4rem 1.2rem; border-radius: 22px; color: var(--text);
  background: linear-gradient(180deg, rgba(24, 28, 42, .97), rgba(14, 16, 24, .97));
  border: 1px solid rgba(147, 197, 253, .2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(59, 130, 246, .18);
  transform: translateY(24px) scale(.92); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.rvp.is-open .rvp__card { transform: none; }
.rvp__card h2 { margin: 0; font-size: 1.35rem; }
.rvp__sub { margin: 0; color: var(--muted); }
.rvp__icon { font-size: 2.4rem; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(56, 189, 248, .55)); }
.rvp__close { position: absolute; top: .7rem; right: .7rem; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 1rem; cursor: pointer; }
.rvp__stars { display: flex; gap: .35rem; margin: .5rem 0 0; }
.rvp__star { width: 52px; height: 52px; padding: 4px; border: 0; background: none; cursor: pointer; border-radius: 12px;
  animation: rvpStarIn .5s cubic-bezier(.2, 1.5, .4, 1) backwards; animation-delay: calc(var(--i) * 70ms + 200ms); }
.rvp__star svg { width: 100%; height: 100%; fill: rgba(148, 163, 184, .22); stroke: rgba(203, 213, 225, .45); stroke-width: 1; transition: fill .2s, transform .2s, filter .2s; }
.rvp__star:hover svg, .rvp__star:focus-visible svg { transform: scale(1.15); }
.rvp__star.is-hover svg, .rvp__star.is-on svg { fill: #fbbf24; stroke: #fde68a; filter: drop-shadow(0 0 10px rgba(251, 191, 36, .65)); }
.rvp__star.is-pop svg { animation: rvpPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes rvpStarIn { from { opacity: 0; transform: translateY(14px) scale(.4) rotate(-30deg); } }
@keyframes rvpPop { 40% { transform: scale(1.4) rotate(12deg); } }
.rvp__label { margin: 0; min-height: 1.4em; font-weight: 700; color: #fde68a; }
.rvp__form { width: 100%; display: grid; gap: .55rem; animation: otpIn .45s cubic-bezier(.16, 1, .3, 1); }
.rvp__form[hidden], .rvp__done[hidden] { display: none; }
.rvp__form textarea { width: 100%; resize: vertical; font: inherit; color: var(--text); background: rgba(10, 12, 20, .75);
  border: 1px solid rgba(148, 163, 184, .25); border-radius: 12px; padding: .7rem .85rem; }
.rvp__form textarea:focus { outline: none; border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .18); }
.rvp__hint { margin: 0; font-size: .78rem; color: var(--muted); }
.rvp__error { margin: 0; min-height: 1em; color: #fca5a5; font-size: .88rem; }
.rvp__done { display: grid; gap: .4rem; justify-items: center; animation: otpIn .5s cubic-bezier(.16, 1, .3, 1); }
.rvp__thanks { font-size: 2.6rem; animation: rvpPop .7s cubic-bezier(.2, 1.6, .4, 1); }
.rvp__later { color: var(--muted); }
@media (max-width: 380px) { .rvp__star { width: 46px; height: 46px; } }
@media (prefers-reduced-motion: reduce) { .rvp, .rvp__card, .rvp__star, .rvp__star svg, .rvp__icon, .rvp__form, .rvp__done, .rvp__thanks { animation: none !important; transition: none !important; } }

/* Bandeau « version ordinateur » sur un téléphone Android (js/site.js).
   Ici la page est affichée à 980 px de large puis réduite : le bandeau est donc dessiné en grand pour rester lisible. */
.desk-hint {
  position: fixed; left: 0; right: 0; top: 0; z-index: 90; display: flex; align-items: center; gap: 1.4rem;
  padding: 1.6rem 2rem; font-size: 2.1rem; line-height: 1.35; color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed); box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  animation: otpIn .5s cubic-bezier(.16, 1, .3, 1);
}
.desk-hint p { margin: 0; flex: 1; }
.desk-hint__icon { font-size: 3.4rem; }
.desk-hint button { flex: 0 0 auto; width: 80px; height: 80px; border: 0; border-radius: 50%; font-size: 2.2rem; color: #fff; background: rgba(255, 255, 255, .18); cursor: pointer; }

/* ===== Vérification (contraste, mobile, zones tactiles) ===== */
/* Compteur des onglets de région : l'opacité .6 de packetup.css le rendait trop pâle */
.pu-regions .chip.pu-region small, .pu-region small { opacity: 1; color: #b4bccb; }
.pu-region.is-active small { color: inherit; }
/* « Prix sur demande » ne déborde plus sur les petits téléphones : le pied de carte passe à la ligne */
.card__foot { flex-wrap: wrap; gap: .6rem; }
.price--ask { white-space: normal; min-width: 0; }
@media (max-width: 420px) { .sub .price--ask { font-size: 1rem; } }
/* Zones à toucher d'au moins 24 px : téléphone du menu et liens du bas de page */
.sidebar__foot .phone-link { display: inline-flex; align-items: center; min-height: 32px; }
.foot__links a, .foot__links button { display: inline-flex; align-items: center; min-height: 32px; }

/* Icône WhatsApp (menu, boutons, liens) */
.wa-ico { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.28em; border-radius: 22%; flex: none; }
.nav__icon .wa-ico { width: 20px; height: 20px; vertical-align: middle; }
.btn .wa-ico { margin-right: .15em; }
.payment__ico { width: 20px; height: 20px; border-radius: 5px; vertical-align: -5px; margin-right: .35rem; }
.payments__note { flex-basis: 100%; color: var(--muted); font-size: .82rem; margin-top: .2rem; }
