/*
 * Tunnel (/creer) sur téléphone (< 768 px), d'après la maquette de Loïc (23/11/2026) :
 * https://claude.ai/artifact/CLB1FeLLvBgTgYsdvA2qTq
 * Activé par la classe body.tz-m que pose js/tunnel/tunnel-mobile.js (téléphone seulement) ; l'ordinateur ne change pas.
 */
body.tz-m, body.tz-t {
  --tz-bg: #071417; --tz-card: #0d2224; --tz-card2: #0b1c1e; --tz-line: #1f3b3c; --tz-line2: #16302f;
  --tz-txt: #EAF6F7; --tz-muted: #9fb9bb; --tz-acc: #35F8FB; --tz-acc-bg: #0f3134; --tz-on-acc: #04211f;
  --tz-page: #00060d; --tz-handle: #2c4a4c; --tz-soft: rgba(255, 255, 255, .08); --tz-ring: rgba(255, 255, 255, .35);
}
/* Mode clair du site : mêmes teintes que le tunnel en clair (styles/tunnel-light.css) ; avant, en-tête, feuilles et
   boutons restaient sombres et certains textes du tunnel (passés en foncé) ne se lisaient plus (Loïc 23/11/2026) */
html[data-theme="light"] body.tz-m, html[data-theme="light"] body.tz-t {
  --tz-bg: #FFFFFF; --tz-card: #FFFFFF; --tz-card2: #FFFFFF; --tz-line: #DEDBD3; --tz-line2: #E7E4DE;
  --tz-txt: #0A0C0F; --tz-muted: #62666C; --tz-acc: #036F7B; --tz-acc-bg: rgba(3, 111, 123, .10); --tz-on-acc: #FFFFFF;
  --tz-page: #EEECE7; --tz-handle: #D3CFC6; --tz-soft: rgba(10, 12, 15, .06); --tz-ring: rgba(10, 12, 15, .25);
}

/* ── Fond : la couleur du tunnel jusqu'en bas de l'écran, même quand la barre d'adresse se replie ── */
html:has(body.tz-m), body.tz-m { background-color: var(--tz-page); }
/* hauteur de l'écran moins l'en-tête du tunnel (69 px) posé au-dessus : avec 100dvh seul, la page gardait 69 px
   de vide à faire défiler sous un contenu court (étape Options) */
body.tz-m #tai2-card { min-height: calc(100dvh - 69px) !important; padding-bottom: 0 !important; }
/* Une seule réserve sous le contenu pour la barre du bas fixe (95 px) : le tunnel en empilait deux
   (130 px dans la colonne + 92 px dans la carte), d'où un défilement dans le vide sur les petits écrans */
body.tz-m #tai2-card .tai2-left { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important; }
/* Panneau de droite (attente de génération avec la vidéo, résultat) : même calcul, il prenait tout l'écran sous
   l'en-tête et laissait 69 px à faire défiler */
body.tz-m #tai2-card .tai2-right { min-height: calc(100dvh - 69px) !important; }
/* Barre du bas sans bouton affiché (étape 1 avant le choix d'un produit) : masquée */
body.tz-m #tai2-card .tai2-left-footer.tz-foot-empty { display: none; }

/* ── Cadre : l'en-tête du site laisse la place à l'en-tête du tunnel ───────────────────────── */
body.tz-m #header { display: none !important; }
/* Lya (bulle du chat) masquée pendant le tunnel sur téléphone (Loïc, 23/11/2026) */
body.tz-m #lya-bubble { display: none !important; }
body.tz-m #tai2-card #tai2-steps,
body.tz-m #tai2-card #tai2-bubble,
body.tz-m #tai2-card .tai2-left-footer .tai2-back-btn { display: none !important; }

:is(body.tz-m, body.tz-t) .tz-head {
  position: sticky; top: 0; z-index: 900; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--tz-bg); border-bottom: 1px solid var(--tz-line2); color: var(--tz-txt);
}
:is(body.tz-m, body.tz-t) .tz-head__back {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--tz-line); background: var(--tz-card);
  color: var(--tz-txt); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
:is(body.tz-m, body.tz-t) .tz-head__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
:is(body.tz-m, body.tz-t) .tz-head__step { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tz-acc); }
:is(body.tz-m, body.tz-t) .tz-head__sub { font-size: 14px; color: var(--tz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Résumé « Votre création » : bouton « Ma création » dans la barre du bas, résumé en feuille du bas ── */
/* Le récapitulatif du tunnel (colonne de droite sur ordinateur) n'est plus affiché dans la page : sur téléphone il
   tombait tout en bas, après la liste, avec un second « Continuer ». Il s'ouvre en feuille depuis « Ma création »
   (solution B de la maquette, choisie par Loïc le 23/11/2026). */
body.tz-m #tai2-card #tt-recap { display: none !important; }
body.tz-m .tz-mine {
  display: flex; align-items: center; gap: 8px; flex: 0 1 auto; max-width: 46%; min-height: 52px; padding: 0 12px 0 8px;
  border-radius: 16px; border: 1px solid var(--tz-line); background: var(--tz-card); color: var(--tz-txt); font: inherit;
  text-align: left; cursor: pointer;
}
body.tz-m .tz-mine[hidden] { display: none; }
body.tz-m .tz-mine__img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; background: var(--tz-soft); }
body.tz-m .tz-mine__txt { display: flex; flex-direction: column; min-width: 0; }
body.tz-m .tz-mine__lbl { font-size: 12px; color: var(--tz-muted); }
body.tz-m .tz-mine__val { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Feuille du bas : le récapitulatif du tunnel lui-même (ses liens « Modifier » restent branchés) */
body.tz-m.tz-sum-open #tai2-card #tt-recap {
  display: block !important; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1001; width: auto; height: auto;
  max-height: 80vh; overflow-y: auto; margin: 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0; border: 0; border-top: 1px solid var(--tz-line); background: var(--tz-card2);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .55);
}
body.tz-m.tz-sum-open #tai2-card #tt-recap .tt-prod__cta { display: none !important; }
body.tz-m .tz-sum-close {
  position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--tz-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.tz-m .tz-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .55); }
