/* ============================================================
   assets/css/app.css — Styles PWA joueur corpoKOMPET
   ============================================================ */

/* Variables couleurs (surchargées dynamiquement par event) */
:root {
  --color-primary: #0085c7;
  --color-secondary: #f4c300;
  --color-red: #df0024;
  --color-green: #009f3d;
  --color-dark: #0d1117;
  --color-bg: #f4f6f9;
  --color-white: #ffffff;
  --color-border: #e8e5df;
  --color-text: #1a1a1a;
  --color-text-muted: #999999;
  --color-orga: #a78bfa;
  /* Fond des bandeaux : la couleur d'événement par défaut, surchargeable
     en JS si une couleur trop claire nuit à la lisibilité du texte blanc. */
  --color-header: #0d1117;
  --color-header-text: #ffffff;
  --color-header-text-soft: rgba(255, 255, 255, 0.45);
  --color-header-overlay: rgba(255, 255, 255, 0.15);

  --color-nav-bg: #ffffff;
  --color-nav-border: #e8e5df;
  --color-nav-icon: #999999;
  --color-nav-icon-active: #0085c7;
  --color-nav-pill: transparent;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --nav-height: 64px;
  --header-height: 56px;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "DM Sans", sans-serif;
  background: var(--color-dark);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* ---- Splash screen ---- */
#splash-screen {
  background: var(--color-dark);
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(0, 133, 199, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 85% 70%,
      rgba(244, 195, 0, 0.1) 0%,
      transparent 50%
    );
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-rings {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ring {
  border-radius: 50%;
  border: 3px solid;
  display: inline-block;
  width: 20px;
  height: 20px;
}

.r1 {
  border-color: #0085c7;
}
.r2 {
  border-color: #f4c300;
  margin-top: 8px;
}
.r3 {
  border-color: #009f3d;
}
.r4 {
  border-color: #df0024;
  margin-top: 8px;
}
.r5 {
  border-color: #ffffff;
}

.splash-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 32px;
  letter-spacing: 0.06em;
  color: #fff;
}

.splash-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
}

/* ---- App container ---- */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  background-image:
    radial-gradient(
      circle at 15% 15%,
      color-mix(in srgb, var(--color-primary) 8%, transparent) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 90% 80%,
      color-mix(in srgb, var(--color-primary) 5%, transparent) 0%,
      transparent 50%
    );
  background-attachment: fixed;
}

#screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ---- Navigation principale ---- */
.main-nav {
  display: flex;
  background: var(--color-nav-bg);
  border-top: 2px solid var(--color-nav-border);
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom);
  flex-shrink: 0;
}

.main-nav.hidden {
  display: none !important;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-nav-icon);
  font-family: "DM Sans", sans-serif;
  transition: color 0.2s;
}

.nav-btn span {
  font-size: 10px;
  font-weight: 500;
}

.nav-btn.active {
  color: var(--color-nav-icon-active);
  font-weight: 600;
  background: var(--color-nav-pill);
  border-radius: 16px;
  margin: 2px 4px;
}

/* ---- Header réutilisable ---- */
.screen-header {
  background: var(--color-header);
  padding: 12px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--color-header-text);
}

.header-sub {
  font-size: 10px;
  color: var(--color-header-text-soft);
  margin-top: 2px;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  background: #1a2236;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  padding: 4px 8px 0;
  gap: 4px;
}

.tab {
  flex: 1;
  padding: 10px 0;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: none;
  transition:
    color 0.2s,
    background 0.2s;
  border-radius: 8px 8px 0 0;
}

.tab:hover {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
}

.tab.active {
  color: #fff;
  border-bottom: 2px solid var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px 8px 0 0;
}

