/* Thème Toits (Le Chat Poudré, 20/11/2026) : l'habillage Candy passé à la palette du toits (marine du store, or, crème,
   un seul bordeaux pour l'action). Recopié du thème Usine. Chargé APRÈS les feuilles de Candy : chaque règle commence par
   body[data-vitrine="toits"] pour l'emporter sur elles. L'accueil et le catalogue : scene.css. */

body[data-theme="template"][data-glossy][data-vitrine="toits"] {
  --g-a: #a3162a;   /* bleu électrique */
  --g-b: #f2c66d;   /* cyan */
  --g-c: #f2c66d;   /* or */
  --g-d: #c8263a;   /* violet */
  --g-ink: #0d0f17; /* nuit */
}

/* Le monde : l'toits-serre sous la galaxie en fond fixe, assombrie en bas pour les rayons. */
body[data-vitrine="toits"][data-glossy="candy"] {
  background:
    linear-gradient(180deg, rgba(13,15,23,.15), rgba(13,15,23,.55) 60%, rgba(13,15,23,.9)),
    #0d0f17 !important;
}
body[data-vitrine="toits"] #appContent { background: transparent !important; }

/* Le contremaître est en portrait : plus haut que le bocal de Candy. */
body[data-vitrine="toits"] .cl-vedette img { height: min(46svh, 92vw); }
body[data-vitrine="toits"] .cl-hero:has(.cl-logo) .cl-vedette img { height: min(33svh, 72vw); }
body[data-vitrine="toits"] .cl-vedette::before {
  background: radial-gradient(circle, rgba(242,198,109,.55), rgba(163,22,42,.3) 45%, rgba(13,15,23,0) 70%);
}
body[data-vitrine="toits"] .cl-vedette img { filter: drop-shadow(0 22px 24px rgba(0,0,0,.55)); }

/* La planète, la clé et le bocal-fusée gravitent autour du contremaître. */
body[data-vitrine="toits"] .cl-sat--0 { left: 2%; top: 36%; width: 17vw; max-width: 96px; rotate: -10deg; }
body[data-vitrine="toits"] .cl-sat--1 { right: 2%; top: 30%; width: 13vw; max-width: 72px; rotate: 12deg; }
body[data-vitrine="toits"] .cl-sat--2 { right: 6%; bottom: 24%; width: 23vw; max-width: 124px; rotate: 0deg; }

/* Le logo : tuile nuit, pas blanche (le logo du client est déjà sur fond bleu nuit). */
body[data-vitrine="toits"] .cl-logo { background: #0d0f17; border-color: rgba(255,255,255,.9); padding: 0; box-shadow: 0 0 0 4px rgba(242,198,109,.25), 0 10px 22px rgba(0,0,0,.5); }

/* Bandeaux du titre : bleu → violet, comme le nom en 3D du logo. */
body[data-vitrine="toits"] .cl-etiq { text-shadow: 0 3px 0 rgba(13,15,23,.45); box-shadow: 0 10px 22px rgba(0,0,0,.45), 0 0 24px rgba(242,198,109,.35), inset 0 -5px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.45); }
body[data-vitrine="toits"] .cl-etiq--0 { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-a), var(--g-d)); }
body[data-vitrine="toits"] .cl-etiq--1 { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-d), #d8404f); }

/* Les bulles de Candy deviennent des étoiles d'or qui montent. */
body[data-vitrine="toits"] .cl-bulles i {
  width: calc(8px + (var(--i) * 5px) % 14px); border: 0; border-radius: 0;
  background: var(--g-c);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px rgba(242,198,109,.9));
}

/* Gros bouton, bande, barre panier, + : la gelée bleue → violette. */
body[data-vitrine="toits"] .cl-cta {
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 48%), linear-gradient(135deg, var(--g-a), var(--g-d));
  box-shadow: 0 7px 0 #560a15, 0 16px 28px rgba(163,22,42,.5);
}
body[data-vitrine="toits"] .cl-cta:active { box-shadow: 0 1px 0 #560a15, 0 6px 12px rgba(163,22,42,.4); }
body[data-vitrine="toits"] .cl-preuve b { color: var(--g-d); }
body[data-vitrine="toits"] .cl-bande { background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 50%), linear-gradient(90deg, var(--g-d), var(--g-a), #d8404f); box-shadow: 0 10px 24px rgba(0,0,0,.45); }
body[data-vitrine="toits"] .cl-rayon__tete h2 { text-shadow: 0 3px 0 rgba(13,15,23,.7), 0 0 18px rgba(242,198,109,.55); }
body[data-vitrine="toits"] .cl-carte {
  background: radial-gradient(circle at 30% 12%, #fff, rgba(255,255,255,0) 55%), linear-gradient(165deg, #fffaf0, #f6ead4 55%, #f3e6cf);
  box-shadow: 0 16px 30px rgba(0,0,0,.45), 0 0 22px rgba(242,198,109,.18), inset 0 -8px 16px rgba(163,22,42,.12);
}
body[data-vitrine="toits"] .cl-carte__photo { background: linear-gradient(160deg, #f6ead4, #efdfc2); }
body[data-vitrine="toits"] .cl-prix small { color: #6b6480; }
body[data-vitrine="toits"] .cl-plus,
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] #productsGrid .pc-add {
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-a), var(--g-d)) !important;
  box-shadow: 0 8px 16px rgba(163,22,42,.5), inset 0 -3px 0 rgba(0,0,0,.18);
}
body[data-vitrine="toits"] #cl-barre { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-d), var(--g-a)); box-shadow: 0 14px 30px rgba(0,0,0,.55); }

/* Boutons principaux de tous les écrans (fiche, panier, commande, avis). */
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] :is(#modalPurchase, .basket-cta, #confirmOrderBtn, #submitReviewBtn, #promoApplyBtn) {
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 48%), linear-gradient(135deg, var(--g-a), var(--g-d)) !important;
}
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] .category-pill.is-active {
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-a), var(--g-d)) !important;
}
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] .pageSection > p,
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] .pageSection > p.text-xs.font-semibold.uppercase {
  text-shadow: 0 2px 6px rgba(13,15,23,.8), 0 0 14px rgba(242,198,109,.5) !important;
}