body.tz-m .tz-backdrop[hidden] { display: none; }

/* ── Barre du bas : une seule action, pleine largeur ─────────────────────────────────────── */
body.tz-m #tai2-card .tai2-left-footer { min-height: 0; background: var(--tz-card2); border-top: 1px solid var(--tz-line2); }
body.tz-m #tai2-card .tai2-left-footer .tai2-footer-inner { display: flex; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
body.tz-m #tai2-card .tai2-left-footer .tai2-footer-actions { flex: 1; display: flex; gap: 10px; min-width: 0; }
body.tz-m #tai2-card .tai2-left-footer .tai2-footer-actions .tai2-footer-continue { flex: 1; min-height: 52px; border-radius: 16px; margin: 0; }

/* ── Étape Produit ───────────────────────────────────────────────────────────────────────── */
/* Pastilles des catégories (copies des catégories du tunnel), à la place du bouton « Catégories et filtres » */
body.tz-m .tz-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
body.tz-m .tz-chips::-webkit-scrollbar { display: none; }
body.tz-m .tz-chip {
  flex: none; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--tz-line); background: var(--tz-card);
  color: var(--tz-txt); font: inherit; font-size: 14px; cursor: pointer;
}
body.tz-m .tz-chip.is-on { border-color: var(--tz-acc); background: var(--tz-acc-bg); color: var(--tz-acc); font-weight: 600; }
body.tz-m.tz-step-prod #tai2-card .tt-gift { display: none !important; }
/* Titre, puis « Filtres » et le tri sur une même ligne (« Catégories et filtres » faisait passer le tri dessous) */
body.tz-m.tz-step-prod #tai2-card .tt-prod__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0 0; margin: 0 0 12px; }
body.tz-m.tz-step-prod #tai2-card .tt-prod__count { flex: 1 1 100%; margin: 0; }
body.tz-m.tz-step-prod #tai2-card .tt-prod__filters-btn { height: 40px; margin: 0; }
body.tz-m.tz-step-prod #tai2-card .tt-prod__sort { margin: 0 0 0 auto; }
/* Cartes produit : la photo du produit personnalisé (sur ordinateur, elle n'apparaît qu'au survol ; pas de survol
   au doigt, donc toujours affichée sur téléphone et tablette, Loïc 23/11/2026) */
:is(body.tz-m, body.tz-t) #tai2-card .tai2-prod-card .tai2-prod-img--hover { opacity: 1 !important; }