/* ---- Cards réutilisables ---- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.card-body {
  padding: 12px 14px;
}

/* ---- Boutons ---- */
.btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:active {
  opacity: 0.85;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-dark {
  background: var(--color-dark);
  color: #fff;
}

.btn-secondary {
  background: color-mix(in srgb, var(--color-secondary) 15%, transparent);
  color: var(--color-secondary);
  border: 1px solid color-mix(in srgb, var(--color-secondary) 30%, transparent);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 500;
}

/* ---- Badges live ---- */
.badge-live {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(223, 0, 36, 0.15);
  border: 1px solid rgba(223, 0, 36, 0.3);
  border-radius: 20px;
  padding: 4px 9px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.badge-live-text {
  font-size: 10px;
  color: var(--color-red);
  font-weight: 500;
}

/* ---- Section label ---- */
.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 12px 16px 6px;
}

/* ---- Utilitaires ---- */
.hidden {
  display: none !important;
}
.text-center {
  text-align: center;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.p-12 {
  padding: 12px;
}
.p-16 {
  padding: 16px;
}

/* ---- Navigation principale ---- */
.main-nav {
  display: flex !important;
  background: var(--color-nav-bg);
  border-top: 2px solid var(--color-nav-border);
  padding: 8px 0 10px;
  flex-shrink: 0;
}

/* ---- Choix équipe ---- */
.equipe-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  cursor: pointer;
}

.equipe-card.selected {
  border: 2px solid var(--color-primary);
  background: #f0f8ff;
}

.equipe-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.equipe-nom {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.equipe-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  margin-left: auto;
  flex-shrink: 0;
}

.equipe-card.selected .equipe-check {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* ---- Clavier PIN ---- */
.pin-zone {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.pin-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.pin-dots {
  display: flex;
  gap: 10px;
}

.pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--color-primary);
}

.pin-dot.filled {
  background: var(--color-primary);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.pin-key {
  background: #f7f5f0;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  padding: 10px 0;
  font-size: 17px;
  font-family: "DM Sans", sans-serif;
  color: var(--color-text);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}

.pin-key:active {
  background: #e8e5df;
}

.pin-key[data-key="Eff"] {
  font-size: 11px;
  color: var(--color-primary);
  font-weight: 500;
}

.pin-key[data-key="OK"] {
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-color: var(--color-primary);
}

/* ---- Classement ---- */
.classement-liste {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rank-row {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rank-row.first {
  border-color: var(--color-secondary);
  background: color-mix(in srgb, var(--color-secondary) 8%, #fff);
}

.rank-row.my-team {
  border: 2px solid var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 6%, #fff);
}

.rank-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px;
  color: #ccc;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.rank-row.first .rank-num {
  color: color-mix(in srgb, var(--color-secondary) 80%, #000);
}
.rank-row.my-team .rank-num {
  color: var(--color-primary);
}

.rank-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.rank-info {
  flex: 1;
}

.rank-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
}

.my-tag {
  font-size: 9px;
  background: var(--color-secondary);
  color: #1a1a1a;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
}

.rank-score {
  text-align: right;
}

.rank-pts {
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
  color: var(--color-secondary);
  line-height: 1;
}

.rank-row.first .rank-pts {
  color: color-mix(in srgb, var(--color-secondary) 80%, #000);
}
.rank-row.my-team .rank-pts {
  color: var(--color-secondary);
}

.rank-pts-label {
  font-size: 9px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ---- États vides & chargement ---- */
.loading {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 20px;
}

.empty-state {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 20px;
  font-style: italic;
}

/* ---- Sous-onglets Programme / Transferts ---- */
.sub-tabs {
  display: flex;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.sub-tab {
  flex: 1;
  border: none;
  border-radius: 8px;
  padding: 7px 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  cursor: pointer;
  transition: all 0.2s;
}

.sub-tab.active {
  background: var(--color-primary);
  color: #fff;
}

/* ---- Timeline programme ---- */
.tl-row {
  display: flex;
  gap: 10px;
}

.tl-time-col {
  width: 42px;
  flex-shrink: 0;
  text-align: right;
  padding-top: 2px;
}

.tl-time {
  font-family: "Bebas Neue", sans-serif;
  font-size: 13px;
  color: var(--color-primary);
  line-height: 1;
}

.tl-time-end {
  font-size: 9px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.tl-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 16px;
  flex-shrink: 0;
}

.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.tl-line {
  width: 1.5px;
  flex: 1;
  background: var(--color-border);
  min-height: 10px;
}

.tl-content {
  flex: 1;
  padding-bottom: 10px;
}

.creneau-titre {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
}

.creneau-lieu {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.creneau-desc {
  font-size: 11px;
  color: #555;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- Notifications ---- */
.notif-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 7px;
}

.notif-item.notif-info {
  border-left: 3px solid #0085c7;
}
.notif-item.notif-alerte {
  border-left: 3px solid #f4c300;
}
.notif-item.notif-urgence {
  border-left: 3px solid #df0024;
}

.notif-msg {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
}

.notif-time {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 3px;
}

.notif-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

.notif-toast.notif-toast-alerte {
  border-bottom-color: var(--color-secondary);
}

.notif-toast.notif-toast-urgence {
  border-bottom-color: var(--color-red);
}

.notif-toast-content {
  flex: 1;
  font-size: 13px;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#notif-toast-voir {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

#notif-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.notif-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

.notif-toast.notif-toast-info {
  border-bottom-color: var(--color-primary);
}

.notif-toast.notif-toast-alerte {
  border-bottom-color: var(--color-secondary);
  background: #1a1500;
}

.notif-toast.notif-toast-urgence {
  border-bottom-color: var(--color-red);
  background: #1a0005;
}

#notif-toast-content {
  flex: 1;
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#notif-toast-voir {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.notif-toast.notif-toast-alerte #notif-toast-voir {
  background: var(--color-secondary);
  color: #1a1a1a;
}

.notif-toast.notif-toast-urgence #notif-toast-voir {
  background: var(--color-red);
}

#notif-toast-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
  line-height: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---- Event card (liste événements) ---- */
.event-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.event-card:hover {
  border-color: var(--color-primary);
}

.event-hero {
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.hero-sub {
  font-size: 12px;
  color: rgba(1, 1, 1, 0.5);
}

.event-card-name {
  font-family: "Bebas Neue", sans-serif;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: transparent;
}

/* ---- Fil de news ---- */
.compose-zone {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 12px;
}

.compose-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compose-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.compose-input {
  flex: 1;
  background: #f7f5f0;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
  color: var(--color-text);
  outline: none;
}

.compose-input:focus {
  border-color: var(--color-primary);
}

.compose-photo-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0ede8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #888;
  flex-shrink: 0;
}

.compose-send-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  flex-shrink: 0;
}

.compose-send-btn:disabled {
  background: #ccc;
}

.feed-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
}

.post-header {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.post-author {
  flex: 1;
}

.post-author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.post-spot {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.post-time {
  font-size: 10px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.orga-tag {
  font-size: 9px;
  background: #f5f0ff;
  color: #6d3fc7;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
}

.post-photo {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
  background: #f0ede8;
}

.post-content {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
}

.post-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-like-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 3px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.post-like-btn:hover {
  background: #f0ede8;
}

.post-like-count {
  font-size: 12px;
}

/* ---- Grille photos posts ---- */
.post-photos {
  display: grid;
  gap: 2px;
  max-height: 300px;
  overflow: hidden;
}

.post-photos a {
  display: block;
  overflow: hidden;
}

.post-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.post-photos a:hover img {
  transform: scale(1.02);
}

.post-photos-1 {
  grid-template-columns: 1fr;
  max-height: 280px;
}
.post-photos-1 img {
  max-height: 280px;
  object-fit: contain;
  background: #f0ede8;
}

.post-photos-2 {
  grid-template-columns: 1fr 1fr;
  height: 180px;
}

.post-photos-3 {
  grid-template-columns: 2fr 1fr;
  height: 200px;
}
.post-photos-3 .photo-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.post-photos-3 .photo-col a {
  flex: 1;
}

.post-photos-4 {
  grid-template-columns: 1fr 1fr;
  height: 200px;
  grid-template-rows: 1fr 1fr;
}

.app-header {
  background: var(--color-header);
  border-bottom: 1px solid var(--color-header-overlay);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top);
  background-clip: padding-box;
}

.notif-bell {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-header-text-soft);
}

.notif-bell:hover {
  background: var(--color-header-overlay);
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #df0024;
  color: #fff;
  border-radius: 10px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 500;
  min-width: 16px;
  text-align: center;
}

/* Bouton de fermeture GLightbox : décalé de la zone sécurisée iOS
   (encoche/Dynamic Island), sinon partiellement caché sous la barre
   système en PWA installée, et donc difficile à toucher. Zone
   cliquable élargie au passage pour un doigt plus confortable. */
.glightbox-clean .gclose {
  top: calc(15px + env(safe-area-inset-top)) !important;
  right: calc(10px + env(safe-area-inset-right)) !important;
  width: 44px;
  height: 44px;
}
