/* Dinarya v4 : ajouts à base.css (la v3). Le reçu du comptoir, le pèse-tout et sa répartition, le placard,
   « Pourquoi pas la moins chère ? », le détail du classement, la toise de la scène, la fiche comptoir, le comparatif mobile. */

/* ------------------------------------------------------------------ règle non publiée par la compagnie : on le dit, on ne devine pas */
.non-publie { margin-top: 16px; max-width: 780px; padding: 18px 20px; border-radius: var(--rayon); background: var(--carte); box-shadow: var(--ombre); display: grid; gap: 8px; }
.non-publie h3 { font-size: 17px; letter-spacing: -.01em; }
.non-publie p { font-size: 14px; line-height: 1.5; color: var(--encre-2); }
.non-publie .btn { justify-self: start; margin-top: 4px; }
.d-np { font: 600 10.5px var(--police); fill: var(--encre-3); }

/* ------------------------------------------------------------------ scène : la toise rend l'échelle lisible */
.toise { position: absolute; left: 0; top: 0; z-index: 4; width: 34px; pointer-events: none; transition: transform .8s var(--ressort), height .8s var(--ressort), opacity .4s; }
.toise::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1.5px; background: var(--encre-2); border-radius: 1px; }
.toise i { position: absolute; right: 0; height: 1.5px; width: 7px; background: var(--encre-2); }
.toise i.l { width: 13px; }
.toise i b { position: absolute; right: 18px; top: -7px; font: 600 10.5px/1 var(--police); color: var(--encre-2); font-style: normal; font-variant-numeric: tabular-nums; }
.toise .t-titre { position: absolute; right: -2px; top: -26px; white-space: nowrap; font: 600 10.5px/1.2 var(--police); color: var(--encre-2); text-align: right; }
@media (max-width: 760px) {
  .toise { width: 26px; } .toise i b { right: 15px; font-size: 9.5px; } .toise .t-titre { display: none; }
  /* sur mobile, l'étiquette du gabarit passe sur deux lignes étroites pour laisser la règle à gauche */
  .gabarit .g-plaque { white-space: normal; width: 112px; }
}
/* le placard se replie en une ligne : la scène garde sa place */
details.placard > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.placard > summary::-webkit-details-marker { display: none; }
details.placard > summary .p-ouvrir { flex: none; font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--filet-fort); text-underline-offset: 3px; }
details.placard[open] > summary .p-ouvrir { display: none; }
details.placard:not([open]) { padding: 10px 14px; }

/* la carte garde une hauteur bornée : la scène (valises, gabarit, règle) garde toujours sa place, la carte défile dedans */
.carte { max-height: calc(100vh - 330px); max-height: calc(100svh - 330px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-width: 760px) { .carte { max-height: calc(100svh - 300px); } }

/* ------------------------------------------------------------------ carte question : onze destinations en deux rangs compacts */
.options.dests .option { min-height: 86px; padding: 11px 13px; }
.options.dests .o-compte { font-size: 21px; }
.options.dests .option b { margin-top: 8px; }
@media (max-width: 760px) {
  .options.dests { grid-template-columns: repeat(3, 1fr); }
  .options.dests .option { min-height: 58px; padding: 8px 9px; }
  .options.dests .o-aide { display: none; }
  .options.dests .o-compte { font-size: 15px; }
  .options.dests .o-compte small { font-size: 10.5px; margin-left: 3px; }
  .options.dests .option b { font-size: 12.5px; margin-top: 4px; }
}

/* ------------------------------------------------------------------ carte question : options à choix unique, placard */
.option .o-badge { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--carte); color: var(--encre-2); }
.placard { margin-top: 12px; padding: 12px 14px; border-radius: 13px; background: var(--tuile); display: grid; gap: 8px; }
.placard-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.placard-tete b { font-size: 14.5px; font-weight: 600; }
.placard-tete span { font-size: 12.5px; color: var(--encre-2); }
.placard-ajout { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.placard-ajout select { height: 40px; border: 1.5px solid var(--filet-fort); border-radius: 10px; padding: 0 10px; background: var(--carte); font-size: 14px; min-width: 0; }
.placard-ajout .btn { height: 40px; padding: 0 14px; font-size: 14px; }
.possedees { display: flex; flex-wrap: wrap; gap: 6px; }
.possedee { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px 0 11px; border-radius: 999px; background: var(--carte); font-size: 12.5px; font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--filet-fort); }
.possedee.ok { box-shadow: inset 0 0 0 1.5px var(--vert); color: var(--vert); }
.possedee.non { box-shadow: inset 0 0 0 1.5px var(--rouge); color: var(--rouge); }
.possedee button { border: 0; background: none; width: 18px; height: 18px; padding: 0; display: grid; place-items: center; color: inherit; }
.possedee button svg { width: 10px; height: 10px; }