/* Feuille du bas : le produit choisi */
body.tz-m #tai2-card .tt-prod__panel.tt-prod__panel--filled {
  position: fixed; left: 0; right: 0; top: auto !important; bottom: 0; z-index: 1000; margin: 0;
  width: auto; height: auto !important; max-height: 82vh !important; overflow-y: auto;
  padding: 0 16px; border-radius: 22px 22px 0 0; border: 0; border-top: 1px solid var(--tz-line);
  background: var(--tz-card2); box-shadow: 0 -16px 40px rgba(0, 0, 0, .55); color: var(--tz-txt);
}
body.tz-m.tz-sheet-closed #tai2-card .tt-prod__panel.tt-prod__panel--filled { display: none; }
body.tz-m.tz-sheet #tai2-card .tai2-left-footer { display: none; }
body.tz-m.tz-sheet { overflow: hidden; }
body.tz-m .tz-sheet__bar { display: flex; justify-content: center; position: relative; padding: 10px 0 6px; }
body.tz-m .tz-sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: var(--tz-handle); }
body.tz-m .tz-sheet__close {
  position: absolute; right: -4px; top: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--tz-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.tz-m .tz-sheet__top { display: flex; gap: 12px; align-items: center; padding: 6px 0 12px; }
body.tz-m #tai2-card .tt-prod__panel .tz-prod-photo { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; float: none; margin: 0; }
body.tz-m #tai2-card .tt-prod__panel .tt-prod__title { margin: 0; font-size: 20px; min-height: 0; }
body.tz-m #tai2-card .tt-prod__panel .tt-prod__specs { display: none; }
body.tz-m #tai2-card .tt-prod__panel .tai2-opt-group-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--tz-muted); margin: 0 0 8px; }
body.tz-m #tai2-card .tt-prod__panel .tai2-opt-group { margin: 0 0 14px; }

/* Couleurs en ronds (la liste du menu déroulant, toujours visible, en ligne qui défile) */
body.tz-m #tai2-card .tt-prod__panel .tt-csel__btn { display: none; }
body.tz-m #tai2-card .tt-prod__panel .tt-csel__list,
body.tz-m #tai2-card .tt-prod__panel .tt-csel__list[hidden] {
  display: flex !important; flex-direction: row; flex-wrap: nowrap; position: static; gap: 6px; overflow-x: auto; overflow-y: hidden;
  width: auto; min-width: 0; max-width: none; max-height: none; margin: 0 -16px; padding: 2px 16px 6px;
  background: none; border: 0; box-shadow: none; scrollbar-width: none; overscroll-behavior-x: contain;
}
body.tz-m #tai2-card .tt-prod__panel .tt-csel__list::-webkit-scrollbar { display: none; }
/* Pastille + nom de la couleur dessous, comme la feuille « Couleur et taille » du résultat (Loïc, 23/11/2026) */
body.tz-m #tai2-card .tt-prod__panel .tt-csel__opt {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; height: auto; min-height: 0;
  padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--tz-muted);
}
body.tz-m #tai2-card .tt-prod__panel .tt-csel__opt > span:not(.tt-csel__sw) {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%; font-size: 11px; font-weight: 400; line-height: 1.25; text-align: center; white-space: normal;
}
body.tz-m #tai2-card .tt-prod__panel .tt-csel__opt .tt-csel__sw {
  flex: none; width: 40px; height: 40px; margin: 0; border-radius: 50%; box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--tz-card2), 0 0 0 4px var(--tz-line);
}
body.tz-m #tai2-card .tt-prod__panel .tt-csel__opt.is-on { border: 0; background: none; color: var(--tz-acc); }
body.tz-m #tai2-card .tt-prod__panel .tt-csel__opt.is-on .tt-csel__sw { box-shadow: 0 0 0 2px var(--tz-card2), 0 0 0 4px var(--tz-acc); }
body.tz-m #tai2-card .tt-prod__panel .tt-csel__opt.is-on > span:not(.tt-csel__sw) { font-weight: 700; }
/* nom de la couleur choisie sous la ligne : redondant maintenant que chaque pastille porte son nom */
body.tz-m .tz-color-name { display: none; }

/* Tailles en boutons (pilotent le menu de taille du tunnel, masqué) */
body.tz-m #tai2-card .tt-prod__panel select.tai2-opt-select.tz-hidden { display: none; }
body.tz-m .tz-sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
body.tz-m .tz-size {
  height: 44px; border-radius: 10px; border: 1px solid var(--tz-line); background: var(--tz-card); color: var(--tz-txt);
  font: inherit; font-size: 15px; cursor: pointer;
}
body.tz-m .tz-size.is-on { border-color: var(--tz-acc); background: var(--tz-acc-bg); color: var(--tz-acc); font-weight: 600; }
body.tz-m .tz-size:disabled { opacity: .35; text-decoration: line-through; cursor: default; }

/* ── Étape Thème (entrée « Juste une envie ») ─────────────────────────────────────────────── */
/* Onglets sur une ligne */
body.tz-m:is(.tz-step-theme, .tz-step-style) #tai2-card .tt-prod__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0 4px; margin: 0; }
body.tz-m:is(.tz-step-theme, .tz-step-style) #tai2-card .tai2-seg { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0; border-radius: 14px; }
body.tz-m:is(.tz-step-theme, .tz-step-style) #tai2-card .tai2-seg-btn { min-height: 44px; height: 44px; padding: 0 8px; font-size: 14px; line-height: 1.1; white-space: nowrap; border-radius: 10px; }
/* « Tous les thèmes » compact ; le compteur passe dans la barre du bas (tunnel-mobile.js) */
/* « Tous les thèmes » présenté comme un filtre : icône de filtre, « Catégorie » devant, flèche à droite */
body.tz-m:is(.tz-step-theme, .tz-step-style) #tai2-card .tt-prod__filters-btn {
  display: flex; align-items: center; gap: 8px; flex: 1 1 100%; width: 100%; min-height: 46px; margin: 0; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--tz-line); background: var(--tz-card); color: var(--tz-txt); font-size: 15px; font-weight: 600;
}
:is(body.tz-m, body.tz-t):is(.tz-step-theme, .tz-step-style) #tai2-card .tt-prod__filters-btn > i.fa-th-large::before { content: "\f1de"; }   /* curseurs de filtre */
:is(body.tz-m, body.tz-t):is(.tz-step-theme, .tz-step-style) #tai2-card .tt-prod__filters-btn > i { color: var(--tz-acc); }
:is(body.tz-m, body.tz-t):is(.tz-step-theme, .tz-step-style) #tai2-card .tt-prod__filters-btn::after {
  content: "\f078"; margin-left: auto; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 12px; color: var(--tz-muted);
}
:is(body.tz-m, body.tz-t) .tz-filter-lbl { font-weight: 400; color: var(--tz-muted); }
body.tz-m.tz-step-theme #tai2-card .tt-th-count,
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tt-prod__count { display: none !important; }
/* Catégories : titre plus discret, « Toute la catégorie » à côté */
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tt-th-cat { margin: 16px 0 0; }
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tt-th-cat__title { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 0 0; font-size: 18px; vertical-align: middle; }
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tai2-th-detail-chips { display: inline-flex; margin: 0; padding: 0; vertical-align: middle; }
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tai2-th-item--all { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 18px; }
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tt-th-sub { margin: 12px 0 0; }
:is(body.tz-m, body.tz-t).tz-step-theme #tai2-card .tt-th-sub__title { margin: 0 0 8px; font-size: 13px; }
body.tz-m.tz-step-theme #tai2-card .tt-th-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.tz-m.tz-step-theme #tai2-card .tai2-th-card-label { font-size: 13px; padding: 6px 8px; }

