/* ═══════════════════════════════════════════════════════════════
   HAYATI — Thème visuel
   Palette : lys (vieux rose, ivoire, brun tabac, vert sauge)
   Photo de fond : lys (blurée, watery)
   Typographie : SF Pro Display / system-ui
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   0. VARIABLES PRINCIPALES — override complet de DURUS
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Palette HAYATI — extraite de la photo de lys */
  --hy-ivory:        #f5f0e8;      /* fond ivoire chaud */
  --hy-cream:        #ede7d9;      /* crème légèrement plus foncé */
  --hy-petal:        #c9a0a8;      /* vieux rose pétale */
  --hy-petal-deep:   #a67880;      /* rose profond / bordeaux doux */
  --hy-petal-soft:   #e8d0d4;      /* rose pâle */
  --hy-brown:        #8b6b4a;      /* brun tabac sépales */
  --hy-brown-deep:   #5c4030;      /* brun profond */
  --hy-brown-light:  #c4a882;      /* brun doré clair */
  --hy-sage:         #7a9070;      /* vert sauge tige */
  --hy-sage-soft:    #c8d8c0;      /* vert sauge clair */
  --hy-white:        rgba(255,255,255,0.90);

  /* Remplace les variables DURUS */
  --bg:           var(--hy-ivory) !important;
  --surface:      rgba(255,255,255,0.78) !important;
  --surface-2:    rgba(237,231,217,0.72) !important;
  --ink:          #2c1f18 !important;
  --muted:        #7a6555 !important;
  --line:         rgba(139,107,74,0.18) !important;
  --accent:       var(--hy-petal-deep) !important;
  --accent-soft:  var(--hy-petal-soft) !important;
  --green:        var(--hy-sage) !important;
  --green-soft:   var(--hy-sage-soft) !important;
  --glass:        rgba(245,240,232,0.60) !important;
  --glass-bg:     rgba(255,255,255,0.52) !important;
  --glass-bg2:    rgba(255,255,255,0.75) !important;
  --glass-bd:     rgba(255,255,255,0.80) !important;
  --glass-hl:     rgba(255,255,255,0.70) !important;
  --shadow:       0 16px 40px -20px rgba(92,64,48,.28), 0 2px 8px -2px rgba(92,64,48,.10) !important;
  --on-accent:    #fff8f5 !important;
  --motto:        var(--hy-brown) !important;
  --bar:          transparent !important;
  --ko:           #b04a3c !important;
  --ko-soft:      rgba(176,74,60,0.12) !important;

  /* Typographie SF Pro Display */
  --f-ui:    "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
             "Helvetica Neue", Arial, sans-serif !important;
  --f-disp:  "SF Pro Display", -apple-system, BlinkMacSystemFont,
             "Helvetica Neue", serif !important;

  /* Variables HAYATI */
  --hay-bg:          var(--hy-ivory);
  --hay-surface:     rgba(255,255,255,0.80);
  --hay-surface-2:   rgba(237,231,217,0.70);
  --hay-border:      rgba(139,107,74,0.20);
  --hay-text:        #2c1f18;
  --hay-text-2:      #7a6555;
  --hay-text-3:      #b0998a;
  --hay-accent:      var(--hy-petal-deep);
  --hay-accent-soft: var(--hy-petal-soft);
  --hay-tabbar-bg:   transparent;
  --hay-tab-active:  var(--hy-petal-deep);
  --hay-tab-inactive: rgba(92,64,48,0.45);
  --hay-card-radius: 18px;
  --hay-sheet-radius: 24px;

  color-scheme: light;
}

/* ═══════════════════════════════════════════════════════════════
   1. TYPOGRAPHIE
   ═══════════════════════════════════════════════════════════════ */

body, button, input, select, textarea {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system,
               BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════
   2. FOND FLORAL — photo de lys floutée
   ═══════════════════════════════════════════════════════════════ */

/* Le fond est appliqué sur body directement pour couvrir toute la page */
body {
  background-color: var(--hy-ivory) !important;
}

/* Calque de fond floral */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;

  /* Photo de lys encodée en base64 — fallback : dégradé floral */
  background:
    /* Overlay coloré pour unifier la palette */
    linear-gradient(
      160deg,
      rgba(201,160,168,.22) 0%,
      rgba(245,240,232,.18) 35%,
      rgba(139,107,74,.14) 65%,
      rgba(201,160,168,.20) 100%
    ),
    /* Textures douces simulant l'aquarelle */
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(201,160,168,.30) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(139,107,74,.22) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 50%, rgba(122,144,112,.12) 0%, transparent 65%),
    /* Fond ivoire de base */
    linear-gradient(135deg, #f8f3eb 0%, #ede7d9 50%, #f2ece0 100%);

  pointer-events: none;
}

/* Éléments décoratifs floraux (pétales abstraits) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 40% at 15% 20%, rgba(201,160,168,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 55% at 85% 15%, rgba(166,120,128,.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 35% at 70% 80%, rgba(139,107,74,.15) 0%, transparent 60%),
    radial-gradient(ellipse 35% 45% at 30% 75%, rgba(201,160,168,.12) 0%, transparent 65%);
  pointer-events: none;
}

/* Élément hay-bg dans le HTML */
.hay-bg {
  display: none; /* le fond est géré par body::before */
}

/* Toutes les vues au-dessus du fond */
#app, .wrap, .view, [id^="v-"],
.tabbar, nav[aria-label="Navigation"] {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   3. BARRE DE NAVIGATION — glassmorphisme compact centré
   ═══════════════════════════════════════════════════════════════ */

/* Barre flottante HAYATI (selector du HTML) */
nav[aria-label="Navigation"],
.tabbar {
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  width: min(380px, calc(100% - 24px)) !important;
  height: 64px !important;
  padding: 0 6px !important;
  border-radius: 32px !important;
  border: none !important;

  /* Glassmorphisme */
  background: rgba(255,255,255,0.72) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  box-shadow:
    0 8px 32px rgba(92,64,48,.18),
    0 2px 8px rgba(92,64,48,.12),
    inset 0 1px 0 rgba(255,255,255,.90),
    inset 0 -1px 0 rgba(139,107,74,.08) !important;

  z-index: 100 !important;
}

nav[aria-label="Navigation"] .tabbar-inner,
.tabbar-inner {
  display: flex !important;
  height: 100% !important;
  align-items: center !important;
  padding: 6px !important;
  gap: 2px !important;
}

/* Onglets */
nav[aria-label="Navigation"] .tab,
.tab {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 6px 4px !important;
  border-radius: 26px !important;
  border: none !important;
  background: transparent !important;
  color: rgba(92,64,48,0.50) !important;
  font-size: 9.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  cursor: pointer !important;
  transition: color 0.2s ease, background 0.2s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

nav[aria-label="Navigation"] .tab svg,
.tab svg {
  width: 22px !important;
  height: 22px !important;
  transition: transform 0.2s cubic-bezier(.3,1.4,.5,1) !important;
}

nav[aria-label="Navigation"] .tab[aria-current="page"],
nav[aria-label="Navigation"] .tab.active,
.tab[aria-current="page"],
.tab.active {
  color: var(--hy-petal-deep) !important;
  background: rgba(201,160,168,.18) !important;
  font-weight: 700 !important;
}

nav[aria-label="Navigation"] .tab[aria-current="page"] svg,
nav[aria-label="Navigation"] .tab.active svg,
.tab[aria-current="page"] svg,
.tab.active svg {
  transform: scale(1.08) !important;
}

/* Bouton Tout — central surélevé */
nav[aria-label="Navigation"] .tab-tout,
.tab-tout,
.hay-tab-tout {
  flex: 1.2 !important;
}

nav[aria-label="Navigation"] .tab-tout svg,
.tab-tout svg {
  width: 42px !important;
  height: 42px !important;
  padding: 10px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(166,120,128,.45) !important;
  transition: transform 0.2s cubic-bezier(.3,1.4,.5,1), box-shadow 0.2s !important;
}

nav[aria-label="Navigation"] .tab-tout.active svg,
nav[aria-label="Navigation"] .tab-tout[aria-current="page"] svg,
.tab-tout.active svg,
.tab-tout[aria-current="page"] svg {
  background: linear-gradient(135deg, var(--hy-brown) 0%, var(--hy-petal-deep) 100%) !important;
  transform: scale(0.92) !important;
}

nav[aria-label="Navigation"] .tab-tout:active svg,
.tab-tout:active svg {
  transform: scale(0.88) !important;
}

/* Ajustement espace du bas pour la nav flottante */
.wrap,
.hay-views {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ═══════════════════════════════════════════════════════════════
   4. LOGO HAYATI — wordmark
   ═══════════════════════════════════════════════════════════════ */

/* Logo dans l'accueil */
.hay-logo,
.hay-wordmark {
  font-family: "SF Pro Display", -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hy-brown-deep);
  text-align: center;
  display: block;
}

/* Variante accentuée */
.hay-logo strong,
.hay-wordmark strong {
  font-weight: 600;
  color: var(--hy-petal-deep);
  letter-spacing: 0.22em;
}

/* ═══════════════════════════════════════════════════════════════
   5. SURFACES ET CARDS
   ═══════════════════════════════════════════════════════════════ */

/* Cards glassmorphisme */
.hay-card,
.card {
  background: rgba(255,255,255,0.72) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255,255,255,0.80) !important;
  border-radius: var(--hay-card-radius) !important;
  box-shadow:
    0 4px 20px rgba(92,64,48,.10),
    inset 0 1px 0 rgba(255,255,255,.90) !important;
}

/* Surfaces standards */
.btn,
button.btn {
  font-family: inherit !important;
}

/* Bouton primaire */
.btn.primary,
.btn-primary,
[class*="btn"][class*="prim"] {
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(166,120,128,.35) !important;
}

.btn.primary:active,
.btn-primary:active {
  opacity: 0.88 !important;
  transform: scale(0.98) !important;
}

/* ═══════════════════════════════════════════════════════════════
   6. SHEETS (modales bottom)
   ═══════════════════════════════════════════════════════════════ */

.sheet,
#sheet {
  background: rgba(252,249,244,0.96) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.2) !important;
  backdrop-filter: blur(24px) saturate(1.2) !important;
  border-top-left-radius: var(--hay-sheet-radius) !important;
  border-top-right-radius: var(--hay-sheet-radius) !important;
  border: 1px solid rgba(255,255,255,.80) !important;
  border-bottom: none !important;
  box-shadow: 0 -8px 40px rgba(92,64,48,.18) !important;
}

