
/* Fidélité ViTO Tournant Vidot — styles communs de l'appli et de la page Admin.
   Mise en page : une appli de téléphone en colonne unique (430px max), menu fixe en bas ; la configuration s'ouvre à part, en pleine largeur. */
:root {
  color-scheme: light;
  --vert: #0B7A5E;
  --vert-fonce: #0A5F4A;
  --vert-pale: #DDF3EA;
  --rouge: #B3001F;
  --rouge-vif: #E11F3C;
  --fond: #F4F6F8;
  --carte: #FFFFFF;
  --encre: #10243E;
  --gris: #4A5A70;
  --trait: #E1E6EC;
  --pastille: #D5DCE5;
  --texte: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --titre: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --slogan: 'Tektrron', 'Barlow', sans-serif;
}
@font-face { font-family: 'Tektrron'; src: url(polices/Tektrron.ttf) format('truetype'); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* L'appli client a un fond vert clair sur tous les onglets ; la page Admin garde le gris. */
body.fond-appli { --fond: #E6F5EE; }
.fond-appli .bandeau-ok { background: #FFFFFF; border-left: 4px solid var(--vert); }
body { background: var(--fond); color: var(--encre); font-family: var(--texte); font-size: 16px; line-height: 1.35; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: #0B4F8A; }
:focus-visible { outline: 3px solid #0B4F8A; outline-offset: 2px; }

.appli { max-width: 430px; margin: 0 auto; padding-inline: 16px; padding-block: 16px 104px; display: flex; flex-direction: column; gap: 18px; }
.vue { display: flex; flex-direction: column; gap: 18px; }
.titre { font-family: var(--titre); font-weight: 700; font-size: 30px; line-height: 1; }
.rubrique { font-family: var(--titre); font-weight: 700; font-size: 22px; line-height: 1.1; }
.discret { color: var(--gris); font-size: 15px; }
.petit { color: var(--gris); font-size: 13px; }
.bloc { display: flex; flex-direction: column; gap: 10px; }
.fiche { background: var(--carte); border-radius: 14px; padding: 12px; }
.vide { background: var(--carte); border-radius: 14px; padding: 14px; color: var(--gris); font-size: 15px; }

.entete { display: flex; flex-direction: column; gap: 4px; }
.ligne-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.points-info { font-weight: 700; color: var(--rouge); white-space: nowrap; }
.marque { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.marque .titre { white-space: nowrap; }
.filets-slogan { display: flex; align-items: center; gap: 8px; }
.filets { flex: 1; min-width: 16px; display: flex; flex-direction: column; gap: 2px; }
.filets i { display: block; height: 3px; background: var(--rouge-vif); }
.filets i + i { background: #00966E; }
.slogan { font-style: italic; color: var(--rouge); white-space: nowrap; }

.fixe { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: var(--fond); padding-block: 4px 8px; display: flex; flex-direction: column; gap: 10px; }
.offre { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.dates { padding: 2px 8px; border-radius: 6px; background: var(--vert); color: #FFFFFF; font-size: 13px; font-weight: 600; }
.offre h3, .actu h3 { font-size: 17px; font-weight: 600; }
.actu { display: flex; flex-direction: column; gap: 2px; }
.avec-photo { display: flex; gap: 12px; align-items: center; }
.avec-photo > div { flex: 1; min-width: 0; }
.vignette { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; }
.vignette.mini { width: 48px; height: 48px; border-radius: 8px; }
.fete { position: relative; overflow: hidden; border-radius: 12px; min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: center; font-family: var(--titre); font-weight: 700; font-size: 20px; line-height: 1.15; text-align: center; }
.fete svg { position: absolute; width: 18px; height: 18px; fill: currentColor; opacity: 0.4; }
.fete svg:nth-of-type(1) { left: 4%; top: 6px; } .fete svg:nth-of-type(2) { left: 16%; bottom: 4px; width: 12px; height: 12px; }
.fete svg:nth-of-type(3) { left: 46%; top: 2px; width: 11px; height: 11px; } .fete svg:nth-of-type(4) { right: 15%; top: 5px; width: 13px; height: 13px; }
.fete svg:nth-of-type(5) { right: 4%; bottom: 6px; } .fete svg:nth-of-type(6) { left: 62%; bottom: 2px; width: 10px; height: 10px; }
.fete-texte { position: relative; max-width: 100%; text-wrap: balance; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.fete.motifs svg { animation: flotte 2.6s ease-in-out infinite alternate; }
.fete.motifs svg:nth-of-type(even) { animation-duration: 3.4s; animation-direction: alternate-reverse; }
.fete.defile .fete-texte { overflow: hidden; width: 100%; white-space: nowrap; text-align: left; }
.fete.defile .fete-texte span { display: inline-block; padding-left: 100%; animation: defile 12s linear infinite; }
@keyframes flotte { from { transform: translateY(3px) rotate(-14deg) scale(0.9); } to { transform: translateY(-5px) rotate(14deg) scale(1.15); } }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .fete svg, .fete .fete-texte span { animation: none !important; } .fete.defile .fete-texte { white-space: normal; text-align: center; } .fete.defile .fete-texte span { padding-left: 0; } }
.bandeau-ok { padding: 12px 14px; border-radius: 12px; background: var(--vert-pale); color: #0B5C48; font-size: 15px; font-weight: 500; }

.cadeaux { background: var(--carte); border-radius: 14px; padding: 0 12px; }
.cadeau { padding: 10px 0; border-bottom: 1px solid var(--trait); display: flex; gap: 12px; align-items: flex-start; }
.cadeau:last-child { border-bottom: 0; }
.pastille { flex: none; width: 84px; padding: 3px 0; border-radius: 8px; background: var(--pastille); color: #3B4A60; font-size: 14px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.pastille.ok { background: var(--vert); color: #FFFFFF; }
.cadeau-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cadeau-nom { font-weight: 600; line-height: 1.3; }
.droite { align-self: flex-end; }
.etat { align-self: flex-end; font-size: 15px; font-weight: 600; color: #0B5C48; }

.bouton { min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--vert); color: #FFFFFF; font-size: 15px; font-weight: 600; cursor: pointer; }
.bouton:hover { background: var(--vert-fonce); }
.bouton.second { background: var(--carte); color: var(--encre); border: 1px solid #9AA7B8; }
.bouton.second:hover { background: var(--fond); }
.bouton.danger { background: var(--carte); color: var(--rouge); border: 1px solid var(--rouge); }
.bouton.danger.sur { background: var(--rouge); color: #FFFFFF; }
.rangee { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
label { font-size: 14px; color: var(--gris); display: block; }
input[type=text], input[type=password], input[type=number], input[type=date], textarea, select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #9AA7B8; border-radius: 8px; background: #FFFFFF; }
textarea { resize: vertical; }
.champ { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.wallet { background: var(--vert); color: #FFFFFF; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 28px rgba(16, 36, 62, 0.28); display: flex; flex-direction: column; }
.wallet .lisere { height: 8px; background: var(--rouge-vif); }
.wallet .nom-station { padding: 14px 20px; font-family: var(--titre); font-weight: 700; font-size: 22px; line-height: 1.1; }
.wallet img.bandeau { display: block; width: 100%; aspect-ratio: 1125 / 432; object-fit: cover; }
.wallet .infos { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.wallet .etiquette { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: #E3F6EE; }
.wallet .solde { text-align: right; }
.wallet .solde b { display: block; font-family: var(--titre); font-weight: 700; font-size: 48px; line-height: 1; }
.wallet { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.suggestions { border-radius: 8px; overflow: hidden; }
.suggestions:not(:empty) { border: 1px solid #9AA7B8; margin-top: 4px; }
.suggestions .sugg { display: flex; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--trait); background: #FFFFFF; text-align: left; font-size: 15px; cursor: pointer; }
.suggestions .sugg:last-child { border-bottom: 0; }
.suggestions .sugg:hover { background: var(--vert-pale); }
.suggestions .sugg small { color: var(--gris); white-space: nowrap; }
.choisis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.puce { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 999px; background: var(--vert-pale); color: #0B5C48; font-size: 14px; font-weight: 500; cursor: pointer; }
.puce.sans { background: #FFF2CC; color: #5A4300; }
.sous-carte { margin-top: 12px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.wallet .porteur { font-size: 20px; font-weight: 500; line-height: 1.35; }
.wallet .porteur:empty { display: none; }
.sous-carte .astuce { color: var(--gris); }
/* Carte en plein écran (toucher la carte) : pour la présenter en caisse ; toucher à nouveau pour revenir. */
.carte-plein { overflow: hidden; }
.carte-plein .wallet { position: fixed; inset: 0; z-index: 30; border-radius: 0; box-shadow: none; overflow-y: auto; padding-top: env(safe-area-inset-top, 0px); }
.carte-plein .wallet > * { flex: none; }
.carte-plein .wallet .nom-station { padding: 18px 24px; font-size: 28px; }
.carte-plein .wallet .infos { flex: 1 0 auto; justify-content: center; gap: 20px; padding: 20px 24px 24px; }
.carte-plein .wallet .etiquette { font-size: 14px; }
.carte-plein .wallet .solde b { font-size: 64px; }
.carte-plein .wallet .porteur { font-size: 24px; }
.carte-plein .pied .slogan { font-size: 14px; }
.carte-plein .wallet .code { padding: 22px 14px; }
.carte-plein .wallet .code svg { height: 120px; }
.carte-plein .wallet .pied { margin-top: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: no-preference) { .carte-plein .wallet { animation: agrandir 0.2s ease-out; } }
@keyframes agrandir { from { transform: scale(0.94); opacity: 0.6; } to { transform: none; opacity: 1; } }
.code { background: #FFFFFF; border-radius: 12px; padding: 16px 12px; margin-top: 6px; }
.code svg { display: block; width: 100%; height: 72px; }
.pied { position: relative; background: #FFFFFF; min-height: 64px; margin-top: 30px; padding: 0 14px 22px 0; display: flex; align-items: flex-end; gap: 8px; }
.pied .slogan { position: relative; z-index: 1; font-family: var(--slogan); font-size: 12px; line-height: 1.1; }
.pied .filets { margin-bottom: 3px; }
.pied .rond { position: absolute; right: 8px; bottom: 34px; width: 80px; height: 80px; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.pied .rond img { width: 64px; height: auto; display: block; }

.liste-infos { background: var(--carte); border-radius: 14px; }
.liste-infos > div { padding: 12px 16px; border-bottom: 1px solid var(--trait); display: flex; flex-direction: column; gap: 2px; }
.liste-infos > div:last-child { border-bottom: 0; }
.liste-infos .intitule { font-size: 13px; font-weight: 600; color: var(--gris); }
.liste-infos .valeur { font-size: 17px; user-select: all; }
.liens { display: flex; flex-wrap: wrap; gap: 18px; }
.liens a { min-height: 32px; display: inline-flex; align-items: center; font-size: 17px; }

.menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--carte); border-top: 1px solid var(--trait); padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.menu div { max-width: 430px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.menu button { min-height: 54px; border: 0; background: none; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-weight: 500; color: var(--gris); cursor: pointer; }
.menu button[aria-current=page] { color: var(--encre); font-weight: 700; }
.menu svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vers-config { align-self: center; background: none; border: 0; color: var(--gris); font-size: 14px; text-decoration: underline; min-height: 44px; cursor: pointer; }

.config { max-width: 720px; margin: 0 auto; padding-inline: 16px; padding-block: 16px 48px; display: flex; flex-direction: column; gap: 24px; }
.config-haut { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ligne-config { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.ligne-config:last-child { border-bottom: 0; }
.ligne-config > div:first-child { flex: 1 1 220px; min-width: 0; }
.avis { padding: 10px 14px; border-radius: 10px; background: #FFF2CC; color: #5A4300; font-size: 15px; }
.note-essai { text-align: center; }
@media (prefers-reduced-motion: no-preference) { .bandeau-ok { transition: background 0.2s; } }

/* ---- Ajouts du serveur réel ---- */
body { margin: 0; }
.ecran-centre { max-width: 430px; margin: 0 auto; padding-inline: 16px; padding-block: 32px 48px; display: flex; flex-direction: column; gap: 18px; }
.code-activation { font-family: var(--titre); font-weight: 700; font-size: 44px; letter-spacing: 0.08em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: flex; justify-content: center; }
.qr img, .qr canvas { width: 220px; height: 220px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--encre); }
.case input { width: 22px; height: 22px; margin: 0; flex: none; }
.erreur-txt { color: var(--rouge); font-weight: 600; }
.chargement { color: var(--gris); text-align: center; padding: 24px; }

/* Historique des points (v1.4) */
.mouvement { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(16, 36, 62, 0.08); }
.mouvement:last-child { border-bottom: 0; }
.mouvement > span:first-child { display: flex; flex-direction: column; }
.mouvement b { font-weight: 600; }
.mouvement .plus { color: var(--vert); font-weight: 700; white-space: nowrap; }
.mouvement .moins { color: var(--rouge); font-weight: 700; white-space: nowrap; }
.reserve { text-align: right; margin-top: 2px; font-size: 12px; }
.bouton.second.sur { background: var(--rouge); color: #FFFFFF; border-color: var(--rouge); }
#bonjour { font-weight: 600; }

/* Onglet La station (v1.4) */
.liste-prix { background: var(--carte); border-radius: 14px; }
.liste-prix > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--trait); font-size: 16px; }
.liste-prix > div:last-child { border-bottom: 0; }
.liste-prix b { font-weight: 700; color: var(--rouge); white-space: nowrap; }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.service { background: var(--carte); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; font-weight: 500; line-height: 1.2; }
.service svg { width: 28px; height: 28px; fill: none; stroke: var(--vert); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Accueil : prochain cadeau (v1.4) */
.prochain { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; background: var(--carte); border: 0; border-radius: 14px; padding: 14px 16px; margin-top: 14px; font: inherit; color: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 36, 62, 0.06); }
.prochain-titre { font-size: 13px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: 0.04em; }
.prochain-nom { font-size: 17px; font-weight: 700; color: var(--encre); }
.jauge { display: block; height: 10px; border-radius: 5px; background: var(--vert-pale); overflow: hidden; }
.jauge i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--vert), #16A37F); transition: width 0.8s ease; }
.prochain-lien { font-size: 14px; font-weight: 600; color: var(--vert); }
/* Accueil : animation « bientôt de nouvelles offres » (paquet → cœur → logo en 3D) */
.bientot { display: flex; flex-direction: row; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 10px 16px; text-align: left; background: var(--carte); border: 0; border-radius: 18px; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; overflow: hidden; }
.scene { position: relative; flex: none; width: 84px; height: 84px; perspective: 700px; transition: width 0.45s ease, height 0.45s ease; }
.bientot .textes { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.bientot.ouverte { flex-direction: column; text-align: center; padding: 16px; }
.bientot.ouverte .textes { align-items: center; }
.bientot.ouverte .scene { width: 230px; height: 180px; }
.scene > .coeur, .scene > .halo { z-index: 0; } .scene > .boite { z-index: 1; } .scene > .logo3d { z-index: 2; } .scene > .etincelles, .scene > .confettis { z-index: 3; }
.scene > * { position: absolute; left: 50%; top: 50%; }
.halo { width: 210px; height: 210px; margin: -105px 0 0 -105px; border-radius: 50%; background: radial-gradient(circle, rgba(22, 163, 127, 0.45), rgba(22, 163, 127, 0) 65%); opacity: 0; transform: scale(0.3); }
.coeur { width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; object-fit: cover; -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 71%); mask-image: radial-gradient(circle, #000 52%, transparent 71%); opacity: 0; transform: scale(0.2) rotateY(-80deg); }
.boite { width: 80px; height: 80px; margin: -40px 0 0 -40px; animation: balance 3s ease-in-out infinite; transition: width 0.45s ease, height 0.45s ease, margin 0.45s ease; }
.boite svg { width: 100%; height: 100%; overflow: visible; }
.bientot.ouverte .boite { width: 110px; height: 110px; margin: -55px 0 0 -55px; }
.bientot .couvercle, .bientot .corps { transform-box: fill-box; transform-origin: 50% 50%; }
.logo3d { width: 136px; margin: -44px 0 0 -68px; opacity: 0; transform: translateY(40px) scale(0.1); filter: drop-shadow(0 0 3px #FFFFFF) drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 12px 14px rgba(16, 36, 62, 0.35)); }
.logo3d .zone-reflet { position: absolute; inset: 0; overflow: hidden; -webkit-mask: url(img/logo-vito.png) center / 100% 100% no-repeat; mask: url(img/logo-vito.png) center / 100% 100% no-repeat; }
.logo3d img { display: block; width: 136px; height: auto; }
.logo3d .reflet { position: absolute; top: -20%; left: -60%; width: 40%; height: 140%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent); transform: skewX(-20deg); opacity: 0; }
.etincelles i { position: absolute; width: 10px; height: 10px; margin: -5px; background: #F5B700; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; }
.etincelles i:nth-child(1) { left: -95px; top: -60px; } .etincelles i:nth-child(2) { left: 90px; top: -70px; background: #FFFFFF; }
.etincelles i:nth-child(3) { left: 100px; top: 40px; } .etincelles i:nth-child(4) { left: -100px; top: 50px; background: #E11F3C; }
.etincelles i:nth-child(5) { left: -20px; top: -95px; background: #16A37F; } .etincelles i:nth-child(6) { left: 30px; top: 85px; }
.bientot-titre { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 21px; color: var(--encre); }
.bientot-texte { font-size: 14px; color: var(--gris); }
.confettis { position: absolute; left: 50%; top: 45%; width: 0; height: 0; }
.confettis i { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: confetti 1.4s ease-out forwards; }
/* Ouverture */
.bientot.ouverte .boite { animation: secoue 0.45s ease-in-out, boite-part 0.5s 0.75s ease-in forwards; }
.bientot.ouverte .couvercle { animation: couvercle-saute 0.8s 0.45s cubic-bezier(.2, .9, .3, 1) forwards; }
.bientot.ouverte .halo { animation: halo-pulse 2.4s 0.7s ease-out forwards; }
.bientot.ouverte .coeur { animation: coeur-entre 0.9s 0.7s cubic-bezier(.2, 1.3, .4, 1) forwards, coeur-bat 1.6s 1.7s ease-in-out infinite; }
.bientot.ouverte .logo3d { animation: logo-jaillit 1.3s 0.95s cubic-bezier(.2, 1, .3, 1) forwards, logo-flotte 3s 2.3s ease-in-out infinite; }
.bientot.ouverte .reflet { animation: reflet 0.9s 2.2s ease-in-out forwards; }
.bientot.ouverte .etincelles i { animation: etincelle 1.2s ease-out forwards; }
.bientot.ouverte .etincelles i:nth-child(1) { animation-delay: 1.3s; } .bientot.ouverte .etincelles i:nth-child(2) { animation-delay: 1.45s; }
.bientot.ouverte .etincelles i:nth-child(3) { animation-delay: 1.6s; } .bientot.ouverte .etincelles i:nth-child(4) { animation-delay: 1.4s; }
.bientot.ouverte .etincelles i:nth-child(5) { animation-delay: 1.75s; } .bientot.ouverte .etincelles i:nth-child(6) { animation-delay: 1.55s; }
.bientot.ferme .scene { transition: opacity 0.7s ease, transform 0.7s ease; opacity: 0; transform: scale(0.85); }
@keyframes balance { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-6px) rotate(-3deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-4px) rotate(3deg); } }
@keyframes secoue { 0%, 100% { transform: rotate(0) scale(1); } 20% { transform: rotate(-9deg) scale(1.05); } 40% { transform: rotate(8deg) scale(1.08); } 60% { transform: rotate(-6deg) scale(1.05); } 80% { transform: rotate(4deg) scale(1.02); } }
@keyframes couvercle-saute { 0% { transform: translate(0, 0) rotateX(0) rotate(0); } 40% { transform: translate(10px, -70px) rotateX(55deg) rotate(18deg); opacity: 1; } 100% { transform: translate(70px, -150px) rotateX(120deg) rotate(60deg); opacity: 0; } }
@keyframes boite-part { to { transform: translateY(60px) scale(0.6) rotateX(50deg); opacity: 0; } }
@keyframes halo-pulse { 0% { opacity: 0; transform: scale(0.3); } 40% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0.7; transform: scale(1); } }
@keyframes coeur-entre { 0% { opacity: 0; transform: scale(0.2) rotateY(-80deg); } 100% { opacity: 1; transform: scale(1) rotateY(0); } }
@keyframes coeur-bat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.06); } 30% { transform: scale(0.99); } 45% { transform: scale(1.04); } }
@keyframes logo-jaillit { 0% { opacity: 0; transform: translateY(50px) scale(0.1) rotateY(0); } 35% { opacity: 1; transform: translateY(-40px) scale(1.15) rotateY(400deg); } 70% { transform: translateY(6px) scale(0.96) rotateY(700deg); } 100% { opacity: 1; transform: translateY(0) scale(1) rotateY(720deg); } }
@keyframes logo-flotte { 0%, 100% { opacity: 1; transform: translateY(0) rotateY(0) rotateX(0); } 50% { opacity: 1; transform: translateY(-6px) rotateY(14deg) rotateX(6deg); } }
@keyframes reflet { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
@keyframes etincelle { 0% { opacity: 0; transform: scale(0) rotate(0); } 40% { opacity: 1; transform: scale(1.6) rotate(90deg); } 100% { opacity: 0; transform: scale(0.4) rotate(180deg); } }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) {
  .boite, .bientot.ouverte .boite, .bientot.ouverte .couvercle, .bientot.ouverte .coeur, .bientot.ouverte .logo3d, .bientot.ouverte .halo, .bientot.ouverte .reflet, .bientot.ouverte .etincelles i { animation: none; }
  .bientot.ouverte .boite { opacity: 0; } .bientot.ouverte .coeur, .bientot.ouverte .logo3d { opacity: 1; transform: none; } .jauge i { transition: none; }
}
.liste-prix b { color: #0E8ACB; }
.service-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-top: 4px; background: var(--vert-pale); }
.service.avec-image { padding-bottom: 6px; }

/* Historique : résumé de l'année et mois */
.resume { background: var(--carte); border-radius: 14px; padding: 14px 16px; margin-top: 12px; }
.resume .rubrique { margin: 0 0 10px; }
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin-bottom: 8px; }
.chiffres div { display: flex; flex-direction: column; }
.chiffres b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.chiffres b.plus { color: var(--vert); }
.chiffres b.moins { color: var(--rouge); }
.chiffres span { font-size: 13px; color: var(--gris); }
.mois-titre { font-size: 15px; font-weight: 700; color: var(--gris); text-transform: capitalize; margin: 18px 4px 6px; }

/* Préférences repliées, logo de l'onglet Station */
.pref-resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 16px; background: var(--carte); border-radius: 14px; font-size: 14px; color: var(--gris); }
.pref-modifier { border: 0; background: none; color: var(--vert); font: inherit; font-weight: 600; min-height: 44px; padding: 0 4px; cursor: pointer; }
.logo-titre { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; background: #FFFFFF; padding: 3px; box-shadow: 0 1px 4px rgba(16, 36, 62, 0.15); }

/* Anniversaire */
.anniv { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-top: 14px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #FFF4D6, #FFE1E6); }
.anniv-gateau { font-size: 40px; line-height: 1; animation: balance 3s ease-in-out infinite; }
.anniv-titre { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 24px; color: var(--rouge); }
.anniv-texte { font-size: 15px; color: var(--encre); }
.anniv .confettis { top: 30%; }
.pref-resume #pref-texte { display: flex; flex-direction: column; gap: 4px; }

/* Anniversaire dans Ma carte, rappel d'expiration */
.anniv-carte { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-top: 12px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #FFF4D6, #FFE1E6); }
.anniv-code { width: 100%; max-width: 300px; height: 80px; background: #FFFFFF; border-radius: 10px; padding: 10px; }
.anniv-code svg { width: 100%; height: 100%; }
.rappel { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #FFF1F3; border-left: 4px solid var(--rouge-vif); font-size: 14px; color: var(--encre); }
.rappel b { color: var(--rouge); font-size: 16px; }

/* Notifications */
.notif-bloc { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 16px; background: var(--carte); border-radius: 14px; font-size: 14px; color: var(--gris); }
.notif-bloc[hidden] { display: none; }
.notif-bloc .bouton { min-height: 40px; }

/* Conditions générales dans l'appli */
.lien-cgu { border: 0; background: none; padding: 0; min-height: 32px; font: inherit; font-size: 14px; color: var(--vert); text-decoration: underline; cursor: pointer; text-align: left; }
.cgu h3 { font-size: 16px; font-weight: 700; margin: 18px 0 6px; color: var(--encre); }
.cgu p, .cgu li { font-size: 15px; line-height: 1.45; color: var(--encre); }
.cgu p { margin: 0 0 8px; }
.cgu ul { margin: 0 0 8px; padding-left: 20px; }
.cgu .rubrique { margin-top: 22px; }
.table-cgu { overflow-x: auto; margin: 6px 0 10px; }
.table-cgu table { border-collapse: collapse; width: 100%; font-size: 13px; background: var(--carte); }
.table-cgu th, .table-cgu td { border: 1px solid var(--trait); padding: 6px 8px; text-align: left; vertical-align: top; }
.table-cgu th { background: var(--vert-pale); }

/* Comptes professionnels */
.badge-pro { display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #F5B700; color: #10243E; font-size: 14px; font-weight: 800; letter-spacing: 0.08em; vertical-align: middle; }
.pro-panneau { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #FFFFFF; color: #10243E; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.pro-panneau b { font-size: 18px; color: #0A5F4A; }
.pro-panneau span { font-size: 13px; color: #4A5A70; }
.pro-panneau .total { color: #9AA6B5; }
.cadeau.bride { opacity: 0.5; }
.choix-profil { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.choix-profil legend { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.type-compte { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 12px 16px; background: var(--carte); border-radius: 14px; font-size: 14px; color: var(--gris); }
.pref-modifier.sur { color: var(--rouge); }

/* ---------- Accueil v1.6 : salut selon l'heure, ouverture, phrase du jour, barre compacte, carrousel ---------- */
.salut { font-family: var(--titre); font-size: 22px; font-weight: 700; color: var(--vert-fonce); }
.marque-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-entete { flex: none; width: 58px; height: 58px; border-radius: 50%; background: #FFFFFF; padding: 5px; object-fit: contain; box-shadow: 0 2px 8px rgba(16, 36, 62, 0.12); }
.infos-jour { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; align-items: flex-start; }
.ouvert { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: #0B5C48; white-space: nowrap; }
.ouvert::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #16A37F; }
.ouvert.ferme { color: var(--rouge); }
.ouvert.ferme::before { background: var(--rouge-vif); }
.phrase { font-style: italic; color: var(--gris); font-size: 15px; }

.tete-fixe { position: sticky; top: 0; z-index: 3; margin: -16px -16px 0; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--fond); display: flex; flex-direction: column; gap: 10px; transition: box-shadow 0.3s; }
.reduit .tete-fixe { box-shadow: 0 6px 12px -8px rgba(16, 36, 62, 0.25); }
.phrase-ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 0; }
.phrase-ligne .phrase { margin: 0; flex: 1; min-width: 0; }
.puce-cadeau { flex: none; opacity: 0; transform: scale(0.4) translateY(30px); transform-origin: right center; pointer-events: none; max-width: 0; padding: 0; margin-left: -10px; overflow: hidden; transition: opacity 0.35s ease, transform 0.35s ease, max-width 0.35s ease, padding 0.35s ease, margin 0.35s ease; }
.reduit .puce-cadeau { opacity: 1; transform: none; pointer-events: auto; max-width: 220px; padding: 4px 12px; margin-left: 0; }
.puce-cadeau { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 0; border-radius: 999px; background: var(--carte); color: var(--encre); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 36, 62, 0.08); white-space: nowrap; }
.puce-cadeau .mini-jauge { width: 34px; height: 6px; border-radius: 3px; background: var(--vert-pale); overflow: hidden; }
.puce-cadeau .mini-jauge i { display: block; height: 100%; background: var(--vert); }

.prochain { padding: 10px 14px; gap: 4px; margin-top: 0; }
.prochain-nom { font-size: 16px; }
.prochain .jauge { height: 8px; }

.carrousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 2px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carrousel::-webkit-scrollbar { display: none; }
.carte-offre { flex: none; width: 100%; scroll-snap-align: center; background: var(--carte); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(16, 36, 62, 0.08); }
.carrousel.plusieurs .carte-offre { width: 86%; }
.carte-offre img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.carte-offre .corps-offre { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.carte-offre h3 { font-size: 19px; font-weight: 700; line-height: 1.2; }
.carte-offre .sans-photo { height: 8px; background: linear-gradient(90deg, var(--rouge-vif), var(--vert)); }
.points-carrousel { display: flex; justify-content: center; gap: 6px; }
.points-carrousel:empty { display: none; }
.points-carrousel i { width: 7px; height: 7px; border-radius: 50%; background: #B8C4D2; transition: background 0.2s, width 0.2s; }
.points-carrousel i.actif { width: 18px; border-radius: 4px; background: var(--vert); }
.voir-plus { align-self: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--vert); border-radius: 999px; background: var(--carte); color: var(--vert); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }

.menu .rond-rouge { display: flex; align-items: center; justify-content: center; width: 44px; height: 38px; margin-block: -8px -2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath fill='%23E11F3C' d='M12 21.5C5 16.3 1 12.4 1 7.6 1 4 3.8 1.3 7.2 1.3c2 0 3.7 1 4.8 2.6 1.1-1.6 2.8-2.6 4.8-2.6C20.2 1.3 23 4 23 7.6c0 4.8-4 8.7-11 13.9z'/%3E%3C/svg%3E") center / contain no-repeat; color: var(--vert); padding-bottom: 4px; } /* cœur rouge derrière l'icône « Ma carte », icône en vert */
.menu .rond-rouge svg { width: 22px; height: 22px; stroke-width: 2.2; }
.menu .rond-rouge svg path:first-child { fill: #FFFFFF; }
.menu .menu-carte { -webkit-tap-highlight-color: transparent; }
.menu .menu-carte:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .prochain, .puce-cadeau { transition: none; } }
#dispo:empty, #fete:empty { display: none; }
.prochain-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.prochain-haut .points-info { font-size: 16px; }
.prochain-corps { display: flex; flex-direction: column; gap: 4px; }
.prochain .reserve { text-align: left; margin-top: 0; font-size: 11px; color: var(--gris); }
.phrase { margin-top: 4px; }
/* Encart « prochain cadeau » : se réduit vers la pastille de l'en-tête quand on fait défiler */
.prochain { max-height: 320px; overflow: hidden; transform-origin: top right; transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, padding 0.35s ease, margin 0.35s ease; }
.reduit .prochain { opacity: 0; transform: scale(0.3) translateY(-60px); max-height: 0; padding-block: 0; margin-top: -18px; pointer-events: none; }
/* Zones « Offres du moment » et « Actualités » : chacune occupe la moitié de l'écran disponible */
.zone .carrousel { align-items: stretch; } /* hauteur naturelle ; toutes les cartes d'un carrousel prennent la hauteur de la plus grande */
/* Accueil sans offre ni actualité : le cadeau « bientôt » en grand, ludique et interactif */
.bientot.grand { flex-direction: column; justify-content: center; text-align: center; min-height: var(--vide-h, 420px); padding: 44px 16px 62px; gap: 36px; margin-top: 0; background: radial-gradient(circle at 50% 40%, #FFFFFF 0, #FFFFFF 55%, #F2FAF6 100%); box-shadow: 0 2px 10px rgba(16, 36, 62, 0.08); }
.bientot.grand .textes { align-items: center; gap: 6px; }
.bientot.grand .bientot-titre { font-size: 28px; }
.bientot.grand .bientot-texte { font-size: 16px; font-weight: 600; color: var(--vert); }
.bientot.grand:not(.ouverte) .bientot-texte { animation: appel 1.8s ease-in-out infinite; }
.bientot.grand .scene { width: 230px; height: 180px; transform: scale(1.3) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.2s ease-out; }
.bientot.grand.ferme .scene { transform: scale(1.1); }
.bientot.grand .boite { width: 110px; height: 110px; margin: -55px 0 0 -55px; }
.bientot.grand:not(.ouverte) .boite { animation: sautille 2.6s ease-in-out infinite; }
.bientot.grand:not(.ouverte) .halo { opacity: 1; transform: scale(0.75); animation: respire 2.6s ease-in-out infinite; }
.bientot.grand:not(.ouverte) .etincelles i { animation: scintille 2.4s ease-in-out infinite; }
.bientot.grand:not(.ouverte) .etincelles i:nth-child(2) { animation-delay: 0.4s; } .bientot.grand:not(.ouverte) .etincelles i:nth-child(3) { animation-delay: 0.8s; }
.bientot.grand:not(.ouverte) .etincelles i:nth-child(4) { animation-delay: 1.2s; } .bientot.grand:not(.ouverte) .etincelles i:nth-child(5) { animation-delay: 1.6s; }
.bientot.grand:not(.ouverte) .etincelles i:nth-child(6) { animation-delay: 2s; }
@keyframes sautille { 0%, 55%, 100% { transform: translateY(0) rotate(0); } 62% { transform: translateY(-16px) rotate(-6deg); } 70% { transform: translateY(0) rotate(4deg); } 76% { transform: translateY(-6px) rotate(-2deg); } 82% { transform: translateY(0) rotate(0); } }
@keyframes respire { 0%, 100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(0.85); opacity: 1; } }
@keyframes scintille { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@keyframes appel { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .bientot.grand .boite, .bientot.grand .halo, .bientot.grand .etincelles i, .bientot.grand .bientot-texte { animation: none !important; } }
/* Grand cadeau : halo plus large à l'ouverture, étoiles filantes, petite route avec véhicules */
.bientot.grand { position: relative; }
.bientot.grand .textes { position: relative; z-index: 2; }
.bientot.grand.ouverte .halo { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
.bientot .filantes, .bientot .route { display: none; }
.bientot.grand .filantes { display: block; position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.filante { position: absolute; width: 70px; height: 2px; margin-top: -1px; border-radius: 2px; transform-origin: 100% 50%; background: linear-gradient(90deg, rgba(245, 183, 0, 0), #F5B700 80%, #FFFFFF); opacity: 0; animation: filer 1.2s ease-out forwards; }
.filante::after { content: ''; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 6px 2px #F5B700; }
@keyframes filer { 0% { opacity: 0; transform: translate(0, 0) rotate(var(--angle)); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--angle)); } }
.bientot.grand .route { display: block; position: absolute; z-index: 2; left: 0; right: 0; bottom: 6px; height: 30px; overflow: hidden; pointer-events: none; } /* en bas du cadre, sans l'agrandir */
.vehicule { position: absolute; bottom: 2px; left: 100%; width: 58px; height: 26px; opacity: 0.5; animation: rouler-gauche 6s cubic-bezier(.45, .05, .55, .95) forwards; }
.vehicule svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--vert); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vehicule::after { content: ''; position: absolute; top: 40%; right: 100%; width: 34px; height: 8px; background: repeating-linear-gradient(180deg, rgba(11, 122, 94, 0.35) 0 1.5px, transparent 1.5px 4px); -webkit-mask-image: linear-gradient(270deg, #000, transparent); mask-image: linear-gradient(270deg, #000, transparent); }
.vehicule.droite { left: auto; right: 100%; }
@keyframes rouler-gauche { from { transform: translateX(0); } to { transform: translateX(calc(-100vw - 160px)); } }
.vehicule.gauche svg { transform: scaleX(-1); } /* l'avant du véhicule regarde vers la gauche */
.vehicule.gauche::after { right: auto; left: 100%; -webkit-mask-image: linear-gradient(90deg, #000, transparent); mask-image: linear-gradient(90deg, #000, transparent); }
@keyframes rouler-droite { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 160px)); } }
.vehicule.droite { animation-name: rouler-droite; }
/* « Bonjour » en compteur : le mot sort vers le haut, le suivant arrive par le bas */
.salut { line-height: 1.2; }
.mot-salut { position: relative; display: inline-block; height: 1.2em; line-height: 1.2; overflow: hidden; vertical-align: top; transition: width 0.5s ease; white-space: nowrap; }
.mot-salut > span { display: inline-block; white-space: nowrap; }
.mot-salut > span.entre { position: absolute; left: 0; top: 0; animation: salut-entre 0.55s cubic-bezier(.3, 1.3, .5, 1) forwards; }
.mot-salut > span.sort { animation: salut-sort 0.5s ease-in forwards; }
@keyframes salut-entre { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes salut-sort { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-110%); opacity: 0.2; } }
/* Demande d'adresse mail (Ma carte) */
.mail-demande { margin-bottom: 14px; border: 2px solid var(--vert-pale); }
.mail-rappel { align-self: center; margin-top: 6px; min-height: 36px; padding: 4px 14px; border: 1px dashed var(--vert); border-radius: 999px; background: var(--carte); color: var(--vert); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
/* Page Admin : une tuile par rubrique ; une rubrique ouverte s'affiche seule, avec Retour / Enregistrer en bas */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tuile { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 64px; padding: 12px 16px; border: 0; border-radius: 14px; background: var(--carte); color: var(--encre); font: inherit; font-family: var(--titre); font-size: 19px; font-weight: 700; line-height: 1.15; text-align: left; cursor: pointer; box-shadow: 0 1px 3px rgba(16, 36, 62, 0.08); }
.tuile:hover { box-shadow: 0 2px 10px rgba(16, 36, 62, 0.14); }
.tuile .fleche { color: var(--gris); font-size: 26px; font-weight: 400; }
.tuile .compteur { flex: none; min-width: 28px; padding: 2px 9px; border-radius: 999px; background: var(--rouge-vif); color: #FFFFFF; font-family: var(--texte); font-size: 14px; text-align: center; }
#config > section.bloc { display: none; }
#config.une-rubrique > section.bloc.ouverte { display: flex; }
#config.une-rubrique > .tuiles, #config.une-rubrique > .config-haut { display: none; }
#config.une-rubrique { padding-bottom: 104px; }
.barre-rubrique { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--carte); border-top: 1px solid var(--trait); box-shadow: 0 -4px 14px rgba(16, 36, 62, 0.08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.barre-rubrique > div { max-width: 720px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; }
.barre-rubrique .bouton { min-width: 130px; }
#config.une-rubrique .enr-auto { display: none; }
.tuiles-tete { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tuile-groupe { grid-column: 1 / -1; background: var(--vert); color: #FFFFFF; }
.tuile-groupe .fleche { color: #FFFFFF; }
#config.une-rubrique .phrases-longues { min-height: calc(100vh - 300px); min-height: calc(100dvh - 300px); line-height: 1.5; }
#config .enr-auto + .etat, #config .etat { order: -1; }
/* Admin : fiche client en consultation, étapes des demandes de carte */
#config input[readonly] { background: var(--fond); color: var(--encre); border-color: var(--trait); }
.etapes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.etapes span { padding: 3px 9px; border-radius: 999px; background: var(--fond); color: var(--gris); font-size: 13px; font-weight: 600; }
.etapes span.fait { background: var(--vert-pale); color: #0B5C48; }
.etapes span.attente { background: #FFF2CC; color: #5A4300; }
.etapes span.a-faire { background: var(--rouge-vif); color: #FFFFFF; }
/* Ma carte : mes informations (lecture seule) et bande « à renseigner » */
.infos-liste { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 15px; }
.infos-liste dt { color: var(--gris); }
.infos-liste dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.infos-liste .manque { color: var(--rouge); font-weight: 600; font-style: italic; }
.info-manque { display: block; width: 100%; min-height: 44px; padding: 10px 20px; border: 0; border-radius: 0; background: #F5B700; color: #3D2E00; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12); animation: appel-doux 2.4s ease-in-out infinite; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.mes-infos { margin-top: 12px; }
.ligne-config.ligne-verte { background: var(--vert-pale); border-radius: 10px; padding-inline: 10px; }
.carte-plein .info-manque { display: none; }
.type-compte { display: none; } /* le type de compte est affiché dans « Mes informations » */
.alerte-retard { grid-column: 1 / -1; min-height: 52px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--rouge-vif); color: #FFFFFF; font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; }
@keyframes appel-doux { 0%, 100% { filter: none; } 50% { filter: brightness(1.08); } }
.apercu-photo img { display: block; width: 100%; max-width: 360px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; } /* même cadre 16:9 que dans l'appli */
/* Cadres fixes, identiques pour toutes les offres et actualités : image 16:9 (paysage), puis un bloc texte de hauteur fixe
   (dates, titre sur 2 lignes, description sur 2 lignes). Sans photo, le cadre image affiche le logo sur fond vert. */
.zone .carte-offre img, .zone .carte-offre .sans-photo { flex: none; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.zone .carte-offre .sans-photo { background: url(img/logo-vito.png) center / auto 56% no-repeat, linear-gradient(135deg, #FFFFFF, #DDF3EA); }
.zone .carte-offre { width: 86%; } /* même largeur partout : cadres identiques dans les deux zones */
.zone .carrousel:not(.plusieurs) { justify-content: center; }
.zone .carte-offre .corps-offre { flex: none; height: 128px; overflow: hidden; justify-content: flex-start; }
.zone .carte-offre h3 { font-size: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zone .carte-offre .corps-offre p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zone .carrousel { align-items: flex-start; }
/* Le bandeau d'accueil (fête) disparaît avec l'encart « prochain cadeau » quand on fait défiler */
#vue-accueil #fete { max-height: 420px; overflow: hidden; transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease; }
#vue-accueil.reduit #fete { max-height: 0; opacity: 0; margin-top: -10px; }
/* Flèche « Offres et actualités » au-dessus du menu */
.fleche-offres { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 4; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px 6px 16px; border: 0; border-radius: 999px; background: var(--vert); color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600; box-shadow: 0 4px 14px rgba(16, 36, 62, 0.25); cursor: pointer; animation: fleche-saute 1.8s ease-in-out infinite; }
.fleche-offres svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes fleche-saute { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }
@media (prefers-reduced-motion: reduce) { .fleche-offres { animation: none; } }

/* Accueil : les offres glissent vers le haut quand l'encart « prochain cadeau » se réduit. */
#vue-accueil .zone, #vue-accueil #bientot { transition: margin-top 0.35s ease; }
/* Simulation : défilement dans un conteneur interne (sur iPhone, la page de simulation ne fait pas défiler la fenêtre). */
html.defile-interne, html.defile-interne body { height: 100%; overflow: hidden; }
html.defile-interne .appli { position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.defile-interne #avis { position: fixed; top: 0; left: 0; right: 0; z-index: 6; max-width: 400px; margin: 12px auto 0 !important; }

/* ===== Accueil : présentation « cadeau au centre » ===== */
.anneau, .prochain-nom .encore { display: none; }
/* En-tête plus compact  */
.disp-2 .entete { gap: 2px; }
.disp-2 .salut { font-size: 19px; }
.disp-2 .marque .titre { font-size: 25px; }
.disp-2 .slogan { font-size: 14px; }
.disp-2 .logo-entete { width: 46px; height: 46px; padding: 4px; }
.disp-2 .phrase { font-size: 14px; line-height: 1.3; }
.disp-2 .tete-fixe { gap: 8px; }
/* Piste 2 : le cadeau au centre (anneau de progression) */
.disp-2 .prochain { align-items: center; text-align: center; padding: 14px 16px 12px; gap: 6px; border-radius: 22px; box-shadow: 0 8px 22px -10px rgba(16, 36, 62, 0.25); background: linear-gradient(180deg, #FFFFFF 55%, #F1FAF6); }
.disp-2 .prochain-haut { justify-content: center; }
.disp-2 .prochain-haut .points-info { display: none; }
.disp-2 .prochain-corps { align-items: center; gap: 6px; }
.disp-2 .prochain .jauge { display: none; }
.disp-2 .prochain-nom { font-size: 19px; }
.disp-2 .prochain-nom .encore { display: block; font-size: 15px; font-weight: 600; color: var(--rouge); }
.disp-2 .prochain .reserve { text-align: center; }
.disp-2 .anneau { --part: 50; display: grid; place-items: center; position: relative; width: 156px; height: 156px; margin: 2px 0 4px; border-radius: 50%;
  background: conic-gradient(var(--vert) calc(var(--part) * 1%), #DDF3EA 0); animation: anneau-entre 1.1s cubic-bezier(.2, .9, .3, 1) both; }
.disp-2 .anneau::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 0 rgba(11, 122, 94, 0.25); animation: anneau-pulse 2.8s 1.2s ease-out infinite; }
.disp-2 .anneau-in { width: 126px; height: 126px; border-radius: 50%; background: #FFFFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 2px 6px rgba(16, 36, 62, 0.08); }
.disp-2 .anneau-in b { font-family: var(--titre); font-size: 42px; line-height: 0.95; color: var(--rouge); }
.disp-2 .anneau-in small { font-size: 15px; font-weight: 700; color: var(--rouge); }
.disp-2 .anneau-in em { margin-top: 4px; font-style: normal; font-size: 13px; color: var(--gris); }
.disp-2 .anneau-cadeau { position: absolute; top: -6px; right: 0; width: 40px; height: 40px; display: grid; place-items: center; font-size: 22px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 3px 10px rgba(16, 36, 62, 0.18); animation: sautille 2.6s ease-in-out infinite; }
.disp-2 .anneau .et { position: absolute; font-style: normal; color: #F5B700; font-size: 16px; animation: scintille 2.4s ease-in-out infinite; }
.disp-2 .anneau .et1 { left: -14px; top: 40px; } .disp-2 .anneau .et2 { right: -16px; bottom: 46px; animation-delay: 0.8s; font-size: 12px; } .disp-2 .anneau .et3 { left: 20px; bottom: -6px; animation-delay: 1.6s; font-size: 13px; }
@keyframes anneau-entre { from { transform: scale(0.85) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes anneau-pulse { 0% { box-shadow: 0 0 0 0 rgba(11, 122, 94, 0.28); } 70%, 100% { box-shadow: 0 0 0 14px rgba(11, 122, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .disp-2 .anneau, .disp-2 .anneau::after, .disp-2 .anneau-cadeau, .disp-2 .anneau .et { animation: none; } }
.disp-2 .prochain { margin-top: 0; }
.disp-2 .prochain { max-height: 680px; }
.disp-2 .reduit .prochain { max-height: 0; padding-block: 0; margin-top: -18px; }

/* Accueil réduit : la phrase du jour s'efface et « encore … pts » prend la place de « Ouvert / Fermé ». */
#vue-accueil .phrase-ligne { max-height: 140px; overflow: hidden; transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease; }
#vue-accueil.reduit .phrase-ligne { max-height: 0; opacity: 0; margin-top: -8px; }
#vue-accueil .entete > .ligne-haut { align-items: center; min-height: 32px; }
#vue-accueil.reduit #ouvert { display: none !important; }
.fleche-offres { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
#vue-accueil:not(.reduit) .puce-cadeau { position: absolute; right: 16px; }

/* L'en-tête de l'accueil ne bouge jamais : quand on tire l'écran (effet élastique de l'iPhone), l'espace s'ouvre sous l'en-tête, avant les offres. */
#vue-accueil .tete-fixe { position: fixed; top: 0; left: 0; right: 0; max-width: 430px; margin: 0 auto; }
#vue-accueil .tete-espace { flex: none; margin-top: -16px; }

/* Encarts d'offres plus compacts : les deux tiennent sur un écran (largeur calculée selon l'écran) */
.zone .carte-offre, .zone .carrousel.plusieurs .carte-offre { width: var(--carte-l, 86%); }
.zone .carte-offre .corps-offre { height: 112px; padding: 10px 12px 12px; gap: 4px; }
.zone .carte-offre h3 { font-size: 17px; }
.zone .carte-offre .corps-offre p { -webkit-line-clamp: 1; font-size: 14px; }
.zone .carte-offre img { cursor: zoom-in; }
/* Zoom sur une image */
.zoom-image { position: fixed; inset: 0; z-index: 50; background: rgba(8, 18, 30, 0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(56px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px)); opacity: 0; transition: opacity 0.2s ease; }
.zoom-image.ouvert { opacity: 1; }
.zoom-image img { max-width: 100%; max-height: 78vh; border-radius: 12px; object-fit: contain; transform: scale(0.92); transition: transform 0.25s ease; }
.zoom-image.ouvert img { transform: none; }
.zoom-titre { color: #FFFFFF; font-weight: 600; font-size: 16px; text-align: center; max-width: 400px; }
.zoom-titre:empty { display: none; }
.zoom-fermer { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: #10243E; font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
/* Carte en plein écran : rien ne la recouvre (le menu se cache le temps de la présenter en caisse). */
.carte-plein .menu, .carte-plein .fleche-offres { display: none; }

/* Petits écrans (iPhone SE, mini…) : tout reste lisible sans se chevaucher */
.zone .carte-offre .dates { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 740px) {
  .disp-2 .anneau { width: 124px; height: 124px; margin: 0 0 2px; }
  .disp-2 .anneau-in { width: 100px; height: 100px; }
  .disp-2 .anneau-in b { font-size: 34px; }
  .disp-2 .anneau-in small { font-size: 13px; }
  .disp-2 .anneau-in em { font-size: 11px; margin-top: 2px; }
  .disp-2 .anneau-cadeau { width: 34px; height: 34px; font-size: 18px; top: -4px; right: -4px; }
  .disp-2 .prochain { padding: 10px 14px; gap: 4px; }
  .disp-2 .prochain-nom { font-size: 17px; }
  .disp-2 .prochain-corps > .petit { display: none; }
  .fleche-offres { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); min-height: 36px; }
  .zone .carte-offre .corps-offre { height: 88px; padding: 8px 12px 10px; }
  .zone .carte-offre .corps-offre p { display: none; }
  .zone .carte-offre h3 { font-size: 16px; }
  .zone .ligne-haut .rubrique { font-size: 20px; }
}
.fleche-offres { white-space: nowrap; }
/* Écrans étroits (beaucoup d'Android en 360 px) */
@media (max-width: 380px) {
  .disp-2 .salut { font-size: 17px; }
  .disp-2 .marque .titre { font-size: 23px; }
  .puce-cadeau { font-size: 12px; }
  .fleche-offres { font-size: 15px; padding: 6px 12px 6px 14px; }
}

/* Accueil à l'ouverture : pas de défilement, on passe aux offres uniquement avec le bouton. */
html.accueil-fige:not(.defile-interne), html.accueil-fige:not(.defile-interne) body, html.accueil-fige .appli { overflow: hidden; }
html.accueil-fige .appli { touch-action: none; }

/* Accueil d'un visiteur sans carte : invitation dans le cadre blanc */
.invitation { cursor: default; }
.invitation .anneau { display: grid; }
.disp-2 .invitation .anneau-in b { font-size: 40px; }
.disp-2 .invitation .anneau-in small { font-size: 15px; }
.inv-avantages { display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--gris); }
.inv-avantages span::before { content: '✓ '; color: var(--vert); font-weight: 700; }
.inv-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 4px; width: 100%; }
.inv-actions .bouton { width: 100%; max-width: 260px; min-height: 46px; border-radius: 999px; font-size: 16px; }
.inv-lien { min-height: 40px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--vert); cursor: pointer; }
@media (max-height: 740px) { .inv-avantages { display: none; } .disp-2 .invitation .anneau-in b { font-size: 32px; } .disp-2 .invitation .prochain-nom { font-size: 17px; } .inv-actions .bouton { min-height: 42px; } .inv-lien { min-height: 34px; } }
.inv-note { border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 11px; line-height: 1.35; color: var(--gris); text-align: center; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(91, 107, 128, 0.4); }

/* Historique : les mois en colonne ; on touche un mois pour voir ses achats et ses points utilisés */
.mois-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.mois-bloc { background: var(--carte); border-radius: 14px; overflow: hidden; }
.mois-ligne { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; border: 0; background: none; font: inherit; color: var(--encre); text-align: left; cursor: pointer; }
.mois-nom { flex: 1; display: flex; flex-direction: column; font-size: 17px; font-weight: 700; text-transform: capitalize; }
.mois-nom small { font-size: 13px; font-weight: 400; color: var(--gris); text-transform: none; }
.mois-pts { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; font-size: 15px; }
.mois-pts .plus { color: var(--vert); } .mois-pts .moins { color: var(--rouge); }
.mois-ligne .chevron { font-size: 22px; color: var(--gris); transition: transform 0.2s; }
.mois-bloc.deplie .chevron { transform: rotate(90deg); }
.mois-bloc.deplie .mois-ligne { border-bottom: 1px solid rgba(16, 36, 62, 0.08); }
.mois-detail { padding: 0 16px 8px; }
.mois-sous { margin: 12px 0 2px; font-size: 13px; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: 0.04em; }

/* Acceptation des conditions générales */
.cgu-accord { position: fixed; inset: 0; z-index: 40; background: rgba(8, 18, 30, 0.55); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.cgu-boite { width: 100%; max-width: 420px; background: var(--carte); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 30px rgba(8, 18, 30, 0.3); }
.cgu-boite .rubrique { margin: 0; }
.cgu-boite p { margin: 0; }
.cgu-boite .lien-cgu { align-self: flex-start; }
.cgu-boite .bouton { min-height: 48px; font-size: 16px; }
.cgu-boite .bouton:disabled { opacity: 0.5; }
