/* Digitalmuz — fiche d'un site (maquette) */

body.dmz-fiche { background: #f6fafc; }

.pastille-panier { display: inline-flex; align-items: center; gap: 8px; }
.pastille-panier b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 6px; border-radius: 999px; background: var(--brume); color: var(--azur-fonce); font-size: .75rem; font-weight: 600; }

.retour { display: inline-flex; align-items: center; gap: 8px; margin-block: 24px 20px; font-size: .9375rem; font-weight: 500; text-decoration: none; }
.retour::before { content: ""; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.retour:hover { text-decoration: underline; }

/* Deux colonnes : le site à gauche, la commande à droite (elle reste visible quand on fait défiler). */
.fiche { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 24px 32px; align-items: start; padding-bottom: clamp(48px, 7vw, 96px); }
.fiche-gauche { display: grid; gap: 24px; min-width: 0; }
.commande { position: sticky; top: 96px; }

.bloc { background: var(--blanc); border: 1px solid var(--trait); border-radius: 24px; padding: clamp(20px, 2.6vw, 32px); }
.bloc > h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 16px; }

/* En-tête du site */
.site-tete .themes { margin: 0 0 14px; }
.site-tete h1 { font-size: clamp(1.875rem, 4vw, 2.75rem); text-transform: lowercase; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.site-tete p { margin-top: 14px; font-size: 1.0625rem; color: #2f4857; max-width: 62ch; }

/* Score et notes */
.bloc-score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: center; }
.grand-score { text-align: center; }
.grand-score .score-anneau { width: 148px; height: 148px; background: radial-gradient(closest-side, var(--blanc) 80%, transparent 81%), conic-gradient(var(--ambre) calc(var(--v) * 1%), #e6eef3 0); }
.grand-score .score-anneau b { font-size: 3.25rem; font-weight: 800; letter-spacing: -0.03em; }
.grand-score .score-anneau span { display: block; margin-top: 2px; font-size: .75rem; color: var(--gris); font-weight: 500; letter-spacing: 0; word-spacing: .15em; }
.grand-score .score-nom { margin-top: 12px; font-size: .9375rem; color: var(--encre); gap: 8px; }
.bloc-score .notes { margin: 0; padding: 0; border: 0; gap: 14px; }
.bloc-score .note { grid-template-columns: 12.2em minmax(0, 1fr) 2.4em; font-size: .9375rem; gap: 12px; }
.bloc-score .note-barre { height: 10px; }
.bloc-score .note-val { font-size: 1.0625rem; }
.bloc-score .note-detail { font-size: .875rem; }
.source { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--trait); font-size: .8125rem; color: var(--gris); }

/* Ce que l'offre comprend */
.compris { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.compris li { position: relative; padding-left: 34px; }
.compris li::before { content: ""; position: absolute; left: 0; top: .1em; width: 22px; height: 22px; border-radius: 50%; background: var(--azur) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.4l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain; }
.compris b { display: block; font-weight: 600; }
.compris span { color: var(--gris); font-size: .9375rem; }

/* Présentation du site */
.presentation { display: grid; gap: 18px; }
.presentation dt { font-weight: 600; margin-bottom: 4px; }
.presentation dd { color: #2f4857; max-width: 68ch; }

/* ---------- Commande ---------- */
.commande-carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: 24px; padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--ombre); }
.commande-prix { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 18px; border-bottom: 1px solid var(--trait); }
.commande-prix b { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.commande-prix span { color: var(--gris); font-size: .9375rem; }
#commande fieldset { border: 0; margin: 26px 0 0; padding: 0; min-width: 0; }
#commande > h2 + fieldset { margin-top: 0; }
#commande legend { padding: 0; font-weight: 600; font-size: 1rem; margin-bottom: 10px; }
#commande legend + .aide-champ { margin: -4px 0 12px; max-width: 70ch; }
.choix-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choix-grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.brief-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.champ-brief-large { grid-column: 1 / -1; }
.recap > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px dashed #c9d7e0; }
.recap dt { font-weight: 600; font-size: .9375rem; }
.recap dt small { display: block; font-weight: 400; font-size: .8125rem; color: var(--gris); }
.recap dd { font-weight: 600; font-size: .9375rem; white-space: nowrap; color: var(--azur-fonce); }
.aide-champ { display: block; color: var(--gris); font-size: .8125rem; line-height: 1.5; }

.choix { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 12px 14px; border: 1px solid #b9cedb; border-radius: 14px; cursor: pointer; }
.choix input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--azur); }
.choix b { font-weight: 600; font-size: .9375rem; line-height: 1.35; }
.choix i { font-style: normal; font-weight: 600; font-size: .875rem; white-space: nowrap; color: var(--azur-fonce); }
.choix small { grid-column: 2 / -1; color: var(--gris); font-size: .8125rem; line-height: 1.45; }
.choix em { font-style: normal; display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ambre-clair); color: #6b4e00; font-size: .6875rem; font-weight: 600; vertical-align: 1px; }
.choix:hover { border-color: var(--azur); }
.choix:has(input:checked) { border-color: var(--azur); background: var(--brume); box-shadow: inset 0 0 0 1px var(--azur); }
.choix:has(input:focus-visible) { outline: 3px solid var(--ambre); outline-offset: 2px; }

.champ-brief { display: block; min-width: 0; }
.champ-brief > span { display: block; font-weight: 500; font-size: .875rem; margin-bottom: 6px; }
.champ-brief > span i { font-style: normal; color: #b42318; }
.saisie { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid #b9cedb; border-radius: var(--rayon-petit); background: var(--blanc); }
textarea.saisie { min-height: 96px; resize: vertical; }
.saisie:focus { border-color: var(--azur); }
.saisie[aria-invalid="true"] { border-color: #b42318; }
.erreur-champ { display: block; margin-top: 4px; color: #b42318; font-size: .8125rem; }

.commande-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; font-weight: 600; }
.commande-total b { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.commande-actions { display: flex; gap: 10px; margin-top: 16px; }
.commande-actions .btn { flex: 1; }
.commande-actions .favori { width: 50px; height: 50px; border-radius: 50%; }
.commande-etat { margin-top: 12px; font-size: .875rem; color: var(--gris); }
.commande-etat:empty { display: none; }
.rappel-pack { display: block; margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: var(--ambre-clair); color: var(--encre); font-size: .875rem; line-height: 1.5; text-decoration: none; }
.rappel-pack b { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; background: var(--ambre); font-weight: 700; }
.rappel-pack:hover { color: var(--encre); background: #fbe7a3; }
.paiement { margin-top: 12px; font-size: .8125rem; color: var(--gris); text-align: center; }

/* Bulle d'explication (la même que dans le catalogue) */
.aide { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; padding: 0; border: 1px solid #9db7c6; border-radius: 50%; background: var(--blanc); color: var(--azur-fonce); font-size: .6875rem; font-weight: 700; line-height: 1; }
.aide:hover, .aide[aria-expanded="true"] { background: var(--azur); border-color: var(--azur); color: var(--blanc); }
.aide::after { content: ""; position: absolute; inset: -10px; }
.bulle { position: absolute; z-index: 50; width: min(340px, calc(100vw - 32px)); background: var(--nuit); color: #e7f2f8; border-radius: 12px; padding: 16px 18px; font-size: .875rem; line-height: 1.55; box-shadow: 0 12px 32px rgba(12, 43, 61, .28); }
.bulle h3 { font-size: .9375rem; color: var(--blanc); margin-bottom: 6px; padding-right: 28px; }
.bulle p + p { margin-top: 8px; }
.bulle .bulle-source { color: #a9c6d6; font-size: .8125rem; }
.bulle a { color: var(--ciel); font-weight: 500; }
.bulle-fermer { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #c9dbe6; font-size: 1.25rem; line-height: 1; }
.bulle-fermer:hover { background: rgba(255, 255, 255, .12); color: var(--blanc); }
[hidden] { display: none !important; }

/* ---------- Adaptation ---------- */
@media (max-width: 1020px) {
  .fiche { grid-template-columns: minmax(0, 1fr); }
  /* Sur petit écran, le récapitulatif devient une barre collée en bas : total et bouton restent sous le pouce. */
  .commande { position: sticky; top: auto; bottom: 0; z-index: 30; margin-inline: calc(-1 * var(--marge)); }
  .commande-carte { border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding: 12px var(--marge) 14px; box-shadow: 0 -12px 30px -18px rgba(10, 52, 80, .45); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 16px; }
  .commande-prix, .recap, .rappel-pack, .paiement { display: none; }
  .commande-total { margin: 0; flex-direction: column; align-items: flex-start; font-size: .8125rem; font-weight: 500; color: var(--gris); }
  .commande-total b { font-size: 1.5rem; color: var(--encre); line-height: 1.1; }
  .commande-actions { margin: 0; }
  .commande-etat { grid-column: 1 / -1; margin: 4px 0 0; }
}
@media (max-width: 640px) {
  .bloc-score { grid-template-columns: minmax(0, 1fr); }
  .grand-score .score-anneau { width: 124px; height: 124px; }
  .grand-score .score-anneau b { font-size: 2.75rem; }
  .bloc-score .note { grid-template-columns: 10em minmax(0, 1fr) 2.2em; font-size: .875rem; gap: 8px; }
  .compris, .choix-grille, .choix-grille-3, .brief-grille { grid-template-columns: minmax(0, 1fr); }
  .commande-actions .favori { display: none; }
  .bloc, .commande-carte { border-radius: 20px; }
  .site-tete h1 { font-size: 1.5rem; }
  .entete-actions .entete-lien { display: none; }
}
