/* =============================================================================
   Camabe — l'onglet « Sécurité & données » (25/09/2026) : site-vitrine/donnees.php.
   Des tableaux lisibles et imprimables, l'etat de chaque garantie (en place,
   en partie, avant l'ouverture). Variables du socle seulement, jour et nuit.
   ========================================================================== */

.dn-avant { margin: 28px 0 0; padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--info) 35%, transparent); border-radius: var(--rayon); background: var(--info-pale); color: var(--encre); font-size: .92rem; line-height: 1.55; }
.dn-avant strong { color: var(--info); }
.dn-partie { scroll-margin-top: calc(var(--haut-barre, 69px) + 56px); }
.dn-partie .section__titre { max-width: 30ch; }
.dn-duo { align-items: start; }
.dn-note { margin-top: 1.2rem; font-size: .9rem; }

/* L'etat d'une garantie. */
.dn-etat { display: inline-block; padding: 2px 10px; border: 1px solid; border-radius: 99px; font-size: .74rem; font-weight: 600; line-height: 1.6; white-space: nowrap; vertical-align: middle; }
.dn-etat--fait { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-pale); color: var(--accent); }
.dn-etat--partiel { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-pale); color: var(--info); }
.dn-etat--afaire { border-color: var(--alerte-trait); background: var(--alerte-pale); color: var(--alerte); }

/* Les tableaux. */
.dn-table-cadre { margin-top: 1.8rem; overflow-x: auto; border: 1px solid var(--trait); border-radius: 14px; background: var(--carte); box-shadow: var(--ombre); }
.dn-table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.55; }
.dn-table th, .dn-table td { padding: 14px 18px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
.dn-table thead th { background: var(--papier-creux); color: var(--encre-douce); font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.dn-table tbody th { width: 26%; font-weight: 600; }
.dn-table tbody td:last-child { width: 1%; }
.dn-table--prestataires tbody td:last-child, .dn-table--fiche tbody td:last-child { width: auto; }
.dn-table--prestataires tbody th { width: 22%; }
.dn-table tbody tr:last-child th, .dn-table tbody tr:last-child td { border-bottom: 0; }

/* La securite des comptes. */
.dn-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 1.8rem; }
.dn-grille article { padding: 20px 22px; border: 1px solid var(--trait); border-radius: 14px; background: var(--carte); }
.dn-grille h3 { margin: 12px 0 6px; font-size: 1.05rem; }
.dn-grille p { margin: 0; color: var(--encre-douce); font-size: .92rem; line-height: 1.55; }

/* Avant l'ouverture. */
.dn-liste { display: grid; gap: 10px; margin: 1.6rem 0 0; padding: 0; list-style: none; counter-reset: dn; }
.dn-liste li { position: relative; padding: 14px 18px 14px 56px; border: 1px solid var(--trait); border-radius: 12px; background: var(--carte); line-height: 1.5; counter-increment: dn; }
.dn-liste li::before { content: counter(dn); position: absolute; left: 16px; top: 12px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--alerte-pale); color: var(--alerte); font-size: .84rem; font-weight: 700; }
.dn-actions { margin-top: 2rem; }

@media (max-width: 900px) {
  .dn-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Telephone : chaque ligne de tableau devient une carte. */
@media (max-width: 640px) {
  .dn-grille { grid-template-columns: minmax(0, 1fr); }
  .dn-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dn-table, .dn-table tbody, .dn-table tr, .dn-table th, .dn-table td { display: block; width: auto !important; }
  .dn-table tr { padding: 14px 16px; border-bottom: 1px solid var(--trait); }
  .dn-table tbody tr:last-child { border-bottom: 0; }
  .dn-table th, .dn-table td { padding: 0; border: 0; }
  .dn-table tbody th { margin-bottom: 6px; }
  .dn-table tbody td + td { margin-top: 8px; }
}

@media print {
  .sommaire, .dn-actions, .discuter { display: none !important; }
  .dn-table-cadre, .dn-grille article, .dn-liste li { box-shadow: none; }
  .dn-etat { border-color: currentColor; background: none; }
}