.sheet-back,
#sback {
  background: rgba(44,31,24,0.35) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  backdrop-filter: blur(4px) !important;
}

/* ═══════════════════════════════════════════════════════════════
   7. PAGE D'ACCUEIL
   ═══════════════════════════════════════════════════════════════ */

/* Entête Accueil */
.hay-accueil-header {
  padding: 24px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hay-greeting {
  font-size: 22px;
  font-weight: 600;
  color: var(--hy-brown-deep);
  letter-spacing: -0.01em;
}

.hay-subgreeting {
  font-size: 14px;
  color: var(--hy-brown);
  font-weight: 400;
}

/* Widgets accueil */
.hay-widget {
  margin: 0 16px 12px;
  padding: 16px;
  background: rgba(255,255,255,0.68) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 2px 12px rgba(92,64,48,.08), inset 0 1px 0 rgba(255,255,255,.90);
}

.hay-widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hy-brown);
  margin-bottom: 10px;
}

/* Streak */
.hay-streak-count {
  font-size: 36px;
  font-weight: 700;
  color: var(--hy-petal-deep);
  line-height: 1;
}

.hay-streak-label {
  font-size: 13px;
  color: var(--hy-brown);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   8. GRILLE TOUT
   ═══════════════════════════════════════════════════════════════ */

.hay-tout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 20px 16px;
}

.hay-tout-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 4px 16px rgba(92,64,48,.10), inset 0 1px 0 rgba(255,255,255,.90);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.hay-tout-cell:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(92,64,48,.12);
}

.hay-tout-cell-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

/* Couleurs par catégorie */
.hay-tout-cell[data-cat="madrassa"] .hay-tout-cell-icon {
  background: linear-gradient(135deg, rgba(122,144,112,.25) 0%, rgba(122,144,112,.12) 100%);
}
.hay-tout-cell[data-cat="maktaba"] .hay-tout-cell-icon {
  background: linear-gradient(135deg, rgba(139,107,74,.22) 0%, rgba(139,107,74,.10) 100%);
}
.hay-tout-cell[data-cat="biblio"] .hay-tout-cell-icon {
  background: linear-gradient(135deg, rgba(166,120,128,.22) 0%, rgba(166,120,128,.10) 100%);
}
.hay-tout-cell[data-cat="sudoku"] .hay-tout-cell-icon {
  background: linear-gradient(135deg, rgba(92,64,48,.18) 0%, rgba(92,64,48,.08) 100%);
}
.hay-tout-cell[data-cat="relaxation"] .hay-tout-cell-icon {
  background: linear-gradient(135deg, rgba(201,160,168,.30) 0%, rgba(201,160,168,.14) 100%);
}
.hay-tout-cell[data-cat="sudur"] .hay-tout-cell-icon {
  background: linear-gradient(135deg, rgba(166,120,128,.26) 0%, rgba(201,160,168,.14) 100%);
}

.hay-tout-cell-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hy-brown-deep);
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   9. HEADER DES VUES
   ═══════════════════════════════════════════════════════════════ */

.hay-view-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 20px 12px;
  background: rgba(245,240,232,0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(139,107,74,.12);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hay-view-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.02em;
  flex: 1;
}

.hay-view-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 2px 8px rgba(92,64,48,.10);
  color: var(--hy-brown-deep);
  cursor: pointer;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   10. PLANNER — onglets internes
   ═══════════════════════════════════════════════════════════════ */

.hay-planner-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hay-planner-tabs::-webkit-scrollbar { display: none; }

.hay-planner-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hy-brown);
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(255,255,255,.70);
  cursor: pointer;
  transition: all 0.18s ease;
}

.hay-planner-tab.active {
  background: rgba(166,120,128,0.20);
  color: var(--hy-petal-deep);
  border-color: rgba(166,120,128,.35);
}

/* ═══════════════════════════════════════════════════════════════
   11. BOOK TRACK
   ═══════════════════════════════════════════════════════════════ */

.hay-book-cover {
  border-radius: 10px;
  box-shadow: 3px 4px 16px rgba(92,64,48,.22);
}

/* ═══════════════════════════════════════════════════════════════
   12. SUDOKU
   ═══════════════════════════════════════════════════════════════ */

.hay-sudoku-grid {
  background: rgba(255,255,255,0.80);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(92,64,48,.14), inset 0 1px 0 rgba(255,255,255,.90);
  border: 1px solid rgba(255,255,255,.80);
}

.hay-sudoku-cell.selected {
  background: rgba(201,160,168,0.28) !important;
}

.hay-sudoku-cell.given {
  color: var(--hy-brown-deep) !important;
  font-weight: 700 !important;
}

.hay-sudoku-cell.error {
  color: #b04a3c !important;
  background: rgba(176,74,60,0.10) !important;
}

/* ═══════════════════════════════════════════════════════════════
   13. RELAXATION
   ═══════════════════════════════════════════════════════════════ */

.hay-breath-bubble {
  background: radial-gradient(circle at 35% 30%,
    rgba(201,160,168,.55) 0%,
    rgba(166,120,128,.40) 40%,
    rgba(139,107,74,.30) 80%,
    rgba(92,64,48,.20) 100%) !important;
  box-shadow:
    0 0 60px rgba(201,160,168,.30),
    0 0 120px rgba(166,120,128,.15),
    inset 0 0 40px rgba(255,255,255,.25) !important;
}

/* ═══════════════════════════════════════════════════════════════
   14. SUDÛR — calendrier menstruel
   ═══════════════════════════════════════════════════════════════ */

.cym-period {
  background: rgba(166,120,128,.35) !important;
  color: var(--hy-petal-deep) !important;
}

