/* ==========================================================================
   Notifications push (lot 4) : page « Mes notifications », carte de l'accueil
   (message du responsable, invitation à activer), message à l'équipe (page
   Équipe), Réglages → Notifications, interrupteur d'un événement.
   Reprend les cartes, boutons, alertes, pastilles et interrupteurs de app.css.
   ========================================================================== */

/* ---------- Page « Mes notifications » ---------- */
/* Téléphone : état, guide, mes choix ; une fois activé, le guide (qui a fini de servir) passe en dernier.
   Ordinateur : état et guide à gauche, mes choix et mes appareils à droite. */
.notifs-grille { display: grid; grid-template-columns: minmax(0, 1fr); }
.notifs-grille > .notifs-etat { order: 1; }
.notifs-grille > .notifs-guide { order: 2; }
.notifs-grille > .notifs-cote { order: 3; }
body[data-etat-notifs="activees"] .notifs-grille > .notifs-guide { order: 4; }
@media (min-width: 900px) {
  .notifs-grille {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "etat cote" "guide cote"; gap: 0 24px; align-items: start;
  }
  .notifs-grille > .notifs-etat { grid-area: etat; }
  .notifs-grille > .notifs-guide { grid-area: guide; }
  .notifs-grille > .notifs-cote { grid-area: cote; }
}
.notifs-phrase { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 1.25rem; font-weight: 700; line-height: 1.25; margin: 0 0 12px; }
.notifs-phrase .pastille { flex: none; }
.notifs-etat .alerte { margin: 0 0 14px; }
.notifs-etat .groupe-boutons > p { margin: 0; }
.notifs-etat .btn-geant { font-size: clamp(1.25rem, 5.4vw, 1.6rem); padding: 8px 14px; }
.notifs-etat .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
/* (revue) Très petit téléphone : « cd /home/jelastic/ROOT » passe à la ligne au lieu de sortir de la carte. */
@media (max-width: 360px) { .notifs-etat .code { white-space: normal; overflow-wrap: anywhere; } }

/* Étapes numérotées : un gros numéro rond, une action par ligne. */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; display: grid; gap: 12px; }
.etapes > li {
  counter-increment: etape; position: relative; min-height: 44px; padding: 8px 0 0 58px; font-size: 1.08rem; line-height: 1.35;
}
.etapes > li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--jaune); color: var(--noir); font-family: var(--police-titre); font-weight: 800; font-size: 1.5rem; line-height: 1;
}
.etapes-serrees { gap: 8px; margin-bottom: 14px; }
.etapes-serrees > li { font-size: 1rem; }
.icone-partager { display: inline-block; width: 26px; height: 26px; vertical-align: -6px; margin: 0 2px; }
.notifs-guide .segments { display: flex; margin: 0 0 16px; }
.notifs-guide .segments button { flex: 1; padding: 0 8px; }
/* Le lien « Voir comment faire » amène le guide sous l'en-tête, pas dessous. */
.notifs-guide { scroll-margin-top: 12px; }

/* Interrupteurs : le titre, et dessous une ligne d'explication. */
.notifs-choix-ligne { align-items: flex-start; margin: 0; padding: 10px 0; min-height: var(--bouton); }
.notifs-choix-ligne + .notifs-choix-ligne { border-top: 1px solid var(--bordure); }
.notifs-choix-ligne input { margin: 2px 0 0; }
.notifs-choix-titre { display: block; font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.notifs-choix-aide { display: block; font-weight: 400; font-size: .98rem; line-height: 1.3; margin-top: 2px; }
.notifs-sms { margin-top: 10px; padding-top: 4px; border-top: 3px solid var(--surface-2); }
.notifs-appareils .ligne { background: var(--surface-2); box-shadow: none; flex-wrap: wrap; }
.notifs-appareils .ligne-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.notifs-vide { margin: 0; }

/* ---------- Accueil : message du responsable, invitation à activer ---------- */
.message-equipe {
  position: relative; background: var(--surface); border-radius: var(--rayon-grand); box-shadow: var(--ombre);
  border-left: 8px solid var(--jaune); padding: 14px 18px 16px; margin-bottom: 16px;
}
.message-equipe-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 4px; }
.message-equipe-titre {
  font-family: var(--police-titre); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 1.05rem; color: var(--vert-fonce);
}
.message-equipe-quand { color: var(--texte-doux); font-size: 1rem; }
.message-equipe-texte { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Plus de 3 messages en 24 h : les plus anciens restent là, repliés (l'accueil garde ses gros boutons en vue). */
.messages-anciens { margin-bottom: 16px; }
.messages-anciens > summary {
  min-height: var(--bouton); display: flex; align-items: center; padding: 0 6px; font-weight: 700; cursor: pointer; color: var(--vert-fonce);
}
.messages-anciens[open] > summary { margin-bottom: 8px; }
.messages-anciens > .message-equipe:last-child { margin-bottom: 0; }
.inviter-notifs {
  display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 16px; margin-bottom: 16px;
  background: var(--surface); color: var(--noir); border-radius: var(--rayon-grand); box-shadow: var(--ombre); text-decoration: none;
  border: 2px dashed var(--bordure);
  transition: transform var(--rapide) ease-out;
}
.inviter-notifs:active { transform: scale(.985); }
.inviter-notifs > svg { width: 30px; height: 30px; flex: none; }
.inviter-notifs > span { flex: 1; min-width: 0; }
.inviter-notifs strong { display: block; font-family: var(--police-titre); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; line-height: 1.1; }
.inviter-notifs-texte { display: block; font-size: 1rem; color: var(--texte-doux); }

/* ---------- Page Équipe : message à l'équipe ---------- */
.equipe-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.message-compteur { display: block; text-align: right; font-size: .95rem; color: var(--texte-doux); margin-top: 4px; font-variant-numeric: tabular-nums; }
.message-compteur.erreur { color: var(--rouge); font-weight: 700; }
.message-apercu { background: var(--surface-2); border-radius: var(--rayon); padding: 12px 14px; margin: 0 0 16px; }
.message-apercu p { margin: 0; }
.message-apercu p + p { margin-top: 6px; }
.message-apercu .bulle-sms { margin: 8px 0 4px; }
.message-apercu .erreur { color: var(--rouge); font-weight: 600; }
.messages-envoyes { margin: 0 0 20px; }
.messages-envoyes h2 { font-size: 1.3rem; margin-bottom: 8px; }
.messages-envoyes .ligne { flex-wrap: wrap; }
.messages-envoyes .ligne-titre { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }

/* ---------- Réglages → Notifications ---------- */
.notifs-reglages .carte > h3 { margin-top: 18px; text-transform: uppercase; }
.notifs-reglages .carte .ligne { background: var(--surface-2); box-shadow: none; }
.notifs-reglages .alerte { margin: 12px 0; }
.notifs-reglages .carte > .muet:last-child { margin-bottom: 0; }
.notifs-controle { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.notifs-controle li { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.notifs-controle .pastille { flex: none; }
.notifs-delais-titre { font-weight: 700; margin: 14px 0 0; }
.notifs-delais { display: grid; gap: 10px; margin: 10px 0 14px; }
.notifs-delai { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }
.notifs-delai > span:first-child { min-width: 5.6em; }
.notifs-delai input { width: 96px; flex: none; font-size: 1.3rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.notifs-delai .muet { font-weight: 400; }

/* ---------- Réglages → un événement ---------- */
.notifs-evenement { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bordure); }
.notifs-evenement .interrupteur { margin-top: 0; }
.notifs-evenement p { margin: 0; }