/* ── Étape Style : même filtre « Catégorie : Tous les styles » que l'étape Thème (règles ci-dessus) ── */
:is(body.tz-m, body.tz-t).tz-step-style #tai2-card .tt-th-cat { margin: 16px 0 0; }
:is(body.tz-m, body.tz-t).tz-step-style #tai2-card .tt-th-cat__title { margin: 0 0 2px; font-size: 18px; }
:is(body.tz-m, body.tz-t).tz-step-style #tai2-card .tt-style-desc { margin: 0 0 8px; font-size: 12px; line-height: 1.35; }
body.tz-m.tz-step-style #tai2-card .tt-style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* « Continuer sans style » tient sur une ligne ; un nom de style long passe sur deux lignes sans déborder */
body.tz-m.tz-step-style #tai2-card .tai2-footer-continue { font-size: 14px; line-height: 1.2; padding: 0 12px; gap: 6px; min-width: 0; }
/* « Retirer le style » retiré sur téléphone : la carte « Sans style » fait la même chose (Loïc, 23/11/2026) */
body.tz-m #tai2-card #tai2-style-clear { display: none !important; }

/* Barre du bas : information à gauche de l'action (compteur de thèmes…) */
body.tz-m .tz-foot-info { display: flex; flex-direction: column; flex: none; min-width: 64px; color: var(--tz-txt); }
body.tz-m .tz-foot-info[hidden] { display: none; }
body.tz-m .tz-foot-info__lbl { font-size: 12px; color: var(--tz-muted); }
body.tz-m .tz-foot-info__val { font-size: 22px; font-weight: 800; line-height: 1.1; }
body.tz-m #tai2-card .tai2-left-footer .tai2-footer-inner { align-items: center; gap: 12px; }

/* ── Étape Image (entrée « Mon image ») ───────────────────────────────────────────────────── */
/* Une seule colonne : la zone d'envoi sur toute la largeur, sans le récapitulatif latéral */
body.tz-m #tai2-card .tt-photo-step .tt-prod { display: block; }
body.tz-m #tai2-card .tt-photo-step #tt-recap { display: none !important; }
body.tz-m #tai2-card .tt-photo-step .tt-prod__main,
body.tz-m #tai2-card .tt-photo-step #tt-photo-center,
body.tz-m #tai2-card .tt-photo-step .tai2-photo-import { width: auto; min-width: 0; max-width: none; margin: 0; padding: 0; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-import { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
body.tz-m #tai2-card .tt-photo-step #tai2-drop-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: auto;
  min-height: 52vh; margin: 0; padding: 24px 20px; box-sizing: border-box; text-align: center;
  border: 2px dashed var(--tz-handle); border-radius: 20px; background: var(--tz-card2);
}
body.tz-m #tai2-card .tt-photo-step .tai2-drop-illustration { transform: scale(.8); margin: -10px 0; }
body.tz-m #tai2-card .tt-photo-step .tai2-drop-text { margin: 0; font-size: 22px; font-weight: 800; white-space: normal; }
body.tz-m #tai2-card .tt-photo-step .tai2-drop-sub2 { display: none; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-formats { margin: 0; font-size: 13px; color: var(--tz-muted); white-space: normal; }
body.tz-m .tz-photo-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 300px; }
body.tz-m .tz-photo-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px;
  border: 1px solid var(--tz-line); background: var(--tz-card); color: var(--tz-txt); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
body.tz-m .tz-photo-btn--main { border: 0; background: var(--tz-acc); color: var(--tz-on-acc); }
/* Image choisie : le tunnel propose « Choisir une autre image », nos boutons s'effacent */
body.tz-m #tai2-drop-zone:has(img) .tz-photo-btns,
body.tz-m #tai2-drop-zone:has(img) .tai2-photo-formats { display: none; }
body.tz-m #tai2-card .tt-photo-step #tai2-drop-zone:has(img) { min-height: 0; justify-content: flex-start; }
/* Garanties : liste compacte sur toute la largeur */
body.tz-m #tai2-card .tt-photo-step .tai2-photo-trust-grid { display: flex; flex-direction: column; gap: 12px; width: auto; margin: 0; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-trust-item { display: flex; align-items: flex-start; gap: 12px; width: auto; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-trust-ico { flex: none; width: 40px; height: 40px; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-trust-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-trust-item b { font-size: 14px; }
body.tz-m #tai2-card .tt-photo-step .tai2-photo-trust-item span:not(.tai2-photo-trust-ico) { font-size: 13px; line-height: 1.35; color: var(--tz-muted); }