.cym-predicted {
  background: rgba(201,160,168,.20) !important;
  color: var(--hy-petal-deep) !important;
  border: 1.5px dashed rgba(166,120,128,.45) !important;
}

.cym-ovulation {
  background: rgba(122,144,112,.22) !important;
  color: var(--hy-sage) !important;
}

/* ═══════════════════════════════════════════════════════════════
   15. PROGRESS BARS
   ═══════════════════════════════════════════════════════════════ */

.hay-progress-bar {
  background: rgba(139,107,74,0.14) !important;
  border-radius: 999px;
  overflow: hidden;
}

.hay-progress-fill {
  background: linear-gradient(90deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%) !important;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

/* ═══════════════════════════════════════════════════════════════
   16. TOAST / NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */

.hay-toast {
  background: rgba(44,31,24,0.92) !important;
  color: #fff !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(44,31,24,.30) !important;
}

/* ═══════════════════════════════════════════════════════════════
   17. MADRASSA
   ═══════════════════════════════════════════════════════════════ */

.hay-madrassa-section {
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 2px 10px rgba(92,64,48,.08);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.hay-madrassa-section:active {
  transform: scale(0.98);
}

.hay-madrassa-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   18. INDICATEUR ACTIF TABBAR (DURUS fx mode override)
   ═══════════════════════════════════════════════════════════════ */

/* Override de l'indicateur glissant DURUS pour HAYATI */
.tab-ind {
  background: rgba(201,160,168,.22) !important;
  box-shadow:
    inset 0 0 0 1px rgba(166,120,128,.25),
    0 2px 8px rgba(166,120,128,.15) !important;
}

/* ═══════════════════════════════════════════════════════════════
   19. ÉTATS VIDES
   ═══════════════════════════════════════════════════════════════ */

.hay-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--hy-brown);
}

.hay-empty-icon {
  font-size: 44px;
  opacity: 0.65;
}

.hay-empty-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--hy-brown);
  line-height: 1.4;
}

.hay-empty-sub {
  font-size: 13px;
  color: var(--hy-brown-light);
}

/* ═══════════════════════════════════════════════════════════════
   20. FOCUS TIMER (Planner)
   ═══════════════════════════════════════════════════════════════ */

.hay-timer-ring circle[stroke="var(--hay-accent)"],
.hay-timer-ring circle {
  stroke: var(--hy-petal-deep) !important;
}

.hay-timer-time {
  color: var(--hy-brown-deep) !important;
}

/* ═══════════════════════════════════════════════════════════════
   21. ANIMATIONS DOUCES
   ═══════════════════════════════════════════════════════════════ */

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

@keyframes hayPop {
  0%   { transform: scale(0.94); opacity: 0; }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

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

.hay-anim-in {
  animation: hayFadeIn 0.28s ease both;
}

.hay-anim-pop {
  animation: hayPop 0.32s cubic-bezier(.3,1.4,.5,1) both;
}

/* ═══════════════════════════════════════════════════════════════
   22. CORRECTIONS GLOBALES DURUS
   ═══════════════════════════════════════════════════════════════ */

/* Boutons DURUS standard */
.btn {
  border-radius: 14px !important;
  font-weight: 500 !important;
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.btn:active {
  transform: scale(0.97) !important;
}

/* Boutons accentués */
.btn.acc,
.btn-acc,
[class*="accent"] .btn,
.btn[style*="background:var(--accent)"] {
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(166,120,128,.30) !important;
}

/* Inputs */
input, textarea, select {
  border-radius: 12px !important;
  border-color: rgba(139,107,74,.20) !important;
  background: rgba(255,255,255,0.72) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}

input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: rgba(166,120,128,.50) !important;
  box-shadow: 0 0 0 3px rgba(201,160,168,.20) !important;
}

/* ═══════════════════════════════════════════════════════════════
   23. ACCESSIBILITÉ & MOUVEMENT RÉDUIT
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   24. DESKTOP
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
  nav[aria-label="Navigation"],
  .tabbar {
    width: min(440px, calc(100% - 48px)) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   25. SECTION MADRASSA — couleurs des sous-modules
   ═══════════════════════════════════════════════════════════════ */

.hay-madrassa-section[data-module="cours"] .hay-madrassa-section-icon {
  background: linear-gradient(135deg, rgba(122,144,112,.25) 0%, rgba(122,144,112,.12) 100%);
}
.hay-madrassa-section[data-module="revision"] .hay-madrassa-section-icon {
  background: linear-gradient(135deg, rgba(139,107,74,.22) 0%, rgba(139,107,74,.10) 100%);
}
.hay-madrassa-section[data-module="arabe"] .hay-madrassa-section-icon {
  background: linear-gradient(135deg, rgba(166,120,128,.22) 0%, rgba(166,120,128,.10) 100%);
}
.hay-madrassa-section[data-module="cycle"] .hay-madrassa-section-icon {
  background: linear-gradient(135deg, rgba(92,64,48,.18) 0%, rgba(92,64,48,.08) 100%);
}

/* ═══════════════════════════════════════════════════════════════
   26. SCROLL STYLING
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(139,107,74,.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139,107,74,.40);
}

/* ═══════════════════════════════════════════════════════════════
   27. COMPOSANTS MODULES JS — classes réelles
   ═══════════════════════════════════════════════════════════════ */

/* --- Boutons standardisés --- */
.hay-btn-primary {
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(166,120,128,.32);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.hay-btn-primary:active { transform: scale(0.97); opacity: 0.9; }

.hay-btn-secondary {
  background: rgba(255,255,255,0.68);
  color: var(--hy-brown-deep);
  border: 1px solid rgba(139,107,74,.22);
  border-radius: 14px;
  padding: 11px 20px;
  font-weight: 500;
  font-size: 15px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease;
}
.hay-btn-secondary:active { transform: scale(0.97); }

.hay-btn-danger {
  background: rgba(176,74,60,.12);
  color: #b04a3c;
  border: 1px solid rgba(176,74,60,.22);
  border-radius: 14px;
  padding: 11px 20px;
  font-weight: 500;
  font-size: 15px;
  transition: transform 0.15s ease;
}
.hay-btn-danger:active { transform: scale(0.97); }

.hay-btn-full { width: 100%; display: block; text-align: center; }

.hay-btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
}

/* --- FAB (bouton flottant) --- */
.hay-fab {
  position: fixed;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(166,120,128,.40);
  cursor: pointer;
  z-index: 50;
  transition: transform 0.2s cubic-bezier(.3,1.4,.5,1), box-shadow 0.2s;
}
.hay-fab:active { transform: scale(0.92); }
.hay-fab svg { width: 24px; height: 24px; }

/* --- Icon buttons --- */
.hay-icon-btn, .hay-back-btn, .hay-edit-btn, .hay-badge-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 2px 8px rgba(92,64,48,.10);
  color: var(--hy-brown-deep);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-icon-btn:active, .hay-back-btn:active,
.hay-edit-btn:active, .hay-badge-btn:active { transform: scale(0.92); }
.hay-icon-btn svg, .hay-back-btn svg,
.hay-edit-btn svg, .hay-badge-btn svg { width: 18px; height: 18px; }

/* --- Sous-pages (Sudoku, Relaxation, etc.) --- */
.hay-subpage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245,240,232,0.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(139,107,74,.10);
}

.hay-subpage-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.02em;
  flex: 1;
}

.hay-subpage-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 2px 8px rgba(92,64,48,.10);
  color: var(--hy-brown-deep);
  cursor: pointer;
}
.hay-subpage-back svg { width: 20px; height: 20px; }

/* --- Grille Tout (classes réelles) --- */
.hay-tout-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 20px 16px;
}

.hay-tout-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 4px 16px rgba(92,64,48,.10), inset 0 1px 0 rgba(255,255,255,.90);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  color: var(--hy-brown-deep);
  text-align: center;
}
.hay-tout-card:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(92,64,48,.12);
}

.hay-tout-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hy-petal-deep);
}
.hay-tout-icon svg { width: 30px; height: 30px; }