/* ------------------------------------------------------------------ résultats : rôles calculés, formules, pourquoi, détail du classement */
.roles { position: absolute; top: -13px; left: 20px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 40px); }
.roles .badge { position: static; }
.badge.second, .panneau.premier .roles .badge.second { background: #4a4a46; }
.formules { margin-top: 10px; display: grid; gap: 3px; font-size: 13.5px; line-height: 1.4; color: var(--encre-2); }
.formules b { color: var(--encre); font-weight: 600; font-variant-numeric: tabular-nums; }
.filtres { margin-top: 14px; font-size: 13.5px; color: var(--encre-2); }
.t-role { display: block; font-size: 11.5px; font-weight: 600; color: var(--rouge); }
.t-ecartees { margin: -6px 0 16px; font-size: 13px; color: var(--encre-2); line-height: 1.45; }
.pourquoi.meme p { margin-top: 4px; font-size: 13px; color: var(--encre-2); }
.garantie-texte { margin-top: 8px; font-size: 12.5px; color: var(--encre-2); line-height: 1.4; }
.pourquoi { margin-top: 14px; padding: 13px 14px; border-radius: 12px; background: #f2f7f4; box-shadow: inset 0 0 0 1px #d3e6db; }
.pourquoi h3 { font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.pourquoi .p-ecart { margin-top: 6px; font-size: 13.5px; line-height: 1.4; }
.pourquoi .p-ecart b { font-weight: 700; font-variant-numeric: tabular-nums; }
.pourquoi ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; line-height: 1.35; }
.pourquoi li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; }
.pourquoi li svg { width: 14px; height: 14px; margin-top: 2px; }
.pourquoi li.plus svg { color: var(--vert); }
.pourquoi li.moins svg { color: var(--rouge); }
.pourquoi .p-an { margin-top: 8px; font-size: 12.5px; color: var(--encre-2); }
.pourquoi.meme { background: var(--tuile); box-shadow: none; }
.detail-classement { margin-top: 22px; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 4px 22px; }
.detail-classement summary { cursor: pointer; list-style: none; padding: 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 600; font-size: 16px; }
.detail-classement summary::-webkit-details-marker { display: none; }
.detail-classement summary span { font-weight: 400; font-size: 13.5px; color: var(--encre-2); }
.detail-classement[open] summary { border-bottom: 1px solid var(--filet); }
.regle-classement { margin: 14px 0 6px; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 6px; font-size: 14px; }
.regle-classement li { counter-increment: c; display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: baseline; }
.regle-classement li::before { content: counter(c); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--encre); color: #fff; font-size: 12px; font-weight: 600; }
.table-classement { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.table-classement th { text-align: left; font-size: 12px; font-weight: 600; color: var(--encre-2); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--filet); white-space: nowrap; }
.table-classement td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--filet); vertical-align: top; }
.table-classement td.n { text-align: right; white-space: nowrap; }
.table-classement th.n { text-align: right; }
.table-classement tr.premier td { font-weight: 600; }
.oui-non { font-weight: 600; }
.oui-non.oui { color: var(--vert); } .oui-non.non { color: var(--rouge); } .oui-non.nsp { color: var(--encre-3); }

