/* goodpattes.com — page Fonctions : écrans qui défilent, visite guidée, liste à cocher et formule recommandée */

/* Barre de lecture en haut de page : pilotée par le défilement, sans script (navigateurs récents) */
.f-progres { position: fixed; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--rose), var(--laiton)); transform-origin: 0 50%; transform: scaleX(0); z-index: 50; pointer-events: none; }
@supports (animation-timeline: scroll()) {
  .f-progres { animation: f-lecture linear both; animation-timeline: scroll(root); }
}
@keyframes f-lecture { to { transform: scaleX(1); } }

/* ---------- Les appareils ---------- */
.portable { position: relative; width: 100%; }
.portable-ecran { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; border: clamp(6px, .9vw, 11px) solid #2B2128; border-radius: 16px 16px 5px 5px;
  box-shadow: 0 46px 80px -46px rgba(59, 44, 53, .6), 0 0 0 1px rgba(59, 44, 53, .08); }
.portable-socle { position: relative; height: clamp(10px, 1.3vw, 16px); margin: 0 -6.5%; background: linear-gradient(180deg, #EDE5E8, #BCAEB3); border-radius: 0 0 16px 16px / 0 0 12px 12px; box-shadow: 0 18px 30px -18px rgba(59, 44, 53, .5); }
.portable-socle::after { content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 5px; transform: translateX(-50%); background: #A79AA0; border-radius: 0 0 8px 8px; }
.tel { position: relative; width: 100%; aspect-ratio: 390 / 820; overflow: hidden; background: #fff; border: 8px solid #2B2128; border-radius: 40px;
  box-shadow: 0 40px 70px -38px rgba(59, 44, 53, .65), 0 0 0 1px rgba(59, 44, 53, .08); }
.tel::before { content: ""; position: absolute; top: 7px; left: 50%; width: 30%; height: 15px; transform: translateX(-50%); background: #2B2128; border-radius: 10px; z-index: 3; }
.tel::after { content: "9:41"; position: absolute; top: 4px; left: 9%; font: 600 .62rem/20px var(--texte); color: var(--prune); z-index: 3; }
.tel .ecran { top: 24px; }

/* L'écran : la capture glisse lentement de haut en bas, puis remonte */
.ecran { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.ecran img { width: 100%; height: auto; max-width: none; will-change: transform; }
.ecran.defile.visible:not(.couche) img, .ecran.couche.actif.defile.visible img { animation: f-defile var(--duree, 14s) cubic-bezier(.45, 0, .55, 1) infinite; }
.ecran:hover img { animation-play-state: paused; }
@keyframes f-defile { 0%, 12% { transform: translateY(0); } 48%, 60% { transform: translateY(var(--defile, 0px)); } 94%, 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .ecran { overflow-y: auto; } .tel-flotte { animation: none; } }

/* ---------- En-tête ---------- */
.f-hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.f-hero::before { content: ""; position: absolute; right: -10%; top: -20%; width: 70%; height: 120%; background: radial-gradient(closest-side, rgba(242, 216, 210, .85), rgba(242, 216, 210, 0)); z-index: -1; }
.f-hero-in { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.f-hero h1 em { font-style: normal; color: var(--rose); }
.f-chiffres { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 14px clamp(18px, 3vw, 34px); margin: 8px 0 0; }
.f-chiffres div { display: grid; gap: 2px; }
.f-chiffres dt { font: 400 2.4rem/1 var(--titre); color: var(--prune); }
.f-chiffres dd { margin: 0; color: var(--doux); font-size: .9rem; line-height: 1.4; max-width: 150px; }
@media (max-width: 420px) { .f-chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); } .f-chiffres dt { font-size: 2rem; } }
.f-scene { position: relative; padding: 0 0 9% 12%; }
.tel-flotte { position: absolute; left: 0; bottom: 0; width: 25%; min-width: 112px; border-width: 6px; border-radius: 30px; animation: flotte 7s ease-in-out infinite; }
.tel-flotte::before { height: 11px; top: 5px; }
.tel-flotte::after { font-size: .5rem; line-height: 16px; }
.tel-flotte .ecran { top: 18px; }
@media (max-width: 900px) {
  .f-hero-in { grid-template-columns: 1fr; }
  .f-scene { max-width: 560px; width: 100%; margin-inline: auto; padding: 0 0 12% 10%; }
}

/* ---------- Une journée (visite guidée) ---------- */
.visite { padding: clamp(56px, 8vw, 110px) 0; background: var(--papier); border-block: 1px solid var(--trait); }
.visite-grille { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.visite-etapes { list-style: none; margin: 0; padding: 0; }
.etape { position: relative; min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding: 28px 0 28px 30px; border-left: 2px solid var(--trait); opacity: .36; transition: opacity .45s ease, border-color .45s ease; }
.etape::before { content: ""; position: absolute; left: -9px; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--papier); border: 2px solid var(--trait); transition: all .3s; }
.etape.actif { opacity: 1; border-left-color: var(--rose); }
.etape.actif::before { background: var(--rose); border-color: var(--rose); box-shadow: 0 0 0 6px rgba(169, 71, 95, .14); }
.etape h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.etape p { color: var(--doux); }
.heure { font: 700 .95rem/1.2 var(--texte); letter-spacing: .02em; color: var(--rose); margin-bottom: 10px; }
.etape-ecran { display: none; margin: 18px 0 0; }
.visite-scene { position: sticky; top: max(100px, calc(50vh - 250px)); }
.couches .couche { opacity: 0; transform: scale(1.02); transition: opacity .6s ease, transform .6s ease; }
.couches .couche.actif { opacity: 1; transform: none; }
.visite-points { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 0; padding: 0; }
.visite-points li { font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--creme); border: 1px solid var(--trait); color: var(--doux); cursor: pointer; transition: all .25s; }
.visite-points li.actif { background: var(--prune); border-color: var(--prune); color: #fff; }
@media (max-width: 980px) {
  .visite-grille { grid-template-columns: 1fr; }
  .visite-scene { display: none; }
  .etape { min-height: 0; opacity: 1; padding: 0 0 44px 24px; }
  .etape::before { top: 4px; }
  .etape-ecran { display: block; }
  .petit-portable { width: 92%; margin-left: 4%; }
}

/* Pastille de formule */
.fx-f { display: inline-flex; align-self: flex-start; align-items: center; white-space: nowrap; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; }
.fx-f-solo { background: var(--sauge-50); color: var(--sauge-encre); }
.fx-f-salon { background: var(--blush-50); color: var(--rose-fonce); }
.fx-f-van { background: #F6EDDF; color: #75562A; }

/* ---------- Sur le téléphone ---------- */
.cote-client { padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 72px); }
.tels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); }
.tel-carte { margin: 0; display: grid; gap: 16px; justify-items: center; text-align: center; align-content: start; }
.tel-carte .tel { max-width: 250px; }
.tel-carte:nth-child(even) { transform: translateY(34px); }
.tel-carte figcaption b { display: block; font: 400 1.25rem/1.2 var(--titre); color: var(--prune); margin-bottom: 4px; }
.tel-carte figcaption span { color: var(--doux); font-size: .93rem; }
@media (max-width: 900px) {
  .tels { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 4px 16px 20px; gap: 18px; scrollbar-width: none; }
  .tels::-webkit-scrollbar { display: none; }
  .tel-carte { flex: 0 0 min(66%, 250px); scroll-snap-align: center; }
  .tel-carte:nth-child(even) { transform: none; }
}

/* ---------- Photo (effet Ken Burns) ---------- */
.f-photo { padding: clamp(40px, 6vw, 72px) 0 0; }
.f-photo-in { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); }
.f-photo-in img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; animation: f-kenburns 26s ease-in-out infinite alternate; }
@keyframes f-kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-1.6%, -1.2%); } }
.f-photo-in figcaption { position: absolute; left: clamp(14px, 4vw, 44px); bottom: clamp(14px, 4vw, 44px); max-width: min(460px, calc(100% - 28px)); padding: 16px 22px; border-radius: 18px; background: rgba(255, 252, 249, .93); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 400 clamp(1.1rem, 2vw, 1.45rem)/1.3 var(--titre); color: var(--prune); }
.f-photo-in figcaption b { font-weight: 400; color: var(--rose); }
@media (max-width: 640px) { .f-photo-in img { aspect-ratio: 4 / 3; } }