/* Teintes par catégorie */
.hay-tout-madrassa .hay-tout-icon  { background: linear-gradient(135deg,rgba(122,144,112,.28) 0%,rgba(122,144,112,.12) 100%); color: var(--hy-sage); }
.hay-tout-maktaba  .hay-tout-icon  { background: linear-gradient(135deg,rgba(139,107,74,.24) 0%,rgba(139,107,74,.10) 100%); color: var(--hy-brown); }
.hay-tout-biblio   .hay-tout-icon  { background: linear-gradient(135deg,rgba(166,120,128,.24) 0%,rgba(166,120,128,.10) 100%); color: var(--hy-petal-deep); }
.hay-tout-sudoku   .hay-tout-icon  { background: linear-gradient(135deg,rgba(92,64,48,.20) 0%,rgba(92,64,48,.08) 100%); color: var(--hy-brown-deep); }
.hay-tout-relaxation .hay-tout-icon{ background: linear-gradient(135deg,rgba(201,160,168,.32) 0%,rgba(201,160,168,.14) 100%); color: var(--hy-petal-deep); }
.hay-tout-sudur    .hay-tout-icon  { background: linear-gradient(135deg,rgba(166,120,128,.28) 0%,rgba(201,160,168,.14) 100%); color: var(--hy-petal-deep); }

.hay-tout-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.01em;
}
.hay-tout-sub {
  font-size: 11px;
  color: var(--hy-brown);
  line-height: 1.3;
  padding: 0 8px;
}

/* --- Planner onglets --- */
.hay-plan-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hay-plan-tabs::-webkit-scrollbar { display: none; }

.hay-plan-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hy-brown);
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(255,255,255,.65);
  cursor: pointer;
  transition: all 0.18s ease;
}
.hay-plan-tab.active {
  background: rgba(166,120,128,0.20);
  color: var(--hy-petal-deep);
  border-color: rgba(166,120,128,.35);
  font-weight: 700;
}

/* --- Todo --- */
.hay-todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.75);
  margin-bottom: 8px;
  transition: opacity 0.2s;
}
.hay-todo-item.done .hay-todo-text {
  opacity: 0.45;
  text-decoration: line-through;
}

.hay-todo-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(139,107,74,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.18s ease;
  background: transparent;
  color: transparent;
}
.hay-todo-item.done .hay-todo-check {
  background: var(--hy-sage);
  border-color: var(--hy-sage);
  color: #fff;
}

.hay-todo-text {
  flex: 1;
  font-size: 15px;
  color: var(--hy-brown-deep);
  line-height: 1.4;
}

.hay-todo-del {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(92,64,48,.35);
  cursor: pointer;
  background: transparent;
  border: none;
}
.hay-todo-del:hover { color: #b04a3c; }

.hay-task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hy-petal-deep);
  flex-shrink: 0;
}

.hay-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* --- Sudoku (classes réelles) --- */
.hay-sk-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(92,64,48,.14), inset 0 1px 0 rgba(255,255,255,.90);
  border: 2px solid rgba(92,64,48,.25);
  margin: 16px;
}

.hay-sk-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--hy-brown-deep);
  border: 0.5px solid rgba(139,107,74,.15);
  cursor: pointer;
  transition: background 0.15s;
}
.hay-sk-cell.given { font-weight: 700; color: var(--hy-brown-deep); }
.hay-sk-cell.selected { background: rgba(201,160,168,0.28); }
.hay-sk-cell.related { background: rgba(237,231,217,.60); }
.hay-sk-cell.same-val { background: rgba(201,160,168,.16); }
.hay-sk-cell.error { color: #b04a3c; background: rgba(176,74,60,.10); }

.hay-sk-numpad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 12px 16px;
}

.hay-sk-num {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--hy-brown-deep);
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hay-sk-num:active { transform: scale(0.92); background: rgba(201,160,168,.25); }

.hay-sk-erase {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hy-brown);
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 12px;
  cursor: pointer;
}
.hay-sk-erase svg { width: 20px; height: 20px; }

.hay-sk-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 12px 16px;
}
.hay-sk-stat { text-align: center; }
.hay-sk-stat-n { font-size: 20px; font-weight: 700; color: var(--hy-petal-deep); }
.hay-sk-stat-l { font-size: 11px; color: var(--hy-brown); font-weight: 500; letter-spacing: 0.03em; }

.hay-sk-errors {
  font-size: 13px;
  color: #b04a3c;
  text-align: center;
  padding: 4px 0;
}

.hay-sk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
}

.hay-sk-victory {
  text-align: center;
  padding: 32px 24px;
}
.hay-sk-victory-icon { font-size: 56px; margin-bottom: 12px; }
.hay-sk-victory-time {
  font-size: 14px;
  color: var(--hy-brown);
  margin-top: 8px;
}

.hay-sk-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 12px 16px;
}
.hay-sk-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: rgba(255,255,255,0.65);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.75);
}
.hay-sk-badge-icon { font-size: 28px; }
.hay-sk-badge-label { font-size: 11px; font-weight: 600; color: var(--hy-brown-deep); text-align: center; }

/* --- Relaxation --- */
.hay-rlx-bubble-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}

.hay-rlx-bubble {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
    rgba(201,160,168,.55) 0%,
    rgba(166,120,128,.40) 40%,
    rgba(139,107,74,.30) 80%,
    rgba(92,64,48,.20) 100%);
  box-shadow:
    0 0 60px rgba(201,160,168,.30),
    0 0 120px rgba(166,120,128,.15),
    inset 0 0 40px rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 4s ease-in-out;
}

.hay-rlx-bubble-inner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hay-rlx-instr {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--hy-brown-deep);
  letter-spacing: -0.01em;
}

.hay-rlx-count {
  text-align: center;
  font-size: 14px;
  color: var(--hy-brown);
  margin-top: 4px;
}

.hay-rlx-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  padding: 20px 20px 4px;
  letter-spacing: -0.02em;
}

.hay-rlx-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hy-brown);
  padding: 16px 16px 8px;
}

.hay-rlx-sounds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px 12px;
}

.hay-rlx-sound-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(255,255,255,0.65);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: all 0.18s ease;
}
.hay-rlx-sound-btn.active {
  background: rgba(201,160,168,.20);
  border-color: rgba(166,120,128,.40);
}
.hay-rlx-sound-btn:active { transform: scale(0.96); }

.hay-rlx-sound-icon { font-size: 28px; }
.hay-rlx-sound-label { font-size: 13px; font-weight: 600; color: var(--hy-brown-deep); }

.hay-rlx-start-btn, .hay-rlx-stop {
  margin: 0 16px 16px;
  width: calc(100% - 32px);
}
.hay-rlx-start-btn {
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(166,120,128,.35);
}

.hay-rlx-volume {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(139,107,74,.20);
  outline: none;
}
.hay-rlx-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hy-petal-deep);
  box-shadow: 0 2px 6px rgba(166,120,128,.35);
  cursor: pointer;
}

/* --- Sudûr (cycle) --- */
.hay-cym-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px 12px;
}

.hay-cym-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  color: var(--hy-brown-deep);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.hay-cym-cell:active { transform: scale(0.90); }

.hay-cym-day { font-size: 11px; font-weight: 600; color: var(--hy-brown); text-align: center; padding: 4px 0; }

/* États du calendrier menstruel */
.hay-cym-cell.period {
  background: rgba(166,120,128,.35);
  color: var(--hy-petal-deep);
  font-weight: 700;
}
.hay-cym-cell.predicted {
  background: rgba(201,160,168,.20);
  color: var(--hy-petal-deep);
  outline: 1.5px dashed rgba(166,120,128,.45);
  outline-offset: -1px;
}
.hay-cym-cell.ovulation {
  background: rgba(122,144,112,.22);
  color: var(--hy-sage);
}
.hay-cym-cell.today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--hy-petal-deep);
}
.hay-cym-cell.logged {
  background: rgba(166,120,128,.18);
}

.hay-cym-dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--hy-petal-deep);
}

