/* « Quoi de neuf » (06/11/2026) : feuille des nouveautés, à la manière de l'écran « Nouveautés » d'iOS.
   Une seule couleur (la sauge de la marque, sans sens d'état), un seul moment animé (l'emblème et la cascade des lignes
   à l'ouverture), rien si « réduire les animations ». Bureau, appli terrain et Mes RDV. */
.qdn {
  --qdn-saison: transparent;
  width: min(468px, calc(100% - 32px)); max-height: min(760px, 88dvh); padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 30px; background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 100px rgb(10 20 15 / 22%), 0 2px 8px rgb(10 20 15 / 6%);
  display: none; flex-direction: column;
}
.qdn[open] { display: flex; }
.qdn::backdrop { background: rgb(18 24 20 / 34%); -webkit-backdrop-filter: blur(8px) saturate(120%); backdrop-filter: blur(8px) saturate(120%); }
:root[data-theme=dark] .qdn { box-shadow: 0 30px 100px rgb(0 0 0 / 55%); }
:root[data-theme=dark] .qdn::backdrop { background: rgb(0 0 0 / 50%); }
.qdn-ouverte { overflow: hidden; }

/* Petit détail vivant : la pastille de l'emblème prend la couleur de la saison (saisons.js pose data-saison) */
:root[data-saison=automne] .qdn { --qdn-saison: #d0892f; }
:root[data-saison=hiver] .qdn { --qdn-saison: #8db4dc; }
:root[data-saison=printemps] .qdn { --qdn-saison: #e59bb2; }
:root[data-saison=ete] .qdn { --qdn-saison: #e6b53c; }

.qdn-fermer {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center; border-radius: 999px; background: transparent; color: var(--muted);
}
.qdn-fermer svg { width: 30px; height: 30px; padding: 7px; border-radius: 999px; background: var(--inset); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.qdn-fermer:hover svg { color: var(--ink); }

.qdn-tete { padding: 44px 40px 6px; text-align: center; }
.qdn-embleme {
  position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 19px;
  background: linear-gradient(155deg, #7f978a 0%, #557161 55%, #43604f 100%);
  box-shadow: 0 10px 24px rgb(72 99 84 / 28%), inset 0 1px 0 rgb(255 255 255 / 25%);
}
.qdn-embleme::after {
  content: ''; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 999px;
  background: var(--qdn-saison); box-shadow: 0 0 0 3px var(--surface); opacity: 1;
}
:root:not([data-saison]) .qdn-embleme::after { display: none; }
.qdn-embleme-glyphe { width: 34px; height: 34px; fill: #fff; stroke: none; }
.qdn-h { margin: 18px 0 6px; font-size: 30px; line-height: 1.1; font-weight: 750; letter-spacing: -.9px; outline: none; }
.qdn-sous { margin: 0; color: var(--muted); font-size: 15px; }

.qdn-defile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 40px 8px; }
.qdn-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.qdn-ligne { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.qdn-tuile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--soft); color: var(--accent); }
.qdn-glyphe { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qdn-corps { min-width: 0; padding-top: 1px; }
.qdn-titre { margin: 0; font-size: 16.5px; line-height: 1.3; font-weight: 650; letter-spacing: -.2px; }
.qdn-texte { margin: 3px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.qdn-nouveau { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 1px 7px; border-radius: 6px; background: var(--soft); color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: 0; }
.qdn-image { display: block; width: 100%; max-height: 180px; object-fit: cover; margin-top: 10px; border-radius: 14px; border: 1px solid var(--line); }
.qdn-voir { min-height: 44px; margin: 0 0 -10px -2px; padding: 0 2px; background: transparent; color: var(--accent); font-size: 15px; font-weight: 600; border-radius: 8px; }
.qdn-voir:hover { text-decoration: underline; text-underline-offset: 3px; }
.qdn .qdn-autres { display: block; width: 100%; margin-top: 18px; min-height: 44px; background: var(--inset); color: var(--ink); font-size: 15px; font-weight: 600; border-radius: 12px; }
.qdn-jour { margin: 26px 0 14px; font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.qdn-jour:first-child { margin-top: 4px; }
.qdn-vide { margin: 12px 0 8px; text-align: center; color: var(--muted); font-size: 15px; }

.qdn-pied {
  position: relative; padding: 18px 40px calc(28px + env(safe-area-inset-bottom)); background: var(--surface);
}
.qdn-pied::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
.qdn .qdn-compris { display: block; width: 100%; min-height: 52px; border-radius: 15px; background: var(--button); color: #fff; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.qdn .qdn-compris:hover { filter: brightness(1.06); }

/* Le seul moment animé : l'emblème scintille, les lignes arrivent l'une après l'autre (une fois, à l'ouverture) */
.qdn-anime[open] { animation: qdn-entree var(--duree-longue) var(--courbe); }
.qdn-anime .qdn-embleme { animation: qdn-embleme var(--duree-longue) var(--ressort) 80ms both; }
.qdn-anime .qdn-embleme::after { animation: qdn-pastille var(--duree-longue) var(--ressort) 520ms both; }
.qdn-anime.qdn-auto .qdn-ligne { animation: qdn-ligne var(--duree-longue) var(--courbe) both; animation-delay: calc(220ms + var(--i, 0) * 70ms); }
@keyframes qdn-entree { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes qdn-embleme { 0% { opacity: 0; transform: scale(.55) rotate(-14deg); } 70% { opacity: 1; transform: scale(1.06) rotate(2deg); } 100% { transform: none; } }
@keyframes qdn-pastille { from { transform: scale(0); } to { transform: none; } }
@keyframes qdn-ligne { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .qdn[open], .qdn .qdn-embleme, .qdn .qdn-embleme::after, .qdn .qdn-ligne { animation: none !important; }
}

/* Téléphone : feuille posée en bas, poignée, plein largeur */
@media (max-width: 600px) {
  .qdn { width: 100%; max-width: none; margin: auto 0 0; max-height: 92dvh; border-radius: 28px 28px 0 0; border-bottom: 0; }
  .qdn::before { content: ''; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line); }
  .qdn-tete { padding: 38px 24px 4px; }
  .qdn-h { font-size: 28px; }
  .qdn-defile { padding: 20px 24px 8px; }
  .qdn-pied { padding: 16px 24px calc(20px + env(safe-area-inset-bottom)); }
  .qdn-anime[open] { animation-name: qdn-entree-bas; }
  @keyframes qdn-entree-bas { from { transform: translateY(100%); } to { transform: none; } }
}

/* Entrée « Quoi de neuf » du menu du profil et bouton de Mes RDV : point sauge quand il y a du nouveau */
.profile-nouveautes { position: relative; }
.profile-nouveautes .qdn-point { margin-left: auto; }
.qdn-point { display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--sauge, #6B8176); flex: none; }
.mr-nouveautes { position: relative; }
.mr-nouveautes .qdn-glyphe { width: 22px; height: 22px; }
.mr-nouveautes .qdn-point { position: absolute; top: 9px; right: 9px; box-shadow: 0 0 0 2px var(--surface); }