/* ---------- Toutes les fonctions, à cocher ---------- */
.choisir { padding: clamp(56px, 8vw, 110px) 0; }
.choisir-outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.filtre { display: inline-flex; gap: 4px; padding: 5px; background: var(--papier); border: 1px solid var(--trait); border-radius: 999px; }
.filtre button { border: 0; background: transparent; padding: 10px 16px; border-radius: 999px; font: 600 .95rem var(--texte); color: var(--doux); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.filtre button span { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--creme); color: var(--doux); }
.filtre button[aria-pressed="true"] { background: var(--prune); color: #fff; }
.filtre button[aria-pressed="true"] span { background: rgba(255, 255, 255, .18); color: #fff; }
.lien-btn { background: none; border: 0; padding: 8px 4px; color: var(--rose); font: 600 .95rem var(--texte); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.choisir-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 32px); align-items: start; }
.fx-liste { margin: 0; }
.fx-groupe { min-width: 0; margin: 0 0 18px; padding: 22px clamp(14px, 2.6vw, 28px) 10px; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r); box-shadow: var(--ombre); }
.fx-groupe legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; }
.fx-groupe legend span { display: block; font: 400 clamp(1.3rem, 2vw, 1.55rem)/1.15 var(--titre); color: var(--prune); }
.fx-groupe legend small { display: block; margin-top: 4px; color: var(--doux); font-size: .93rem; }
.fx-groupe ul { clear: both; list-style: none; margin: 0; padding: 0; }
.fx label { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 14px; align-items: start; margin: 0 -12px; padding: 14px 12px; border-top: 1px solid var(--trait); border-radius: 14px; cursor: pointer; transition: background .15s; }
.fx:first-child label { border-top-color: transparent; }
.fx label:hover { background: var(--creme); }
.fx:has(input:checked) label { background: var(--blush-50); border-top-color: transparent; }
.fx input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-case { width: 24px; height: 24px; margin-top: 1px; border-radius: 8px; border: 2px solid #CDBDC3; background: #fff; transition: background .15s, border-color .15s, transform .15s; }
.fx input:checked + .fx-case { background: var(--rose) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--rose); transform: scale(1.06); }
.fx input:focus-visible + .fx-case { outline: 3px solid var(--rose); outline-offset: 2px; }
.fx-txt { min-width: 0; }
.fx-txt b { display: block; font-weight: 600; line-height: 1.35; }
.fx-txt span { display: block; margin-top: 3px; color: var(--doux); font-size: .93rem; line-height: 1.45; }
.fx-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fx-wow { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #F7EEDC; color: #75562A; }
.fx-wow::before { content: "✦"; font-size: .8em; }
@media (max-width: 640px) {
  .fx label { grid-template-columns: 26px minmax(0, 1fr); }
  .fx-tags { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
}

/* Le panneau « Votre formule » */
.panneau { position: sticky; top: 96px; z-index: 20; }
.panneau-in { background: var(--papier); border: 2px solid var(--prune); border-radius: var(--r); padding: 22px; box-shadow: var(--ombre); max-height: calc(100vh - 112px); overflow-y: auto; scrollbar-width: thin; }
.panneau-calcul { margin: 0 0 14px; font-size: .93rem; }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panneau-tete .surtitre { margin: 0; }
.devise-mini { margin: 0; padding: 3px; }
.devise-mini button { padding: 6px 12px; font-size: .85rem; }
.panneau-gros { font: 400 1.6rem/1.2 var(--titre); color: var(--prune); margin-bottom: 6px; }
.panneau-rappel { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--trait); display: grid; gap: 8px; font-size: .95rem; }
.panneau-rappel small { font-size: inherit; }
.reco h3 { font-size: 2rem; margin-bottom: 0; }
.reco .pour { margin-bottom: 8px; }
.reco .montant { font-size: 2.4rem; }
.reco .achat { margin-bottom: 0; }
.panneau-pourquoi { margin: 14px 0; font-size: .93rem; color: var(--doux); }
.panneau-bonus { margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: #F7EEDC; color: #5E4520; font-size: .92rem; }
.panneau-bonus p { margin: 0; }
.panneau-bonus ul { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 4px; }
.panneau .btn { width: 100%; }
.panneau-lien { display: block; margin-top: 12px; text-align: center; font-weight: 600; font-size: .95rem; }
.panneau-barre { display: none; }
@media (max-width: 980px) {
  .choisir-grille { grid-template-columns: 1fr; }
  .panneau { top: auto; bottom: 10px; }
  .panneau-in { padding: 0; border-width: 1.5px; overflow: hidden; max-height: none; box-shadow: 0 -12px 40px -18px rgba(59, 44, 53, .55); }
  .panneau:not(.ouvert) .panneau-tete, .panneau:not(.ouvert) .panneau-vide, .panneau:not(.ouvert) .panneau-reco { display: none; }
  .panneau.ouvert .panneau-tete, .panneau.ouvert .panneau-vide, .panneau.ouvert .panneau-reco { margin-inline: 18px; }
  .panneau.ouvert .panneau-tete { margin-top: 16px; }
  .panneau.ouvert .panneau-reco, .panneau.ouvert .panneau-vide { padding-bottom: 16px; max-height: 58vh; overflow-y: auto; }
  .panneau-barre { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border: 0; background: var(--prune); color: #fff; font: 500 .98rem/1.3 var(--texte); text-align: left; cursor: pointer; }
  .panneau-barre b { font-weight: 700; }
  .panneau-barre-voir { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--rose); font-weight: 700; font-size: .9rem; }
}

/* ---------- Bientôt ---------- */
.bientot { padding: 0 0 clamp(56px, 8vw, 96px); }
.bientot-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 920px; margin-inline: auto; }
.bientot-cartes article { padding: 24px; border: 1.5px dashed #D9C6CD; border-radius: var(--r); }
.bientot-cartes h3 { font-size: 1.4rem; margin-top: 8px; }
.bientot-cartes p { color: var(--doux); margin: 0; }
.bientot-puce { font: 700 .72rem/1 var(--texte); letter-spacing: .12em; text-transform: uppercase; color: var(--rose); }
@media (max-width: 760px) { .bientot-cartes { grid-template-columns: 1fr; } }