.hay-cym-pred {
  margin: 0 16px 12px;
  padding: 14px;
  background: rgba(201,160,168,.15);
  border-radius: 16px;
  border: 1px solid rgba(166,120,128,.25);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.hay-cym-pred-icon { font-size: 22px; flex-shrink: 0; }
.hay-cym-pred-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hy-petal-deep); }
.hay-cym-pred-body { font-size: 15px; font-weight: 600; color: var(--hy-brown-deep); margin-top: 2px; }
.hay-cym-pred-note { font-size: 12px; color: var(--hy-brown); margin-top: 4px; }

.hay-cym-privacy {
  margin: 0 16px 16px;
  padding: 12px;
  background: rgba(122,144,112,.12);
  border-radius: 12px;
  border: 1px solid rgba(122,144,112,.20);
  font-size: 12px;
  color: var(--hy-sage);
  line-height: 1.4;
}

.hay-cym-flow-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.hay-cym-flow-btn {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  color: var(--hy-brown-deep);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hay-cym-flow-btn.active {
  background: rgba(166,120,128,.22);
  border-color: rgba(166,120,128,.40);
  color: var(--hy-petal-deep);
}

.hay-cym-sym-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hay-cym-sym-btn {
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 13px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  color: var(--hy-brown-deep);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hay-cym-sym-btn.active {
  background: rgba(201,160,168,.22);
  border-color: rgba(166,120,128,.35);
  color: var(--hy-petal-deep);
  font-weight: 600;
}

.hay-cym-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
}
.hay-cym-actions button { flex: 1; }

.hay-cym-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 16px 16px;
}
.hay-cym-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--hy-brown);
}
.hay-cym-dot-sym {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hay-cym-hist-list {
  display: grid;
  gap: 8px;
  padding: 8px 16px;
}
.hay-cym-hist-item {
  padding: 12px 14px;
  background: rgba(255,255,255,0.65);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.75);
}
.hay-cym-hist-date { font-size: 13px; font-weight: 700; color: var(--hy-brown-deep); }
.hay-cym-hist-dur { font-size: 12px; color: var(--hy-brown); margin-top: 2px; }
.hay-cym-hist-logs { font-size: 12px; color: var(--hy-brown); margin-top: 4px; }

.hay-cym-log-section {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}
.hay-cym-log-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hy-brown-deep);
}

.hay-cym-pref-group {
  margin-bottom: 12px;
}
.hay-cym-pref-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hy-brown);
  margin-bottom: 8px;
}
.hay-cym-pref-sep {
  height: 1px;
  background: rgba(139,107,74,.15);
  margin: 16px 0;
}
.hay-cym-pref-note {
  font-size: 12px;
  color: var(--hy-brown);
  line-height: 1.4;
}

/* Onboarding */
.hay-cym-onboard {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.hay-cym-ob-icon { font-size: 56px; }
.hay-cym-ob-msg {
  font-size: 15px;
  color: var(--hy-brown);
  line-height: 1.5;
  max-width: 280px;
}

/* --- Madrassa --- */
.hay-madr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.hay-madr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 4px 14px rgba(92,64,48,.08);
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  color: var(--hy-brown-deep);
  text-align: center;
}
.hay-madr-card:active { transform: scale(0.96); }

.hay-madr-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.hay-madr-cours     .hay-madr-card-icon { background: linear-gradient(135deg,rgba(122,144,112,.28),rgba(122,144,112,.12)); }
.hay-madr-rev       .hay-madr-card-icon { background: linear-gradient(135deg,rgba(139,107,74,.24),rgba(139,107,74,.10)); }
.hay-madr-arabe     .hay-madr-card-icon { background: linear-gradient(135deg,rgba(166,120,128,.24),rgba(166,120,128,.10)); }
.hay-madr-cycle     .hay-madr-card-icon { background: linear-gradient(135deg,rgba(201,160,168,.30),rgba(201,160,168,.12)); }
.hay-madr-flash     .hay-madr-card-icon { background: linear-gradient(135deg,rgba(92,64,48,.20),rgba(92,64,48,.08)); }

.hay-madr-card-label { font-size: 14px; font-weight: 700; color: var(--hy-brown-deep); }
.hay-madr-card-sub   { font-size: 11px; color: var(--hy-brown); line-height: 1.3; }

.hay-madr-banner {
  margin: 16px 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(122,144,112,.20) 0%, rgba(122,144,112,.08) 100%);
  border-radius: 18px;
  border: 1px solid rgba(122,144,112,.25);
  display: flex;
  gap: 12px;
  align-items: center;
}
.hay-madr-banner-icon { font-size: 28px; flex-shrink: 0; }
.hay-madr-banner-label { font-size: 15px; font-weight: 700; color: var(--hy-brown-deep); }
.hay-madr-banner-sub { font-size: 12px; color: var(--hy-brown); margin-top: 2px; }

.hay-madr-prog {
  margin: 12px 16px 0;
}

.hay-madr-arabe, .hay-madr-ar-icon {
  /* styles spécifiques arabe si besoin */
}

/* --- Book Track --- */
.hay-bt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 10px;
}

.hay-bt-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.68);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.75);
  padding: 8px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hay-bt-search svg { width: 18px; height: 18px; color: var(--hy-brown); flex-shrink: 0; }
.hay-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--hy-brown-deep);
  outline: none;
}
.hay-search-input::placeholder { color: rgba(122,101,85,.50); }

.hay-bt-reading-list {
  padding: 0 16px;
  display: grid;
  gap: 10px;
}

.hay-bt-reading-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-bt-reading-card:active { transform: scale(0.98); }

.hay-bt-cover-wrap { flex-shrink: 0; }
.hay-bt-cover-ph-sm,
.hay-bt-cover-ph {
  width: 48px;
  height: 68px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--hy-petal-soft) 0%, var(--hy-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 2px 3px 10px rgba(92,64,48,.18);
}
.hay-bt-cover-ph-lg {
  width: 80px;
  height: 112px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--hy-petal-soft) 0%, var(--hy-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 3px 4px 16px rgba(92,64,48,.22);
}

.hay-bt-rc-cover img,
.hay-bt-cover img {
  border-radius: 8px;
  box-shadow: 2px 3px 10px rgba(92,64,48,.18);
  object-fit: cover;
}

.hay-bt-rc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.hay-bt-rc-title { font-size: 15px; font-weight: 700; color: var(--hy-brown-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hay-bt-rc-author { font-size: 13px; color: var(--hy-brown); }
.hay-bt-rc-pct { font-size: 12px; color: var(--hy-petal-deep); font-weight: 600; }
.hay-bt-rc-prog { margin-top: 6px; }

.hay-bt-stats {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
}
.hay-bt-stat {
  flex: 1;
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.65);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.75);
}
.hay-bt-stat-n { font-size: 22px; font-weight: 700; color: var(--hy-petal-deep); }
.hay-bt-stat-l { font-size: 11px; color: var(--hy-brown); font-weight: 500; letter-spacing: 0.03em; }

.hay-bt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}
.hay-bt-empty-icon { font-size: 48px; opacity: 0.60; }
.hay-bt-empty-msg { font-size: 15px; font-weight: 500; color: var(--hy-brown); line-height: 1.4; }

/* Stars */
.hay-bt-stars, .hay-cover-stars { color: #c9a252; font-size: 16px; letter-spacing: 1px; }

/* Sections livre */
.hay-bt-section { padding: 16px; }
.hay-bt-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hy-brown);
  margin-bottom: 10px;
}

/* --- Timer focus --- */
.hay-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 16px;
}

.hay-timer-ring {
  position: relative;
  width: 200px;
  height: 200px;
}
.hay-timer-svg { overflow: visible; }
.hay-timer-track { stroke: rgba(139,107,74,.15); }
.hay-timer-prog { stroke: var(--hy-petal-deep); transition: stroke-dashoffset 1s linear; }

.hay-timer-display {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.hay-timer-time {
  font-size: 36px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hay-timer-mode { font-size: 13px; color: var(--hy-brown); font-weight: 500; }

.hay-timer-controls { display: flex; gap: 16px; align-items: center; }
.hay-timer-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(166,120,128,.40);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.3,1.4,.5,1);
}
.hay-timer-play:active { transform: scale(0.92); }
.hay-timer-play svg { width: 26px; height: 26px; }