/* Bas de la feuille : prix + Personnaliser */
body.tz-m .tz-sheet__foot {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; margin: 8px -16px 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--tz-card2); border-top: 1px solid var(--tz-line2);
}
body.tz-m #tai2-card .tt-prod__panel .tt-prod__price { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; }
body.tz-m #tai2-card .tt-prod__panel .tt-prod__cta {
  display: flex; flex: 1; align-items: center; justify-content: center; min-height: 52px; margin: 0; border-radius: 16px;
}

/* ── Écran Résultat (solution C de la maquette, Loïc 23/11/2026) ─────────────────────────────── */
/* Masqués : récapitulatif produit, caractéristiques, avertissement de recadrage, détail du prix, boutons d'origine
   (Modifier et Nouvelle création passent sous la photo et dans « Mes versions ») */
body.tz-m.tz-res #tai2-rs-right #tai2-rs-compact,
body.tz-m.tz-res #tai2-rs-right #tai2-rs-features,
body.tz-m.tz-res #tai2-rs-right #tai2-rs-accordion,
body.tz-m.tz-res #tai2-rs-right #tai2-rs-pricerow,
body.tz-m.tz-res #tai2-rs-right #tai2-rs-edit,
body.tz-m.tz-res #tai2-rs-right #tai2-rs-new { display: none !important; }
body.tz-m.tz-res .tz-head__back { display: none; }   /* pas de retour depuis le résultat (comme le tunnel) */
body.tz-m.tz-res #tai2-rs-right { padding: 0 0 calc(96px + env(safe-area-inset-bottom, 0px)) !important; gap: 0; border: 0; background: none; box-shadow: none; }
body.tz-m.tz-res #tai2-rs-right .tai2-rs-bottom { margin: 0; padding: 0; border: 0; background: none; }

/* Lignes sous la photo */
body.tz-m .tz-rs-rows { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 0; }
body.tz-m .tz-rs-row {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: 14px;
  border: 1px solid var(--tz-line); background: var(--tz-card); color: var(--tz-txt); font: inherit; text-align: left; cursor: pointer;
}
body.tz-m .tz-rs-row[hidden] { display: none; }
body.tz-m .tz-rs-row__dot { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--tz-ring); }
body.tz-m .tz-rs-row__dot[hidden] { display: none; }
body.tz-m .tz-rs-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.tz-m .tz-rs-row__main { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.tz-m .tz-rs-row__sub { font-size: 12px; color: var(--tz-muted); }
body.tz-m .tz-rs-row__sub--acc { color: var(--tz-acc); }
body.tz-m .tz-rs-row__sub:empty { display: none; }
body.tz-m .tz-rs-row__act { flex: none; font-size: 14px; font-weight: 600; color: var(--tz-acc); }
body.tz-m .tz-rs-edit {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px;
  border: 1px solid var(--tz-acc); background: transparent; color: var(--tz-acc); font: inherit; font-weight: 600; cursor: pointer;
}

/* Barre du bas : total + Ajouter au panier */
body.tz-m.tz-res #tai2-rs-right .tai2-rs-ctarow {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 950; display: flex; align-items: center; gap: 12px; margin: 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--tz-card2); border-top: 1px solid var(--tz-line2);
}
body.tz-m .tz-rs-total { display: flex; flex-direction: column; flex: none; color: var(--tz-txt); }
body.tz-m .tz-rs-total[hidden] { display: none; }
body.tz-m .tz-rs-total__lbl { font-size: 12px; color: var(--tz-muted); }
body.tz-m .tz-rs-total__val { font-size: 22px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
body.tz-m.tz-res #tai2-rs-right .tai2-rs-ctarow #tai2-rs-order { flex: 1; min-height: 52px; margin: 0; border-radius: 16px; justify-content: center; }

/* En-tête : bouton « Mes versions » */
body.tz-m .tz-head__ver { display: none; }
body.tz-m.tz-res .tz-head__ver {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--tz-line); background: var(--tz-card);
  color: var(--tz-txt); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
}
body.tz-m .tz-head__badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; box-sizing: border-box;
  background: var(--tz-acc); color: var(--tz-on-acc); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
body.tz-m .tz-head__badge:empty { display: none; }

/* Feuilles du bas (couleur et taille, quantité, versions) */
body.tz-m .tz-rsheet-bd { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .55); }
body.tz-m .tz-rsheet-bd[hidden] { display: none; }
body.tz-m .tz-rsheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; display: flex; flex-direction: column; max-height: 82vh;
  padding: 0 16px; border-radius: 22px 22px 0 0; border-top: 1px solid var(--tz-line); background: var(--tz-card2);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .55); color: var(--tz-txt);
}
body.tz-m .tz-rsheet[hidden] { display: none; }
body.tz-m.tz-rsheet-on { overflow: hidden; }
body.tz-m .tz-rsheet__handle { align-self: center; width: 40px; height: 4px; margin: 10px 0 4px; border-radius: 2px; background: var(--tz-handle); }
body.tz-m .tz-rsheet__head { display: flex; align-items: center; padding: 4px 0 8px; }
body.tz-m .tz-rsheet__title { flex: 1; font-size: 20px; font-weight: 800; }
body.tz-m .tz-rsheet__close {
  width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--tz-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
body.tz-m .tz-rsheet__body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-bottom: 12px; }
body.tz-m .tz-rsheet__foot { margin: 0 -16px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--tz-line2); }
body.tz-m .tz-rsheet__ok {
  width: 100%; min-height: 52px; border: 0; border-radius: 16px; background: var(--tz-acc); color: var(--tz-on-acc);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}