/* comparatif des trois sur mobile : la comparaison reste visible même avec les onglets */
.compare-mobile { display: none; }
/* un podium de deux ou d'une carte : chaque carte tient une place calculée, aucune n'est ajoutée pour remplir */
.podium[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 430px)); }
.podium[data-n="1"] { grid-template-columns: minmax(0, 470px); }
@media (max-width: 760px) {
  .compare-mobile { display: grid; grid-template-columns: repeat(3, 1fr); grid-row: 2; grid-column: 1 / -1; margin-top: 4px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
  .compare-mobile div { padding: 6px 2px; border-top: 1px solid var(--filet); }
  .compare-mobile b { display: block; font-size: 15px; font-weight: 700; }
  .compare-mobile span { color: var(--vert); font-weight: 600; }
  .podium .panneau { grid-row: 3; }
  .roles { left: 14px; }
  .podium[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
  .podium[data-n="1"] { grid-template-columns: 1fr; }
  .podium[data-n="2"] .compare-mobile { grid-template-columns: repeat(2, 1fr); }
  .podium[data-n="1"] .compare-mobile { display: none; }
}

/* ------------------------------------------------------------------ le kit de la famille, avec le placard */
.kit-sacs { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.kit-sac { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--filet-fort); font-size: 13px; font-weight: 600; }
.kit-sac.possedee { box-shadow: inset 0 0 0 1.5px var(--vert); color: var(--vert); }
.kit-sac i { width: 10px; height: 14px; border: 1.8px solid currentColor; border-radius: 3px; }
.rien-a-acheter { font-size: 16px; font-weight: 600; color: var(--vert); }

/* ------------------------------------------------------------------ le pèse-tout */
.pesetout { margin-top: 16px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.pt-catalogue { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px 16px 12px; }
.pt-onglets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pt-onglets::-webkit-scrollbar { display: none; }
.pt-onglet { flex: none; height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--tuile); font-size: 13.5px; font-weight: 600; color: var(--encre-2); }
.pt-onglet[aria-pressed="true"] { background: var(--encre); color: #fff; }
.pt-onglet small { font-weight: 500; opacity: .8; margin-left: 4px; }
.pt-objets { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 420px; overflow-y: auto; padding-right: 2px; }
.pt-objet { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 9px 9px 9px 12px; border-radius: 12px; background: var(--tuile); }
.pt-objet.pris { background: var(--vert-pale); }
.pt-objet b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.pt-objet span { display: block; font-size: 12px; color: var(--encre-2); line-height: 1.3; }
.pt-objet .pt-src { font-size: 11px; color: var(--encre-3); }
.pt-pas { display: flex; align-items: center; gap: 2px; }
.pt-pas button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--filet-fort); font-size: 17px; line-height: 1; display: grid; place-items: center; }
.pt-pas button:hover { box-shadow: inset 0 0 0 1.5px var(--encre); }
.pt-pas button[disabled] { opacity: .3; cursor: default; }
.pt-pas output { min-width: 20px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 12.5px; color: var(--encre-2); }
.pt-actions .btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
.pt-sacs { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px; display: grid; gap: 12px; }
.pt-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pt-total .k-gros { font-size: 38px; font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.pt-total .k-gros small { font-size: 17px; margin-left: 3px; }
.pt-total p { font-size: 13px; color: var(--encre-2); text-align: right; }
.sac { display: grid; gap: 6px; }
.sac-tete { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.sac-tete b { font-weight: 600; }
.sac-tete span { color: var(--encre-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sac-barre { position: relative; height: 12px; border-radius: 6px; background: var(--tuile-2); overflow: hidden; }
.sac-barre i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--vert); border-radius: 6px; transition: width .5s var(--ease); }
.sac.plein .sac-barre i { background: #d08a00; }
.sac-tete b small { font-weight: 500; color: var(--rouge); margin-left: 4px; }
.methode-lien { margin-top: 18px; font-size: 14px; color: var(--encre-2); }
.methode-lien a { color: var(--encre); font-weight: 600; }
.t-ligne small.t-note { margin-top: 2px; color: var(--encre-3); font-size: 11px; line-height: 1.35; }
.sac-contenu { font-size: 11.5px; color: var(--encre-3); line-height: 1.35; }
.debord { padding: 11px 12px; border-radius: 12px; background: #fde8eb; color: #8c1323; font-size: 13px; line-height: 1.4; }
.debord b { font-weight: 700; }
.astuce { padding: 11px 12px; border-radius: 12px; background: var(--tuile); font-size: 13px; line-height: 1.4; color: var(--encre-2); }
.astuce b { color: var(--encre); font-weight: 600; }

/* ------------------------------------------------------------------ le reçu du comptoir */
.recu { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ticket { position: relative; background: var(--carte); border-radius: 6px 6px 0 0; box-shadow: var(--ombre); padding: 22px 22px 26px; font-variant-numeric: tabular-nums; }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, var(--carte) 0) 0 0 / 14px 10px, linear-gradient(45deg, transparent 6px, var(--carte) 0) 0 0 / 14px 10px; }
.ticket h3 { font-size: 15px; font-weight: 600; text-align: center; letter-spacing: -.005em; }
.ticket .t-sous { text-align: center; font-size: 12px; color: var(--encre-2); margin-top: 3px; }
.ticket hr { border: 0; border-top: 1.5px dashed var(--filet-fort); margin: 14px 0; }
.t-ligne { display: grid; grid-template-columns: 1fr auto; gap: 12px; font-size: 13.5px; line-height: 1.35; padding: 4px 0; }
.t-ligne span small { display: block; color: var(--encre-3); font-size: 11.5px; }
.t-ligne b { font-weight: 600; white-space: nowrap; }
.t-ligne.inclus b { color: var(--vert); }
.t-total { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline; font-size: 15px; font-weight: 600; }
.t-total b { font-size: 26px; letter-spacing: -.03em; }
.t-total.aero b { color: var(--rouge); }
.t-economie { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--vert-pale); color: var(--vert); font-size: 13.5px; font-weight: 600; text-align: center; }
.t-inconnu { margin-top: 10px; font-size: 12px; color: var(--encre-2); line-height: 1.4; }
.t-sources { margin-top: 12px; font-size: 11.5px; color: var(--encre-3); line-height: 1.5; }
.t-sources a { color: var(--encre-2); }
.recu-plan { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px; display: grid; gap: 10px; }
.recu-plan .pas { background: var(--tuile); }
.recu-plan p { font-size: 13px; color: var(--encre-2); line-height: 1.45; }

/* ------------------------------------------------------------------ listes séparées : budget d'un côté, refus de l'autre */
.liste.budget .ligne { background: transparent; box-shadow: inset 0 0 0 1px var(--filet-fort); }
.liste.budget .l-nom span { color: var(--ambre); }

/* ------------------------------------------------------------------ vérificateur : la route et le pont vers ce qui passe */
.v-route { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.v-route button { height: 34px; padding: 0 13px; border-radius: 999px; border: 0; background: var(--carte); box-shadow: inset 0 0 0 1.5px var(--filet-fort); font-size: 13.5px; font-weight: 600; }
.v-route button[aria-pressed="true"] { background: var(--encre); color: #fff; box-shadow: none; }
.verdict.hors-route { opacity: .45; }
.pont { margin-top: 8px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--tuile); text-decoration: none; font-size: 12.5px; line-height: 1.3; }
.pont:hover { box-shadow: inset 0 0 0 1.5px var(--encre); }
.pont .p-photo { position: relative; width: 38px; height: 46px; flex: none; }
.pont b { font-weight: 600; }
.pont .p-prix { margin-left: auto; font-weight: 700; white-space: nowrap; }

/* ------------------------------------------------------------------ fiche comptoir (écran et impression) */
.fiche-fond { position: fixed; inset: 0; z-index: 80; background: rgba(18, 18, 18, .45); display: grid; place-items: center; padding: 18px; }
.fiche { width: min(560px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--carte); border-radius: 18px; padding: 24px; box-shadow: var(--ombre-forte); }
.fiche h2 { font-size: 24px; letter-spacing: -.025em; }
.fiche .f-sous { margin-top: 4px; font-size: 13.5px; color: var(--encre-2); }
.fiche dl { margin: 16px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14.5px; }
.fiche dt { color: var(--encre-2); }
.fiche dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fiche .f-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fiche .f-actions label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--encre-2); }
.fiche .f-actions input { height: 40px; border: 1.5px solid var(--filet-fort); border-radius: 10px; padding: 0 10px; }
.fiche .f-sources { margin-top: 14px; font-size: 11.5px; color: var(--encre-3); line-height: 1.5; }
@media print {
  body > *:not(.fiche-fond) { display: none !important; }
  .fiche-fond { position: static; background: none; padding: 0; }
  .fiche { box-shadow: none; max-height: none; }
  .fiche .f-actions { display: none; }
}

@media (max-width: 860px) {
  .pesetout, .recu { grid-template-columns: 1fr; }
  .pt-objets { grid-template-columns: 1fr; max-height: 360px; }
}
@media (max-width: 760px) {
  .pt-catalogue, .pt-sacs, .recu-plan, .ticket { padding: 14px; }
  .pt-total .k-gros { font-size: 31px; }
  .t-total b { font-size: 22px; }
  .detail-classement { padding: 2px 14px; }
  .table-classement { font-size: 12px; }
  .table-classement .masque-mobile { display: none; }
  .placard-ajout { grid-template-columns: 1fr; }
}