.hay-timer-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 2px 8px rgba(92,64,48,.10);
  color: var(--hy-brown-deep);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-timer-btn:active { transform: scale(0.92); }
.hay-timer-btn svg { width: 20px; height: 20px; }

.hay-timer-modes { display: flex; gap: 8px; }
.hay-timer-mode-btn {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(255,255,255,.65);
  color: var(--hy-brown);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hay-timer-mode-btn.active {
  background: rgba(166,120,128,.20);
  border-color: rgba(166,120,128,.35);
  color: var(--hy-petal-deep);
}

/* --- Agenda --- */
.hay-agenda-week {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hay-agenda-week::-webkit-scrollbar { display: none; }

.hay-agenda-day {
  flex-shrink: 0;
  min-width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.hay-agenda-day.today {
  background: rgba(166,120,128,.20);
  border: 1px solid rgba(166,120,128,.35);
}

.hay-agenda-dow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hy-brown);
}
.hay-agenda-dom {
  font-size: 20px;
  font-weight: 700;
  color: var(--hy-brown-deep);
}
.hay-agenda-day.today .hay-agenda-dow { color: var(--hy-petal-deep); }
.hay-agenda-day.today .hay-agenda-dom { color: var(--hy-petal-deep); }

.hay-agenda-day-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hy-brown);
  padding: 4px 16px 8px;
  letter-spacing: 0.04em;
}

.hay-agenda-tasks {
  padding: 0 16px;
  display: grid;
  gap: 8px;
}

.hay-agenda-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.65);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-agenda-task:active { transform: scale(0.98); }
.hay-agenda-task.done { opacity: 0.50; }

.hay-agenda-empty {
  text-align: center;
  padding: 32px;
  color: var(--hy-brown);
  font-size: 14px;
}

/* --- Bullet journal --- */
.hay-bj-entry {
  padding: 14px 16px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.75);
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-bj-entry:active { transform: scale(0.98); }
.hay-bj-entry-date { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hy-petal-deep); margin-bottom: 4px; }
.hay-bj-entry-preview { font-size: 14px; color: var(--hy-brown-deep); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.hay-bj-area {
  width: 100%;
  min-height: 180px;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--hy-brown-deep);
  line-height: 1.6;
  resize: none;
  outline: none;
  font-family: inherit;
}
.hay-bj-area::placeholder { color: rgba(122,101,85,.40); }

.hay-bj-past-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hy-brown);
  padding: 16px 16px 8px;
}

/* --- Sheets des modules --- */
.hay-sheet-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.hay-sheet-msg {
  font-size: 15px;
  color: var(--hy-brown);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* --- Progress bars (classes réelles) --- */
.hay-progress-bar {
  height: 6px;
  background: rgba(139,107,74,.14);
  border-radius: 999px;
  overflow: hidden;
}
.hay-progress-bar.hay-progress-lg { height: 10px; }
.hay-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

/* --- Stars rating --- */
.hay-star {
  font-size: 18px;
  color: #c9a252;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-star:active { transform: scale(0.85); }

/* --- Search bar globale --- */
.hay-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 16px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.68);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* --- Level pills (Sudoku) --- */
.hay-sk-lv-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  color: var(--hy-brown-deep);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hay-sk-lv-pill.active {
  background: rgba(166,120,128,.22);
  border-color: rgba(166,120,128,.40);
  color: var(--hy-petal-deep);
  font-weight: 700;
}

.hay-sk-lv-label { font-size: 12px; color: var(--hy-brown); margin-bottom: 6px; font-weight: 600; }
.hay-sk-lv-best { font-size: 11px; color: var(--hy-brown); margin-top: 4px; }

.hay-sk-play-status { font-size: 14px; color: var(--hy-brown); text-align: center; padding: 4px; }
.hay-sk-play-info { font-size: 13px; color: var(--hy-brown); }

.hay-sk-gameover {
  text-align: center;
  padding: 32px 24px;
}

/* --- Home header --- */
.hay-home-header {
  padding: 20px 20px 8px;
}
.hay-date-line {
  font-size: 13px;
  color: var(--hy-brown);
  font-weight: 500;
  margin-top: 2px;
}
.hay-shortcuts {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hay-shortcuts::-webkit-scrollbar { display: none; }
.hay-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
}
.hay-sc-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 2px 10px rgba(92,64,48,.10);
  transition: transform 0.15s ease;
}
.hay-shortcut:active .hay-sc-icon { transform: scale(0.92); }
.hay-card-label { font-size: 11px; font-weight: 600; color: var(--hy-brown); }

/* --- Cards accueil --- */
.hay-cards-col {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.hay-card-streak { --card-accent: var(--hy-petal-deep); }
.hay-card-planner { --card-accent: var(--hy-sage); }
.hay-card-biblio  { --card-accent: var(--hy-brown); }
.hay-card-madrassa { --card-accent: var(--hy-sage); }

.hay-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(201,160,168,.20);
  flex-shrink: 0;
}
.hay-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hy-brown);
}
.hay-card-body {
  font-size: 15px;
  color: var(--hy-brown-deep);
  line-height: 1.4;
}
.hay-card-sub {
  font-size: 12px;
  color: var(--hy-brown);
  margin-top: 2px;
}
.hay-card-arrow {
  color: rgba(92,64,48,.30);
  flex-shrink: 0;
}
.hay-card-cover { flex-shrink: 0; }
.hay-card-cover img, .hay-card-cover-ph {
  width: 44px;
  height: 60px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 2px 3px 10px rgba(92,64,48,.18);
}
.hay-card-cover-ph {
  background: linear-gradient(135deg, var(--hy-petal-soft) 0%, var(--hy-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* --- Settings button --- */
.hay-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  color: var(--hy-brown-deep);
  cursor: pointer;
}
.hay-settings-btn svg { width: 20px; height: 20px; }

/* Streak */
.hay-streak-flame { font-size: 28px; }

/* ═══════════════════════════════════════════════════════════════
   28. ALIASES — anciens noms → nouveaux noms JS
   (correctifs de nommage découverts post-rédaction)
   ═══════════════════════════════════════════════════════════════ */

/* hay-tout-cell → hay-tout-card (alias pour compatibilité) */
.hay-tout-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: 0 4px 16px rgba(92,64,48,.10), inset 0 1px 0 rgba(255,255,255,.90);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  color: var(--hy-brown-deep);
  text-align: center;
}
.hay-tout-cell:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(92,64,48,.12); }

/* hay-tout-cell-icon → hay-tout-icon */
.hay-tout-cell-icon, .hay-tout-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--hy-petal-deep);
}
.hay-tout-cell-icon svg, .hay-tout-icon svg { width: 30px; height: 30px; }

/* hay-tout-cell-label → hay-tout-label */
.hay-tout-cell-label, .hay-tout-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.01em;
}
.hay-tout-cell-sub, .hay-tout-sub {
  font-size: 11px;
  color: var(--hy-brown);
  line-height: 1.3;
  padding: 0 8px;
}