/* Feuille couleur et taille : les listes du tunnel toujours ouvertes, ses boutons d'origine servent de titres */
body.tz-m .tz-rsheet .tai2-rs-opts { display: flex; flex-direction: column; gap: 14px; margin: 0; }
body.tz-m .tz-rsheet .tai2-rs-optwrap { display: flex; flex-direction: column; gap: 8px; width: 100%; }
body.tz-m .tz-rsheet .tai2-rs-opt {
  pointer-events: none; min-height: 0; height: auto; padding: 0; border: 0; background: none; box-shadow: none;
  flex-direction: row; align-items: baseline; gap: 8px;
}
body.tz-m .tz-rsheet .tai2-rs-opt-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--tz-muted); }
body.tz-m .tz-rsheet .tai2-rs-opt-label i { display: none; }
body.tz-m .tz-rsheet .tai2-rs-opt-value { font-size: 14px; color: var(--tz-txt); }
body.tz-m .tz-rsheet .tai2-rs-opt-value .tai2-rs-opt-dot { display: none; }
body.tz-m .tz-rsheet .tai2-rs-panel,
body.tz-m .tz-rsheet .tai2-rs-panel[hidden] {
  display: flex !important; position: static; flex-wrap: wrap; gap: 8px; max-height: none; width: auto; min-width: 0; max-width: none; margin: 0; padding: 0;
  border: 0; background: none; box-shadow: none; transform: none; opacity: 1; visibility: visible;
}
body.tz-m .tz-rsheet #tai2-rs-ch-taille { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.tz-m .tz-rsheet .tai2-rs-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; width: auto;
  min-height: 48px; margin: 0; padding: 4px 2px;
}
body.tz-m .tz-rsheet .tai2-rs-chip-val { font-size: 15px; }
body.tz-m .tz-rsheet .tai2-rs-chip-fmt { position: static; font-size: 9px; line-height: 1.1; white-space: nowrap; margin: 0; padding: 0; background: none; }
/* Couleurs sur une ligne qui défile, pastille + nom dessous (Loïc, 23/11/2026 : en grille, beaucoup de couleurs
   remplissaient toute la feuille, et le nom des couleurs n'apparaissait pas) */
body.tz-m .tz-rsheet #tai2-rs-swatches {
  display: flex !important; flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; scrollbar-width: none;
}
body.tz-m .tz-rsheet #tai2-rs-swatches::-webkit-scrollbar { display: none; }
body.tz-m .tz-rsheet .tai2-rs-swatch {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 68px; min-height: 0;
  padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--tz-muted);
}
body.tz-m .tz-rsheet .tai2-rs-swatch-dot {
  width: 40px; height: 40px; margin: 0; border-radius: 50%; box-sizing: border-box;
  box-shadow: 0 0 0 2px var(--tz-card2), 0 0 0 4px var(--tz-line);
}
body.tz-m .tz-rsheet .tai2-rs-swatch-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%; font-size: 11px; line-height: 1.25; text-align: center; white-space: normal; position: static;
}
body.tz-m .tz-rsheet .tai2-rs-swatch:is(.tai2-rs-swatch--active, [aria-current="true"]) { border: 0; background: none; color: var(--tz-acc); }
body.tz-m .tz-rsheet .tai2-rs-swatch:is(.tai2-rs-swatch--active, [aria-current="true"]) .tai2-rs-swatch-dot { box-shadow: 0 0 0 2px var(--tz-card2), 0 0 0 4px var(--tz-acc); }
body.tz-m .tz-rsheet .tai2-rs-swatch:is(.tai2-rs-swatch--active, [aria-current="true"]) .tai2-rs-swatch-name { font-weight: 700; }
body.tz-m .tz-rsheet .tai2-rs-choice-note,
body.tz-m .tz-rsheet .tai2-rs-fmtnote { display: none !important; }

/* Feuille quantité : le système du tunnel tel quel */
body.tz-m .tz-rsheet #tai2-rs-pack { margin: 0; padding: 0; border: 0; background: none; }
body.tz-m .tz-rsheet .tai2-pack-head .tai2-pack-title { display: none; }
body.tz-m .tz-rsheet .tai2-pack-head { justify-content: center; margin-bottom: 18px; }
body.tz-m .tz-rsheet .tai2-pack-btns { gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.tz-m .tz-rsheet .tai2-pack-btn { min-width: 0; }

/* Feuille versions : les générations du tunnel en grille + Nouvelle création */
body.tz-m .tz-rsheet #tai2-history-nav {
  display: block !important; position: static; width: auto; max-height: none; margin: 0; padding: 0;
  border: 0; background: none; box-shadow: none; transform: none;
}
body.tz-m .tz-rsheet .tai-history-head { display: none; }
body.tz-m .tz-rsheet .tai-history-thumbs { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: none; overflow: visible; }
body.tz-m .tz-rsheet .tai-history-thumb { position: relative; width: auto; height: auto; aspect-ratio: 1; }
body.tz-m .tz-rsheet .tai-history-num { position: absolute; left: 6px; bottom: 6px; top: auto; right: auto; }
body.tz-m .tz-rsheet .tai-history-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
body.tz-m .tz-rs-new {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 14px; border-radius: 12px;
  border: 1px solid var(--tz-line); background: transparent; color: var(--tz-txt); font: inherit; font-weight: 600; cursor: pointer;
}
body.tz-m .tz-rs-total__old { margin-left: 4px; font-size: 12px; color: var(--tz-muted); }
body.tz-m .tz-rs-total__old:empty { display: none; }

