/* ==========================================================================
   GCMLab — Design system
   Deux designs : "gcm" (photo hub / modules clairs orange) et "atelier" (clair).
   Axe indépendant des couleurs de thème.
   ========================================================================== */

/* ------------------------------ Animations ------------------------------ */
@keyframes gcl-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gcl-ltr {
  from { opacity: 0; transform: translateY(0.5em) rotate(6deg); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}
@keyframes gcl-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes gcl-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-14px) scale(1.03); }
}
@keyframes gcl-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(28px, -22px) scale(1.08); }
  66%      { transform: translate(-22px, 18px) scale(0.96); }
}
@keyframes gcl-shine {
  from { transform: translateX(-120%) skewX(-18deg); }
  to   { transform: translateX(220%) skewX(-18deg); }
}
@keyframes gcl-spin-slow {
  to { transform: rotate(360deg); }
}

/* Éléments animés au défilement / au chargement */
.gcl-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.gcl-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Titre animé lettre par lettre */
.gcl-split .ltr {
  display: inline-block;
  opacity: 1;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .gcl-split .ltr,
  .gcl-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* =========================================================================
   STRUCTURE COMMUNE
   ========================================================================= */
.gl-app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}
.gl-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.gl-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  opacity: 0.55;
  animation: none;
}
.gl-orb--1 { width: 26rem; height: 26rem; top: -6rem; left: -6rem; background: var(--gl-orb1, #22d3ee); animation-delay: -2s; }
.gl-orb--2 { width: 22rem; height: 22rem; top: 20%; right: -6rem; background: var(--gl-orb2, #a855f7); animation-delay: -7s; }
.gl-orb--3 { width: 20rem; height: 20rem; bottom: -6rem; left: 30%; background: var(--gl-orb3, #6366f1); animation-delay: -12s; }

.gl-top {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 74rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem 0;
  flex-wrap: wrap;
}
.gl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.gl-brand img { height: 2rem; width: auto; }
.gl-brand span { font-size: 1.05rem; }

.gl-user {
  display: flex;
  align-items: center;
  gap: 0.6rem 0.85rem;
  flex-wrap: wrap;
}
.gl-user-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.gl-hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 74rem;
  padding: 3.5rem 1.5rem 1.5rem;
  text-align: center;
  animation: none;
}
.gl-logo {
  height: 4.25rem;
  width: auto;
  margin-bottom: 1.1rem;
  animation: none;
}
.gl-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0;
}
.gl-title .grad {
  background: linear-gradient(100deg, var(--gl-grad1, #22d3ee), var(--gl-grad2, #a855f7), var(--gl-grad3, #6366f1), var(--gl-grad1, #22d3ee));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: inherit;
  animation: none;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
.gl-sub {
  margin: 1rem auto 0;
  max-width: 40rem;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  line-height: 1.6;
  opacity: 0.85;
}
.gl-meta {
  margin-top: 1.1rem;
  font-size: 0.82rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.gl-meta a { color: inherit; text-decoration: none; font-family: ui-monospace, monospace; }
.gl-meta a:hover { text-decoration: underline; }

.gl-grid-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 84rem;
  padding: 1.25rem 1.5rem 4rem;
}
.gl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 64rem) { .gl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .gl-grid { grid-template-columns: 1fr; } }

/* Carte de module */
.module-card.gl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 12rem;
  padding: 1.4rem 1.3rem 1.1rem;
  border-radius: var(--gl-rad, 1rem);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--gl-card-border, rgba(255,255,255,0.14));
  background: var(--gl-card-bg, rgba(255,255,255,0.06));
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.28s ease, border-color 0.28s ease;
}
.module-card.gl-card::before {   /* halo lumineux au survol */
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              var(--gl-glow, rgba(99,102,241,0.35)), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.module-card.gl-card:hover::before { opacity: 1; }
.module-card.gl-card:hover {
  transform: translateY(-6px);
  border-color: var(--gl-card-hover-border, rgba(168,85,247,0.55));
  box-shadow: 0 18px 45px var(--gl-card-shadow, rgba(2,6,23,0.45));
}
.module-card.gl-card[data-no-access="1"],
.module-card.gl-card.disabled {
  opacity: 0.5;
  filter: grayscale(0.4);
}
.module-card .gl-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: var(--gl-icon-bg, rgba(255,255,255,0.1));
  color: var(--gl-icon-fg, #e2e8f0);
  margin-bottom: 0.35rem;
}
.module-card .gl-icon svg { width: 1.5rem; height: 1.5rem; }
.module-card .module-name {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  min-height: 0;
  text-align: left;
  margin: 0;
}
.module-card .module-name::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 3px;
  margin: 0.6rem 0 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gl-grad1, #22d3ee), var(--gl-grad2, #a855f7));
}
.module-card .module-desc {
  font-size: 0.86rem;
  line-height: 1.5;
  opacity: 0.78;
  flex: 1;
  min-height: 0;
}
.module-card .module-stat {
  font-size: 0.76rem;
  line-height: 1.45;
  color: inherit;
  opacity: 0.75;
  min-height: 0;
}
.module-card .module-badges { margin-top: auto; }
.module-card .module-alert {
  background: rgba(251, 146, 60, 0.14);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.35);
}
.module-card .module-alert-dot { background: #fb923c; }

/* Pastilles d'alerte (facture, maintenance, note, demande) — thème clair Atelier :
   terracotta chaud, lisible sur les tuiles crème/blanches et accordé à la palette dorée */
html[data-design="atelier"] .module-card .module-alert {
  background: #fbe7dd;
  color: #9c3b1b;
  border: 1px solid #e6b49b;
  font-weight: 700;
}
html[data-design="atelier"] .module-card .module-alert-dot {
  background: #c1502e;
  box-shadow: 0 0 0 2px rgba(193, 80, 46, 0.18);
}

/* Entrée en cascade des cartes */
.module-card.gl-card.gcl-reveal { transition-delay: var(--d, 0ms); }

.gl-footer {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem 2.5rem;
  font-size: 0.75rem;
  opacity: 0.55;
  text-align: center;
}
.gl-notice {
  position: relative;
  z-index: 2;
  margin: 0.5rem auto 0;
  font-size: 0.85rem;
  color: #fdba74;
  text-align: center;
}

/* =========================================================================
   DESIGN « AURORA » (sombre, moderne)
   ========================================================================= */
html[data-design="aurora"] {
  color-scheme: dark;
  --gl-rad: 1rem;
  --gl-card-bg: rgba(255, 255, 255, 0.055);
  --gl-card-border: rgba(255, 255, 255, 0.12);
  --gl-card-hover-border: rgba(168, 85, 247, 0.6);
  --gl-card-shadow: rgba(2, 6, 23, 0.55);
  --gl-glow: rgba(99, 102, 241, 0.35);
  --gl-orb1: #0ea5e9;
  --gl-orb2: #a855f7;
  --gl-orb3: #6366f1;
  --gl-grad1: #38bdf8;
  --gl-grad2: #c084fc;
  --gl-grad3: #818cf8;
}
html[data-design="aurora"] body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(56,189,248,0.16), transparent 60%),
    radial-gradient(1000px 500px at 90% 10%, rgba(168,85,247,0.16), transparent 60%),
    linear-gradient(180deg, #070b18 0%, #0b1020 45%, #0a0f1f 100%);
  color: #e6eaf5;
}
html[data-design="aurora"] .gl-brand { color: #f1f5ff; }
html[data-design="aurora"] .gl-user-name { color: #cbd5e1; }
html[data-design="aurora"] .gl-title { color: #f8fafc; }
html[data-design="aurora"] .gl-sub { color: #b6c2d9; }
html[data-design="aurora"] .module-card .module-name { color: #f1f5ff; }
html[data-design="aurora"] .module-card .module-desc { color: #aab6d0; }
html[data-design="aurora"] .gl-footer { color: #94a3b8; }

/* =========================================================================
   DESIGN « ATELIER » (clair, éditorial)
   ========================================================================= */
html[data-design="atelier"] {
  --gl-rad: 0.55rem;
  --gl-card-bg: #ffffff;
  --gl-card-border: #e6e1d7;
  --gl-card-hover-border: #b9924f;
  --gl-card-shadow: rgba(60, 45, 20, 0.10);
  --gl-glow: rgba(185, 146, 79, 0.18);
  --gl-orb1: #fde68a;
  --gl-orb2: #fecaca;
  --gl-orb3: #bfdbfe;
  --gl-grad1: #9a6b1f;
  --gl-grad2: #b9924f;
  --gl-grad3: #7c5a1a;
  --gl-icon-bg: #f6f1e7;
  --gl-icon-fg: #8a6a2f;
}
html[data-design="atelier"] .gl-bg { opacity: 0.5; }
html[data-design="atelier"] .gl-orb { filter: blur(80px); opacity: 0.35; }
html[data-design="atelier"] body {
  background:
    linear-gradient(180deg, #fbf9f4 0%, #f6f2e9 100%);
  color: #2a2620;
}
html[data-design="atelier"] .gl-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}
html[data-design="atelier"] .gl-title .grad {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #2a2620;
  animation: none;
}
html[data-design="atelier"] .gl-sub { color: #5f584b; }
html[data-design="atelier"] .gl-brand { color: #2a2620; }
html[data-design="atelier"] .gl-user-name { color: #4b453b; }
html[data-design="atelier"] .gl-footer { color: #8b8272; }
html[data-design="atelier"] .module-card .module-name {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: #2a2620;
}
html[data-design="atelier"] .module-card .module-desc { color: #6b6355; }
html[data-design="atelier"] .module-card .module-stat { color: #6b6355; }
html[data-design="atelier"] .module-card::before { display: none; }
html[data-design="atelier"] .module-card:not(.active):hover {
  box-shadow: 0 12px 30px rgba(60, 45, 20, 0.08);
}

/* Choix dans le menu Design */
.design-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.design-option:hover { background: #f1f5f9; }
.design-option.is-active { font-weight: 700; }

/* Top-right cluster du Hub */
.gl-top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
html[data-design="aurora"] .hub-logout {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dbe3f4;
  backdrop-filter: blur(8px);
  border-radius: 0.6rem;
}
html[data-design="aurora"] .hub-logout:hover { border-color: rgba(168, 85, 247, 0.6); color: #fff; }
html[data-design="aurora"] .hub-feedback-link { color: #9fb0cc; }
html[data-design="aurora"] .hub-feedback-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}
html[data-design="atelier"] .hub-logout {
  background: #fff;
  border: 1px solid #e6e1d7;
  color: #6b5a34;
  border-radius: 0.4rem;
}
html[data-design="atelier"] .hub-logout:hover { border-color: #b9924f; }

@media (prefers-reduced-motion: reduce) {
  .gl-orb, .gl-logo, .gl-title .grad { animation: none !important; }
}

/* =========================================================================
   MODULES — habillage de la barre + contenu + animations de titres
   ========================================================================= */

/* Entrée de la barre de navigation + titres + blocs de contenu */
@keyframes gcl-nav-in { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes gcl-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.app-nav {
  position: relative;
  z-index: 50;
  animation: none;
}
.app-main { position: relative; }
.app-main > * {
  animation: none;
}
.app-main h1 {
  position: relative;
  letter-spacing: -0.02em;
}
.app-main h1::after {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  margin-top: 0.5rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lmf-500), transparent);
  transform-origin: left;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .app-nav, .app-main > *, .app-main h1, .app-main h1::after { animation: none !important; }
}

/* ------------------------------ AURORA (sombre) ------------------------------ */
html[data-design="aurora"] body {
  background:
    radial-gradient(1100px 520px at 10% -5%, rgba(56, 189, 248, 0.10), transparent 60%),
    radial-gradient(900px 480px at 95% 0%, rgba(168, 85, 247, 0.10), transparent 60%),
    linear-gradient(180deg, #080c18 0%, #0b1120 60%, #0a0f1f 100%);
  color: #dbe3f4;
}
html[data-design="aurora"] .app-nav {
  background: linear-gradient(90deg, rgba(11, 18, 36, 0.96), rgba(19, 26, 52, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.5);
}
html[data-design="aurora"] .app-nav .text-lmf-100 { color: #9fb0cc; }
html[data-design="aurora"] .app-nav [data-hub-link] { background: rgba(99, 102, 241, 0.85); }
html[data-design="aurora"] .app-nav form button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
html[data-design="aurora"] .app-main h1 { color: #f1f5ff; }
html[data-design="aurora"] .app-main h1::after {
  background: linear-gradient(90deg, #38bdf8, #a855f7, transparent);
}
html[data-design="aurora"] .bg-white {
  background-color: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-design="aurora"] .bg-slate-50 { background-color: rgba(255, 255, 255, 0.03); }
html[data-design="aurora"] .bg-slate-100 { background-color: rgba(255, 255, 255, 0.06); }
html[data-design="aurora"] .text-slate-900,
html[data-design="aurora"] .text-slate-800,
html[data-design="aurora"] .text-slate-700 { color: #e8edf7; }
html[data-design="aurora"] .text-slate-600,
html[data-design="aurora"] .text-slate-500 { color: #b6c2d9; }
html[data-design="aurora"] .text-slate-400 { color: #8b98b4; }
html[data-design="aurora"] .text-lmf-700 { color: #c7d2fe; }
html[data-design="aurora"] .text-lmf-500 { color: #a5b4fc; }
html[data-design="aurora"] .border-slate-100,
html[data-design="aurora"] .border-slate-200,
html[data-design="aurora"] .border-slate-300 { border-color: rgba(255, 255, 255, 0.12); }
html[data-design="aurora"] .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(255, 255, 255, 0.08);
}
html[data-design="aurora"] table thead { background-color: rgba(255, 255, 255, 0.06); color: #cbd5e1; }
html[data-design="aurora"] table th,
html[data-design="aurora"] table td { border-color: rgba(255, 255, 255, 0.08); }
html[data-design="aurora"] input:not([type="checkbox"]):not([type="radio"]),
html[data-design="aurora"] select,
html[data-design="aurora"] textarea {
  background-color: rgba(255, 255, 255, 0.06);
  color: #e8edf7;
  border-color: rgba(255, 255, 255, 0.16);
}
html[data-design="aurora"] input::placeholder { color: #8593ad; }
html[data-design="aurora"] option { color: #0b1120; }
html[data-design="aurora"] .app-main thead.bg-slate-100 { background-color: rgba(255, 255, 255, 0.06); }

/* ------------------------------ ATELIER (clair) ------------------------------ */
html[data-design="atelier"] body {
  background: linear-gradient(180deg, #fbf9f4 0%, #f4efe4 100%);
  color: #2a2620;
}
html[data-design="atelier"] .app-nav {
  background: #2a2620;
  border-bottom: 3px solid #b9924f;
  box-shadow: 0 8px 26px rgba(60, 45, 20, 0.14);
}
html[data-design="atelier"] .app-nav [data-hub-link] { background: #b9924f; }
html[data-design="atelier"] .app-main h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}
html[data-design="atelier"] .app-main h1::after {
  background: linear-gradient(90deg, #b9924f, transparent);
}
html[data-design="atelier"] .bg-white {
  border-color: #e6e1d7;
  box-shadow: 0 6px 20px rgba(60, 45, 20, 0.06);
}
html[data-design="atelier"] .app-nav form button {
  background: #b9924f;
  border: 1px solid #b9924f;
}

/* =========================================================================
   Menu Design — ouverture fiable (clic) + survol avec pont, sans fermeture
   ========================================================================= */
.gl-picker { position: relative; }
.gl-picker-label {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.4rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
}
.gl-picker-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 0.4rem;      /* pont invisible : garde le survol entre le bouton et le panneau */
  z-index: 80;
}
.gl-picker:hover .gl-picker-menu,
.gl-picker:focus-within .gl-picker-menu,
.gl-picker.is-open .gl-picker-menu { display: block; }
.gl-picker-panel {
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  padding: 0.35rem 0;
  min-width: 12rem;
}

/* Accents liés au design (remplacent les thèmes de couleurs) */
html[data-design="aurora"] {
  --lmf-50: #eef2ff;
  --lmf-100: #e0e7ff;
  --lmf-200: #c7d2fe;
  --lmf-500: #6366f1;
  --lmf-600: #4f46e5;
  --lmf-700: #4338ca;
  --lmf-800: #3730a3;
  --lmf-900: #312e81;
}
html[data-design="atelier"] {
  --lmf-50: #fbf6ea;
  --lmf-100: #f5ead0;
  --lmf-200: #ecd9ac;
  --lmf-500: #b9924f;
  --lmf-600: #a37d3c;
  --lmf-700: #8a6a2f;
  --lmf-800: #6f5525;
  --lmf-900: #55401b;
}

html[data-design="aurora"] .gl-picker-label {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #dbe3f4;
}
html[data-design="aurora"] .gl-picker-label:hover { border-color: rgba(168, 85, 247, 0.6); color: #fff; }
html[data-design="aurora"] .gl-picker-panel {
  background: #0d1428;
  border-color: rgba(255, 255, 255, 0.14);
  color: #e6eaf5;
}
html[data-design="aurora"] .design-option:hover { background: rgba(255, 255, 255, 0.08); }
html[data-design="aurora"] .design-option.is-active { background: rgba(99, 102, 241, 0.22); color: #fff; }

html[data-design="atelier"] .gl-picker-label {
  background: #fff;
  border-color: #e6e1d7;
  color: #6b5a34;
}
html[data-design="atelier"] .gl-picker-label:hover { border-color: #b9924f; }
html[data-design="atelier"] .design-option:hover { background: #f6f1e7; }
html[data-design="atelier"] .design-option.is-active { background: #f6f1e7; color: #8a6a2f; }

/* =========================================================================
   DESIGN « GCM » — photo de fond sur le hub uniquement ;
   modules : fond clair sans photo, accents orange.
   ========================================================================= */
html[data-design="gcm"] {
  color-scheme: light;
  --gl-rad: 0.55rem;
  --gl-card-bg: #ffffff;
  --gl-card-border: #e2e8f0;
  --gl-card-hover-border: #e85a2a;
  --gl-card-shadow: rgba(15, 23, 42, 0.10);
  --gl-glow: rgba(232, 90, 42, 0.18);
  --gl-orb1: rgba(232, 90, 42, 0.20);
  --gl-orb2: rgba(255, 180, 120, 0.18);
  --gl-orb3: rgba(120, 160, 255, 0.15);
  --gl-grad1: #e85a2a;
  --gl-grad2: #d65427;
  --gl-grad3: #bf4520;
  --gl-icon-bg: #fff7f3;
  --gl-icon-fg: #bf4520;
  --lmf-50: #fff7f3;
  --lmf-100: #ffede4;
  --lmf-200: #ffd4bf;
  --lmf-500: #e85a2a;
  --lmf-600: #d65427;
  --lmf-700: #bf4520;
  --lmf-800: #9a3619;
  --lmf-900: #6b2410;
}

/* Modules (pas de .gl-app, pas de .page-wrap hub) — clair, sans photo */
html[data-design="gcm"] body {
  background: #f4f6f8;
  background-image: none;
  color: #1e293b;
}
html[data-design="gcm"] .app-nav {
  background: linear-gradient(90deg, #6b2410 0%, #9a3619 50%, #bf4520 100%);
  border-bottom: 3px solid #e85a2a;
  box-shadow: 0 8px 26px rgba(107, 36, 16, 0.28);
}
html[data-design="gcm"] .app-nav [data-hub-link] { background: #e85a2a; }
html[data-design="gcm"] .app-nav form button {
  background: #e85a2a;
  border: 1px solid #e85a2a;
}
html[data-design="gcm"] .app-main h1::after {
  background: linear-gradient(90deg, #e85a2a, transparent);
}
html[data-design="gcm"] .gl-picker-label {
  background: #fff;
  border-color: #e2e8f0;
  color: #6b2410;
}
html[data-design="gcm"] .gl-picker-label:hover { border-color: #e85a2a; }
html[data-design="gcm"] .design-option:hover { background: #fff7f3; }
html[data-design="gcm"] .design-option.is-active { background: #ffede4; color: #9a3619; }

/* Hub uniquement (index .gl-app + pages .page-wrap) — photo de fond */
html[data-design="gcm"] body:has(.gl-app),
html[data-design="gcm"] body.page-wrap {
  background-color: #1a1512;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.52) 0%, rgba(15, 23, 42, 0.38) 45%, rgba(26, 21, 18, 0.58) 100%),
    url("gcm-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #fff;
}
html[data-design="gcm"] body:has(.gl-app) .hub-auth-pending,
html[data-design="gcm"] body.page-wrap .hub-auth-pending {
  background-color: #1a1512;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.52) 0%, rgba(15, 23, 42, 0.38) 45%, rgba(26, 21, 18, 0.58) 100%),
    url("gcm-bg.jpg");
  background-size: cover;
  background-position: center;
}
html[data-design="gcm"] .hub-auth-pending p { color: rgba(255, 255, 255, 0.85); }
html[data-design="gcm"] body:has(.gl-app) .gl-bg { opacity: 0.12; }
html[data-design="gcm"] body:has(.gl-app) .gl-orb { opacity: 0.22; filter: blur(70px); }

/* =========================================================================
   Hub GCM — réplique du hub classique lmf-debourse (thème GCM + photo)
   ========================================================================= */
html[data-design="gcm"] body:has(.gl-app) {
  font-family: "Segoe UI", system-ui, sans-serif;
  padding: 2rem 1.25rem 3rem !important;
}
html[data-design="gcm"] body:has(.gl-app) .gl-top {
  max-width: 56rem;
  padding: 0 !important;
  margin-bottom: 1rem;
  justify-content: flex-end;
  align-items: flex-start;
}
html[data-design="gcm"] body:has(.gl-app) .gl-brand { display: none !important; }

html[data-design="gcm"] body:has(.gl-app) .gl-hero {
  max-width: 56rem;
  padding: 0 1.25rem 2.5rem !important;
}
html[data-design="gcm"] body:has(.gl-app) .gl-title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
html[data-design="gcm"] body:has(.gl-app) .gl-title .grad {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
html[data-design="gcm"] body:has(.gl-app) .gl-title::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  background: url("gcm-logo.png") center / contain no-repeat;
}
html[data-design="gcm"] body:has(.gl-app) .gl-sub {
  margin: 0.5rem auto 0 !important;
  max-width: 32rem;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
html[data-design="gcm"] body:has(.gl-app) .gl-meta {
  margin-top: 0.35rem !important;
  font-size: 0.8rem !important;
  color: rgba(255, 255, 255, 0.92);
}
html[data-design="gcm"] body:has(.gl-app) .gl-meta a { color: rgba(255, 255, 255, 0.92); }
html[data-design="gcm"] body:has(.gl-app) .gl-user-name {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
html[data-design="gcm"] body:has(.gl-app) .gl-footer { color: rgba(255, 255, 255, 0.75); }
html[data-design="gcm"] body:has(.gl-app) .hub-logout {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #d65427;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
}
html[data-design="gcm"] body:has(.gl-app) .hub-logout:hover { border-color: #e85a2a; color: #bf4520; }
html[data-design="gcm"] .gl-picker-label { color: #bf4520; border-radius: 0.5rem; }
html[data-design="gcm"] body:has(.gl-app) .hub-feedback-link { color: rgba(255, 255, 255, 0.9); }
html[data-design="gcm"] body:has(.gl-app) .hub-feedback-link:hover { color: #fff; }

/* Grille + tuiles identiques au hub classique */
html[data-design="gcm"] body:has(.gl-app) .gl-grid-wrap {
  max-width: 80rem;
  padding: 0 !important;
}
html[data-design="gcm"] body:has(.gl-app) .gl-grid {
  gap: 1.25rem !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card.gl-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  min-height: 12.25rem !important;
  padding: 1.5rem 1.25rem 1.1rem !important;
  gap: 0.5rem !important;
  transform: none !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card.gl-card::before { display: none !important; }
html[data-design="gcm"] body:has(.gl-app) .module-card.gl-card:hover {
  transform: translateY(-2px) !important;
  border-color: #d65427 !important;
  box-shadow: 0 8px 24px rgba(214, 84, 39, 0.15) !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card .gl-icon { display: none !important; }
html[data-design="gcm"] body:has(.gl-app) .module-card .module-name {
  color: #bf4520;
  text-align: center !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  min-height: 2.6em !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card .module-name::after {
  content: "";
  display: block;
  width: 2.5rem !important;
  height: 2px !important;
  margin: 0.85rem auto 0 !important;
  background: #d65427 !important;
  border-radius: 1px !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card .module-desc {
  color: #64748b;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  min-height: 2.6em !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card .module-stat {
  color: #475569;
  font-size: 0.74rem !important;
  min-height: 4rem !important;
}
html[data-design="gcm"] body:has(.gl-app) .module-card .module-badges { margin-top: auto !important; }
html[data-design="gcm"] body:has(.gl-app) .module-card .module-alert {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-weight: 600;
}
html[data-design="gcm"] body:has(.gl-app) .module-card .module-alert-dot { background: #f97316; }

html[data-design="gcm"] .page-wrap { background: transparent; }
html[data-design="gcm"] body.page-wrap .page-title,
html[data-design="gcm"] body:has(.gl-app) .page-title {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}
html[data-design="gcm"] body.page-wrap .page-subtitle {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
html[data-design="gcm"] body.page-wrap .back-link a { color: #ffb478; }
html[data-design="gcm"] .changelog-entry {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.55);
  color: #1e293b;
}
html[data-design="gcm"] .changelog-title { color: #1e293b; }
html[data-design="gcm"] .changelog-version { color: #bf4520; }
html[data-design="gcm"] .changelog-list li { color: #334155; }

/* =========================================================================
   Pages Hub (changelog, feedback) — suivent le design actif
   ========================================================================= */
html[data-design="aurora"] .page-wrap { color: #dbe3f4; }
html[data-design="aurora"] .page-title { color: #f1f5ff; }
html[data-design="aurora"] .page-subtitle { color: #b6c2d9; }
html[data-design="aurora"] .back-link a { color: #a5b4fc; }
html[data-design="aurora"] .mono { color: #c7d2fe; }
html[data-design="aurora"] .changelog-entry {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8edf7;
}
html[data-design="aurora"] .changelog-title { color: #f1f5ff; }
html[data-design="aurora"] .changelog-version { color: #c7d2fe; }
html[data-design="aurora"] .changelog-date { color: #8b98b4; }
html[data-design="aurora"] .changelog-list li { color: #dbe3f4; }
html[data-design="aurora"] .hub-feedback-link { color: #9fb0cc; }

html[data-design="atelier"] .page-title {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: #2a2620;
}
html[data-design="atelier"] .page-subtitle { color: #6b6355; }
html[data-design="atelier"] .back-link a { color: #8a6a2f; }
html[data-design="atelier"] .changelog-entry {
  background: #fff;
  border-color: #e6e1d7;
  box-shadow: 0 6px 20px rgba(60, 45, 20, 0.06);
}
html[data-design="atelier"] .changelog-title { color: #2a2620; }
html[data-design="atelier"] .changelog-version { color: #8a6a2f; }
html[data-design="atelier"] .changelog-list li { color: #4b453b; }


/* Survol de ligne + sélection — mode sombre (aurora) : rester lisible */
html[data-design="aurora"] .hover\:bg-slate-50:hover,
html[data-design="aurora"] .hover\:bg-slate-100:hover,
html[data-design="aurora"] .hover\:bg-white:hover,
html[data-design="aurora"] .hover\:bg-gray-50:hover,
html[data-design="aurora"] tr:hover {
  background-color: rgba(255, 255, 255, 0.07) !important;
}
html[data-design="aurora"] ::selection,
html[data-design="aurora"] *::selection,
html[data-design="aurora"] tr::selection,
html[data-design="aurora"] td::selection,
html[data-design="aurora"] th::selection {
  background-color: #334155 !important;
  color: #f1f5f9 !important;
}

/* ------------------------------ Animations retirées ------------------------------
   Ouverture des pages + logo/hero du hub : plus d'effet d'entrée. */
.gcl-reveal,
.gcl-reveal.is-visible,
.gl-hero,
.gl-logo,
.gl-title .grad,
.gl-orb,
.app-nav,
.app-main > *,
.app-main h1::after,
.gcl-split .ltr {
  animation: none !important;
  transition: none !important;
}
.gcl-reveal {
  opacity: 1 !important;
  transform: none !important;
}
.gcl-split .ltr {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
.gl-title .grad {
  animation: none !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: inherit !important;
}

/* ------------------------------ Accueil compact ------------------------------
   Hauteur réduite pour voir les tuiles sans scroller, avec assez d'air
   entre la barre haute, le hero et la grille. */
body:has(> .gl-app) {
  padding: 1rem 1.25rem 2rem !important;
}
.gl-top {
  padding: 0.75rem 1.25rem 0 !important;
}
.gl-brand img {
  height: 1.6rem !important;
}
.gl-hero {
  padding: 1.75rem 1.25rem 0.75rem !important;
}
.gl-title {
  font-size: clamp(1.65rem, 3.5vw, 2.4rem) !important;
  line-height: 1.05 !important;
}
.gl-sub {
  margin: 0.45rem auto 0 !important;
  max-width: 36rem;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}
.gl-meta {
  margin-top: 0.55rem !important;
  font-size: 0.75rem !important;
}
.gl-grid-wrap {
  padding: 1.35rem 1.25rem 2rem !important;
}
.module-card.gl-card {
  min-height: auto !important;
  padding: 0.95rem 1rem 0.85rem !important;
  gap: 0.35rem !important;
}
.module-card .gl-icon {
  width: 2rem !important;
  height: 2rem !important;
  margin-bottom: 0.15rem !important;
}
.module-card .gl-icon svg {
  width: 1.15rem !important;
  height: 1.15rem !important;
}
.module-card .module-name {
  font-size: 1rem !important;
}
.module-card .module-name::after {
  margin-top: 0.45rem !important;
  width: 2rem !important;
}
.module-card .module-desc {
  font-size: 0.8rem !important;
  line-height: 1.35 !important;
}
.module-card .module-stat {
  min-height: 0 !important;
  font-size: 0.7rem !important;
}
.gl-footer {
  padding: 0 1.25rem 1rem !important;
}