/* data-cat → class name pattern (les deux fonctionnent) */
.hay-tout-cell[data-cat="madrassa"]  .hay-tout-cell-icon,
.hay-tout-madrassa                   .hay-tout-cell-icon { background: linear-gradient(135deg,rgba(122,144,112,.28) 0%,rgba(122,144,112,.12) 100%); color: var(--hy-sage); }
.hay-tout-cell[data-cat="maktaba"]   .hay-tout-cell-icon,
.hay-tout-maktaba                    .hay-tout-cell-icon { background: linear-gradient(135deg,rgba(139,107,74,.24) 0%,rgba(139,107,74,.10) 100%); color: var(--hy-brown); }
.hay-tout-cell[data-cat="biblio"]    .hay-tout-cell-icon,
.hay-tout-biblio                     .hay-tout-cell-icon { background: linear-gradient(135deg,rgba(166,120,128,.24) 0%,rgba(166,120,128,.10) 100%); color: var(--hy-petal-deep); }
.hay-tout-cell[data-cat="sudoku"]    .hay-tout-cell-icon,
.hay-tout-sudoku                     .hay-tout-cell-icon { background: linear-gradient(135deg,rgba(92,64,48,.20) 0%,rgba(92,64,48,.08) 100%); color: var(--hy-brown-deep); }
.hay-tout-cell[data-cat="relaxation"] .hay-tout-cell-icon,
.hay-tout-relaxation                 .hay-tout-cell-icon { background: linear-gradient(135deg,rgba(201,160,168,.32) 0%,rgba(201,160,168,.14) 100%); color: var(--hy-petal-deep); }
.hay-tout-cell[data-cat="sudur"]     .hay-tout-cell-icon,
.hay-tout-sudur                      .hay-tout-cell-icon { background: linear-gradient(135deg,rgba(166,120,128,.28) 0%,rgba(201,160,168,.14) 100%); color: var(--hy-petal-deep); }

/* cym-period / cym-predicted / cym-ovulation → hay-cym-cell.period etc.
   L'ancien bloc les cible déjà ; on garde les deux pour compatibilité */
.cym-period, .hay-cym-cell.period {
  background: rgba(166,120,128,.35) !important;
  color: var(--hy-petal-deep) !important;
  font-weight: 700 !important;
}
.cym-predicted, .hay-cym-cell.predicted {
  background: rgba(201,160,168,.20) !important;
  outline: 1.5px dashed rgba(166,120,128,.45) !important;
  outline-offset: -1px !important;
  color: var(--hy-petal-deep) !important;
}
.cym-ovulation, .hay-cym-cell.ovulation {
  background: rgba(122,144,112,.22) !important;
  color: var(--hy-sage) !important;
}

/* ═══════════════════════════════════════════════════════════════
   29. COMPOSANTS SUPPLÉMENTAIRES (couverture complète modules JS)
   ═══════════════════════════════════════════════════════════════ */

/* --- Sheets génériques --- */
.hay-sheet-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(139,107,74,.22);
  background: rgba(255,255,255,0.80);
  font-size: 15px;
  color: var(--hy-brown-deep);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.hay-sheet-input:focus { border-color: var(--hy-petal-deep); }
.hay-sheet-input::placeholder { color: rgba(122,101,85,.40); }

.hay-sheet-add-task, .hay-sheet-confirm {
  margin-top: 12px;
  width: 100%;
}

/* --- Todo (input + liste) --- */
.hay-todo { padding: 0 16px; }
.hay-todo-list { display: grid; gap: 8px; padding: 0 16px 12px; }
.hay-todo-add {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}
.hay-todo-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(139,107,74,.22);
  background: rgba(255,255,255,0.80);
  font-size: 15px;
  color: var(--hy-brown-deep);
  outline: none;
  font-family: inherit;
}
.hay-todo-input:focus { border-color: var(--hy-petal-deep); }
.hay-todo-submit {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--hy-petal-deep) 0%, var(--hy-brown) 100%);
  color: #fff;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(166,120,128,.35);
}
.hay-todo-submit svg { width: 18px; height: 18px; }
.hay-todo-sep {
  height: 1px;
  background: rgba(139,107,74,.12);
  margin: 4px 16px;
}

/* --- Plan body --- */
.hay-plan-body { padding: 0 16px 16px; }
.hay-planner { /* vue conteneur */ }
.hay-agenda { /* vue conteneur */ }
.hay-accueil { /* vue conteneur */ }

/* --- Bullet journal --- */
.hay-bj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.hay-bj-date {
  font-size: 20px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.02em;
}
.hay-bj-content { padding: 0 16px; }
.hay-bj-sheet { /* sheet du bullet journal */ }
.hay-bj-save {
  margin-top: 12px;
  width: 100%;
}
.hay-bj-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}
.hay-bj-past { padding: 0 16px; }
.hay-bj-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--hy-brown);
  font-size: 15px;
  opacity: 0.65;
}
.hay-bullet { font-size: 18px; color: var(--hy-petal-deep); flex-shrink: 0; }

/* --- Couleur picker --- */
.hay-color-pick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hay-color-pick input[type="color"] {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.75);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

/* --- Sudoku (conteneurs) --- */
.hay-sudoku { /* vue conteneur */ }
.hay-sudoku-play { /* sous-vue jeu en cours */ }
.hay-sk-levels {
  padding: 20px 16px;
  display: grid;
  gap: 12px;
}
.hay-sk-levels-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--hy-brown-deep);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hay-sk-level-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.65);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
  box-shadow: 0 2px 10px rgba(92,64,48,.08);
}
.hay-sk-level-btn:active { transform: scale(0.97); }
.hay-sk-row {
  display: flex;
  justify-content: center;
  gap: 0;
}

/* --- Relaxation (conteneurs) --- */
.hay-rlx { /* vue conteneur */ }
.hay-rlx-home { padding: 0 16px 16px; }
.hay-rlx-section { margin-bottom: 16px; }
.hay-rlx-sections { display: grid; gap: 12px; padding: 0 16px; }
.hay-rlx-breathe {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 16px;
}
.hay-rlx-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,.75);
  color: var(--hy-brown-deep);
  cursor: pointer;
}
.hay-rlx-close svg { width: 18px; height: 18px; }
.hay-rlx-ex-list { display: grid; gap: 10px; padding: 0 16px; }
.hay-rlx-ex-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.65);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-rlx-ex-btn:active { transform: scale(0.97); }
.hay-rlx-ex-label { font-size: 15px; font-weight: 700; color: var(--hy-brown-deep); }
.hay-rlx-ex-sub { font-size: 12px; color: var(--hy-brown); margin-top: 2px; }
.hay-rlx-vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}
.hay-rlx-sound-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(166,120,128,.22);
  border: none;
  color: var(--hy-petal-deep);
  cursor: pointer;
}
.hay-rlx-bubble-eye {
  position: absolute;
  width: 24px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  top: 20%;
  left: 25%;
}

/* --- Sudûr (Cycle) conteneurs --- */
.hay-cym { /* vue conteneur */ }
.hay-cym-cal { padding: 0 12px; }
.hay-cym-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
}
.hay-cym-cal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hy-brown-deep);
}
.hay-cym-dow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hy-brown);
  text-align: center;
  padding: 4px 0;
}
.hay-cym-day-n {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1;
}
.hay-cym-notes {
  width: 100%;
  min-height: 100px;
  border: 1.5px solid rgba(139,107,74,.20);
  border-radius: 12px;
  background: rgba(255,255,255,0.75);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--hy-brown-deep);
  resize: none;
  outline: none;
  font-family: inherit;
}
.hay-cym-notes:focus { border-color: var(--hy-petal-deep); }
.hay-cym-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--hy-brown);
  font-size: 15px;
  opacity: 0.65;
}
.hay-cym-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hay-cym-pred-active {
  background: rgba(166,120,128,.22) !important;
  border-color: rgba(166,120,128,.40) !important;
}

/* --- Madrassa (conteneurs) --- */
.hay-madrassa { /* vue conteneur */ }
.hay-maktaba { /* vue conteneur */ }

/* --- Maktaba (cours islamiques) --- */
.hay-mkt-sheet, .hay-mkt-sheet-body { /* sheet maktaba */ }
.hay-mkt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}
.hay-mkt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  background: rgba(255,255,255,0.65);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
  text-align: center;
}
.hay-mkt-card:active { transform: scale(0.96); }
.hay-mkt-ph-icon { font-size: 32px; }
.hay-mkt-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--hy-brown-deep);
}
.hay-mkt-sub {
  font-size: 11px;
  color: var(--hy-brown);
  line-height: 1.3;
}
.hay-mkt-list { display: grid; gap: 8px; padding: 0 16px 16px; }
.hay-mkt-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.65);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-mkt-list-item:active { transform: scale(0.98); }
.hay-mkt-li-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: rgba(201,160,168,.20);
  color: var(--hy-petal-deep);
  flex-shrink: 0;
}
.hay-mkt-li-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--hy-brown-deep);
  flex: 1;
}
.hay-mkt-content { padding: 0 16px; }
.hay-mkt-ar {
  font-family: "Amiri", "Gulzar", serif;
  font-size: 20px;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  color: var(--hy-brown-deep);
}
.hay-mkt-tafsir-note {
  font-size: 13px;
  color: var(--hy-brown);
  line-height: 1.5;
  font-style: italic;
  padding: 10px 14px;
  background: rgba(237,231,217,.60);
  border-radius: 10px;
  border-left: 3px solid var(--hy-petal-deep);
}
.hay-mkt-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}
.hay-mkt-ph-msg {
  font-size: 15px;
  color: var(--hy-brown);
  line-height: 1.4;
}