/* Le duo accompagne le parcours : panier vide, commande, infos. Images en décor, aucun texte inventé. */
body[data-vitrine="toits"] .basket-empty-icon { display: none !important; }
body[data-vitrine="toits"] .basket-empty::before,
body[data-vitrine="toits"] #orderModal > .glass::before,
body[data-vitrine="toits"] #infoSection::before {
  content: ""; display: block; margin: 0 auto 6px; aspect-ratio: 1; background: center / contain no-repeat;
}
body[data-vitrine="toits"] .basket-empty::before { width: min(52vw, 210px); background-image: url("heros/pose-panier-vide.webp"); }
body[data-vitrine="toits"] #orderModal > .glass::before { width: min(30vw, 120px); margin-top: -6px; background-image: url("heros/pose-commande-envoyee.webp"); }
body[data-vitrine="toits"] #infoSection::before { width: min(46vw, 190px); background-image: url("heros/pose-infos.webp"); }

/* Barre du bas et panneaux : la nuit bleue, plus de magenta. */
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] #bottomNav {
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 30%), linear-gradient(135deg, rgba(18,20,30,.96), rgba(34,38,58,.96)) !important;
}
body[data-theme="template"][data-glossy][data-vitrine="toits"] #bottomNav::before { box-shadow: 0 0 10px rgba(242,198,109,.6) !important; }
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] #bottomNav #basketBtn::before { box-shadow: 0 10px 24px rgba(163,22,42,.6) !important; }
body[data-glossy="candy"][data-vitrine="toits"] {
  --g-panneau:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,1), rgba(255,255,255,0) 60%),
    linear-gradient(165deg, #fffaf0, #f6ead4 55%, #f3e6cf);
}

/* Panier vide : la carte sombre du moteur disparaît dans le panneau clair (le texte y était illisible). */
body[data-theme="template"][data-vitrine="toits"] .basket-empty { background: transparent !important; border: 0 !important; box-shadow: none !important; }
body[data-theme="template"][data-vitrine="toits"] .basket-empty :is(a, button) {
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 48%), linear-gradient(135deg, var(--g-a), var(--g-d)) !important;
  color: #fff !important; border: 2px solid #fff !important; border-radius: 999px !important; box-shadow: 0 6px 14px rgba(163,22,42,.4) !important;
}
/* Le total est posé sur la barre bleue : blanc, sinon bleu sur bleu. */
body[data-theme="template"][data-glossy="candy"][data-vitrine="toits"] #basketSection .basket-summary-row .basket-total { color: #fff !important; text-shadow: 0 1px 0 rgba(0,0,0,.25); }

/* La tuile du logo est retirée du héros : le duo EST le logo et le nom est juste dessous.
   Sans elle, la ligne de preuve reste au-dessus du bouton panier sur iPhone (vu au simulateur, 14/11). */
body[data-vitrine="toits"] .cl-logo { display: none; }

/* L'accueil (le cockpit, le saut, le catalogue dans le pare-brise) : cockpit.css. */

.tt-etoile {
  position: fixed; z-index: 9999; width: 16px; aspect-ratio: 1; pointer-events: none; background: var(--c, #f2c66d);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px var(--c, #f2c66d));
}

/* Écran de lancement : nuit bleue au lieu du noir, logo sans fond plus grand, qui flotte dans un halo. */
body[data-vitrine="toits"] #loadingOverlay { background: radial-gradient(circle at 50% 42%, #22263a, #0d0f17 62%) !important; }
body[data-vitrine="toits"] #loadingOverlay img { max-width: min(72vw, 300px); max-height: 300px; filter: none; animation: g-flotte 3s ease-in-out infinite; } /* pas de halo : il dessinait un contour autour du logo */