/* ── Tablette en portrait (même affichage que le téléphone, Loïc 23/11/2026) ─────────────────── */
/* Résultat : le tunnel limite cet écran à 640 px et range photo, réglages et vignettes autrement au-delà de
   ~700 px de large ; on garde l'ordre du téléphone (photo, vignettes, boutons) sur toute la largeur. */
body.tz-m.tz-res #tai2-rs-layout { max-width: none; width: 100%; align-items: stretch; }
body.tz-m.tz-res #tai2-rs-layout .tai2-rs-top { display: contents; }
body.tz-m.tz-res #tai2-rs-layout .tai2-rs-left { order: 1; }
body.tz-m.tz-res #tai2-rs-layout #tai2-rs-carousel-wrap { order: 2; }
body.tz-m.tz-res #tai2-rs-layout #tai2-rs-right { order: 3; align-items: stretch; width: auto; max-width: none; }
body.tz-m.tz-res #tai2-rs-title { display: none !important; }
/* Note du produit (étoiles + nombre d'avis) : le tunnel ne la masque que sous 680 px de large ou 820 px de haut ; sur
   grande tablette en portrait elle restait seule sous « Modifier ma création ». Masquée comme au téléphone (Loïc 27/11/2026). */
body.tz-m.tz-res #tai2-rs-rating { display: none !important; }
body.tz-m.tz-res #tai2-rs-right .tai2-rs-ctarow { flex-direction: row !important; }
body.tz-m.tz-res #tai2-rs-right .tz-rs-total { align-items: flex-start; }
/* La page défile (Loïc 27/11/2026) : le tunnel donne au résultat la hauteur exacte de l'écran et coupe le reste
   (pensé pour l'ordinateur) et ne lève cette règle que sous 680 px. Entre 681 et 1024 px (tablette en portrait,
   téléphone en paysage), « Modifier ma création » restait coupé sous la barre du panier, sans défilement possible. */
body.tz-m.tz-res #tai2-card[data-phase="result"] .tai2-right { height: auto !important; max-height: none !important; overflow: visible !important; }
/* Le vrai verrou (constaté sur dev en 768 × 820 le 27/11/2026) : le panneau du résultat (#tai2-panel-preview, flex: 1
   + overflow: hidden) et son contenu restaient à la hauteur de l'écran et cachaient le bas */
body.tz-m.tz-res #tai2-card[data-phase="result"] #tai2-panel-preview,
body.tz-m.tz-res #tai2-card[data-phase="result"] #tai2-brief-center { flex: none; min-height: 0; height: auto; overflow: visible; }
/* Au-delà de 900 px, le tunnel range le résultat en grille de trois colonnes et bloque la hauteur de la fiche
   (contain: size) : on garde la colonne du téléphone, photo carrée sur toute la largeur (même réglage que sous 860 px). */
body.tz-m.tz-res #tai2-card[data-phase="result"] #tai2-rs-layout { display: flex !important; flex-direction: column; flex: none; min-height: 0; }
body.tz-m.tz-res #tai2-card[data-phase="result"] #tai2-rs-right { contain: none; max-height: none; flex: none; }
/* Photo toujours carrée (les visuels le sont) : sur tablette, toute la largeur avec une hauteur bornée à la moitié de
   l'écran donnait un cadre plus large que haut qui coupait le haut et le bas ; carré centré à cette hauteur (choix A,
   Loïc 27/11/2026). Au téléphone, la largeur reste la plus petite des deux : rien ne change. */