/* --- Book Track (manquants) --- */
.hay-bt { /* vue conteneur */ }
.hay-bt-add, .hay-bt-add-form { display: grid; gap: 12px; padding: 16px; }
.hay-bt-add-label, .hay-bt-field-label, .hay-bt-prog-label,
.hay-bt-rating-label, .hay-bt-review-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hy-brown);
  margin-bottom: 4px;
}
.hay-bt-add-cover-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.hay-bt-add-cover-ph {
  width: 70px;
  height: 100px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--hy-petal-soft) 0%, var(--hy-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 2px 3px 10px rgba(92,64,48,.14);
}
.hay-bt-add-cover-actions { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hay-bt-add-sep { height: 1px; background: rgba(139,107,74,.12); margin: 4px 0; }
.hay-bt-add-isbn, .hay-bt-add-btn { width: 100%; }

.hay-bt-isbn-row { display: flex; gap: 8px; }
.hay-bt-isbn-result, .hay-bt-isbn-ok, .hay-bt-isbn-err {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
}
.hay-bt-isbn-ok { background: rgba(122,144,112,.12); color: var(--hy-sage); border: 1px solid rgba(122,144,112,.25); }
.hay-bt-isbn-err { background: rgba(176,74,60,.08); color: #b04a3c; border: 1px solid rgba(176,74,60,.20); }
.hay-bt-isbn-loading { color: var(--hy-brown); font-size: 13px; }

.hay-bt-search-btn { flex-shrink: 0; }
.hay-bt-search-results { display: grid; gap: 10px; padding: 8px 16px; }
.hay-bt-search-empty {
  text-align: center;
  padding: 32px;
  color: var(--hy-brown);
  font-size: 14px;
  opacity: 0.65;
}

.hay-bt-sr-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.65);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.75);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.hay-bt-sr-item:active { transform: scale(0.98); }
.hay-bt-sr-cover { width: 40px; height: 56px; flex-shrink: 0; }
.hay-bt-sr-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.hay-bt-sr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.hay-bt-sr-title { font-size: 14px; font-weight: 700; color: var(--hy-brown-deep); }
.hay-bt-sr-author { font-size: 12px; color: var(--hy-brown); }

.hay-bt-bookpage { padding: 0 16px 24px; }
.hay-bt-book-hero {
  position: relative;
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  margin: 0 -16px 16px;
  background: linear-gradient(135deg, var(--hy-cream) 0%, var(--hy-petal-soft) 100%);
  overflow: hidden;
}
.hay-bt-book-cover { flex-shrink: 0; }
.hay-bt-book-cover img { width: 90px; border-radius: 10px; box-shadow: 3px 4px 16px rgba(92,64,48,.25); }
.hay-bt-book-meta { padding: 0 12px; flex: 1; }
.hay-bt-book-title { font-size: 18px; font-weight: 700; color: var(--hy-brown-deep); letter-spacing: -0.02em; line-height: 1.2; }
.hay-bt-book-author { font-size: 14px; color: var(--hy-brown); margin-top: 4px; }
.hay-bt-book-pages { font-size: 12px; color: var(--hy-brown); margin-top: 2px; }
.hay-bt-book-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 6px;
  background: rgba(166,120,128,.20);
  color: var(--hy-petal-deep);
}
.hay-bt-book-row { display: grid; gap: 10px; }

.hay-bt-prog-section, .hay-bt-rating-section, .hay-bt-review-section,
.hay-bt-citations-section { margin-bottom: 16px; }
.hay-bt-prog-row { display: flex; align-items: center; gap: 10px; }
.hay-bt-prog-input {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(139,107,74,.18);
  flex: 1;
  outline: none;
}
.hay-bt-prog-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--hy-petal-deep);
  box-shadow: 0 2px 6px rgba(166,120,128,.35);
  cursor: pointer;
}

.hay-bt-review-area {
  width: 100%;
  min-height: 100px;
  border: 1.5px solid rgba(139,107,74,.22);
  border-radius: 12px;
  background: rgba(255,255,255,0.80);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--hy-brown-deep);
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.5;
}
.hay-bt-review-area:focus { border-color: var(--hy-petal-deep); }

.hay-bt-cit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hay-bt-cit-label { font-weight: 700; color: var(--hy-brown-deep); font-size: 15px; }
.hay-bt-cit-add {
  font-size: 13px;
  color: var(--hy-petal-deep);
  font-weight: 600;
  cursor: pointer;
}
.hay-bt-cit-list { display: grid; gap: 8px; }
.hay-bt-cit-empty { font-size: 13px; color: var(--hy-brown); opacity: 0.65; }
.hay-bt-cit-sheet { /* sheet citations */ }
.hay-bt-cit-text {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid rgba(139,107,74,.22);
  border-radius: 10px;
  background: rgba(255,255,255,0.80);
  padding: 8px 10px;
  font-size: 14px;
  color: var(--hy-brown-deep);
  resize: none;
  outline: none;
  font-family: inherit;
}
.hay-bt-cit-page {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1.5px solid rgba(139,107,74,.22);
  background: rgba(255,255,255,0.80);
  font-size: 14px;
  color: var(--hy-brown-deep);
  outline: none;
  width: 100%;
}
.hay-bt-cit-del {
  color: rgba(176,74,60,.55);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
}

.hay-bt-dates { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hay-bt-date-item {
  font-size: 12px;
  color: var(--hy-brown);
  background: rgba(237,231,217,.70);
  padding: 4px 10px;
  border-radius: 20px;
}

.hay-bt-name { font-size: 16px; font-weight: 700; color: var(--hy-brown-deep); }
.hay-bt-count { font-size: 13px; color: var(--hy-brown); }
.hay-bt-cover-stars { color: #c9a252; font-size: 14px; letter-spacing: 1px; }

.hay-bt-banner {
  position: relative;
  margin: 12px 16px;
  border-radius: 16px;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.hay-bt-banner-prev { position: absolute; inset: 0; }
.hay-bt-banner-prev img { width: 100%; height: 100%; object-fit: cover; }
.hay-bt-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(37,24,16,.72) 0%, transparent 55%);
}
.hay-bt-banner-default {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hy-petal-soft) 0%, var(--hy-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.45;
}
.hay-bt-banner-content { position: relative; z-index: 1; }

.hay-bt-avatar, .hay-bt-avatar-ph {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.hay-bt-avatar-ph {
  background: linear-gradient(135deg, var(--hy-petal-soft) 0%, var(--hy-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.hay-bt-add-btn { /* bouton ajouter */ }
.hay-bt-danger { color: #b04a3c; }

.hay-bt-pf-section { margin-bottom: 16px; }
.hay-bt-pf-preview { margin-top: 8px; }
.hay-bt-pf-img-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hay-bt-profile-btn { /* bouton profil */ }
.hay-bt-profile-edit { /* bouton éditer profil */ }
.hay-bt-edit-sheet { /* sheet d'édition */ }

/* --- Timer (manquants) --- */
.hay-timer-reset { /* bouton reset du timer */ }

/* --- Sous-pages (sous-titre) --- */
.hay-subpage-sub {
  font-size: 13px;
  color: var(--hy-brown);
  margin-top: 2px;
}

/* --- Tout conteneur --- */
.hay-tout { /* vue conteneur */ }


/* hay-bt-cit (conteneur de la section citations) */
.hay-bt-cit { display: grid; gap: 8px; }