body.tz-m.tz-res #tai2-card[data-phase="result"] .tai2-rs-left { flex: none; width: min(100%, 50dvh); align-self: center; }
body.tz-m.tz-res #tai2-card[data-phase="result"] .tai2-rs-left .tai2-insp-panel,
body.tz-m.tz-res #tai2-card[data-phase="result"] .tai2-insp-frame { flex: 0 0 auto; width: 100%; aspect-ratio: 1; height: auto; max-height: 50dvh; }
body.tz-m.tz-res #tai2-card[data-phase="result"] #tai2-rs-carousel-wrap { width: 100%; }
@media (min-width: 600px) {
  body.tz-m.tz-res #tai2-rs-thumbs .tai2-rs-thumb { flex: 0 0 96px; width: 96px; height: 96px; }
  body.tz-m.tz-res #tai2-rs-carousel-wrap { height: auto; }
  /* produits sur 3 colonnes */
  body.tz-m.tz-step-prod #tai2-card .tai2-prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* thèmes et styles sur 4 colonnes */
  body.tz-m.tz-step-theme #tai2-card .tt-th-grid,
  body.tz-m.tz-step-style #tai2-card .tt-style-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Tablette tactile en paysage (body.tz-t, maquette https://claude.ai/artifact/4fZNqVZv1scwwCGyD4mbYm) ───── */
/* Toute la hauteur pour le tunnel : en-tête du site et grand bandeau retirés, une seule barre en haut (retour,
   étape, les 4 étapes, Lya). La disposition ordinateur reste (catégories, grille qui défile seule, panneau). */
body.tz-t #header { display: none !important; }
body.tz-t .tz-head { height: 64px; box-sizing: border-box; padding: 0 20px; }
body.tz-t .tz-head__txt { flex: 0 1 auto; max-width: 330px; }
body.tz-t.tz-res .tz-head__back { display: none; }   /* pas de retour depuis le résultat (comme le tunnel) */
body.tz-t #tai2-card .tai2-left { height: calc(100dvh - 64px) !important; padding-bottom: 16px !important; box-sizing: border-box; }
body.tz-t #tai2-card .tt-gift,
body.tz-t #tai2-card .tt-stephead { display: none !important; }
body.tz-t #tai2-card .tai2-choice-list { padding-top: 16px; }
/* Pied du tunnel (étapes) remonté dans la barre du haut, à droite ; son bouton retour est celui de l'en-tête */
body.tz-t #tai2-card .tai2-left-footer {
  position: fixed; top: 0; bottom: auto; left: auto; right: 76px; z-index: 950; width: auto; height: 64px; min-height: 0;
  margin: 0; padding: 0; background: none; border: 0; box-shadow: none; display: flex; align-items: center;
}
body.tz-t #tai2-card .tai2-left-footer .tai2-footer-inner { padding: 0; margin: 0; background: none; border: 0; box-shadow: none; display: flex; align-items: center; gap: 8px; width: auto; }
body.tz-t #tai2-card .tai2-left-footer .tai2-back-btn { display: none !important; }
body.tz-t #tai2-card #tai2-steps { position: static; transform: none; margin: 0; }
/* la carte du tunnel (z-index 1) passait sous l'en-tête (900) : sans elle, la barre des étapes (950) passe devant */
body.tz-t #tai2-card { z-index: auto !important; }
/* Lya : petit bouton au bout de la barre, sa fenêtre s'ouvre en dessous */
body.tz-t #lya-bubble { top: 10px !important; bottom: auto !important; right: 16px !important; width: 44px !important; height: 44px !important; z-index: 960; }
body.tz-t #lya-panel { top: 70px !important; bottom: auto !important; }
/* Colonne des catégories retirée pour agrandir les vignettes : catégories et prix dans le panneau « Filtres »,
   ouvert par la gauche (Loïc 23/11/2026). */
body.tz-t #tai2-card .tt-prod { grid-template-columns: minmax(0, 1fr) 290px !important; gap: 16px; }
body.tz-t #tai2-card .tt-prod:has(> .tt-prod__panel:not(.tt-prod__panel--filled):not(.tt-recap)),
body.tz-t #tai2-card .tt-prod:not(:has(> .tt-prod__panel)) { grid-template-columns: minmax(0, 1fr) !important; }
body.tz-t #tai2-card .tt-prod > #tt-prod-panel:not(.tt-prod__panel--filled) { display: none !important; }
body.tz-t #tai2-card .tt-prod__grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
body.tz-t #tai2-card .tt-prod:has(> #tt-prod-panel:not(.tt-prod__panel--filled)) .tt-prod__grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
/* Colonne des catégories et filtres : panneau qui s'ouvre par la gauche */
body.tz-t #tai2-card .tt-side {
  position: fixed; top: 0; bottom: auto; left: 0; z-index: 1001; width: 300px; height: 100dvh !important; max-height: none; overflow-y: auto;
  border-radius: 0 18px 18px 0; background: var(--tz-card2); padding: 22px 16px; box-sizing: border-box;
  transform: translateX(-105%); transition: transform .25s ease; box-shadow: 12px 0 40px rgba(0, 0, 0, .45);
}
body.tz-t #tai2-card .tt-side.is-open { transform: none; }
body.tz-t #tai2-card .tt-side__close {
  display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; cursor: pointer; background: var(--tz-soft); color: var(--tz-txt);
}
body.tz-t #tai2-card .tt-sheet-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .5); }
/* Bouton « Filtres » (Produit, à côté du tri) / catégorie en cours (Thème, Style) : ouvre le panneau */
body.tz-t #tai2-card .tt-prod__filters-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--tz-line); background: var(--tz-card); color: var(--tz-txt); font: inherit; font-size: 14px; margin-left: auto;
}
body.tz-t #tai2-card .tt-prod__filters-btn > i { color: var(--tz-acc); }
body.tz-t.tz-step-prod #tai2-card .tt-prod__sort { margin-left: 8px; }
/* Thème, Style : comme sur téléphone (Loïc 23/11/2026) — bouton présenté comme un filtre (« Catégorie : », icône de
   filtre, flèche), à gauche sous les onglets ; le titre « Tous les thèmes (312) » et le compteur disparaissent */
body.tz-t:not(.tz-step-prod) #tai2-card .tt-prod__filters-btn { margin-left: 0; min-width: 260px; font-weight: 600; }
