/* ==========================================================================
   PLATFORM.CSS — Ultra-Premium Platform Pages BibloSpace v2
   Landing · Annuaire · Recherche · Inscription · Superadmin
   ========================================================================== */

/* --------------------------------------------------------------------------
   NAV PLATEFORME — Glass morphing
   -------------------------------------------------------------------------- */
#platform-nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1240px;
  z-index: 200;
  padding: 0 20px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 300ms ease, backdrop-filter 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

#platform-nav.transparent {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

#platform-nav.scrolled {
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  border-color: rgba(255, 255, 255, 0.60);
}

#platform-nav.transparent .nav-logo,
#platform-nav.transparent .nav-link,
#platform-nav.transparent .nav-logo-text { color: rgba(255, 255, 255, 0.85); }

#platform-nav.scrolled .nav-logo,
#platform-nav.scrolled .nav-link,
#platform-nav.scrolled .nav-logo-text { color: var(--color-gray-700); }

/* Active nav link gets primary color for visibility on light bg */
#platform-nav.scrolled .nav-link[style*="font-weight:700"],
#platform-nav.scrolled .nav-link[style*="font-weight: 700"] {
  color: var(--color-primary) !important;
}

/* Connexion button (btn-ghost) — dark text on light scrolled nav */
#platform-nav.scrolled .btn-ghost {
  background: rgba(29, 52, 97, 0.06);
  color: var(--color-primary);
  border-color: rgba(29, 52, 97, 0.14);
}
#platform-nav.scrolled .btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Mobile toggle icon contrast */
#platform-nav.scrolled .nav-mobile-toggle { color: var(--color-gray-700); }
#platform-nav.transparent .nav-mobile-toggle { color: rgba(255, 255, 255, 0.90); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: color 400ms ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 9999px;
  transition: all var(--t-normal);
  text-decoration: none;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 18px; height: 2px;
  border-radius: 9999px;
  background: var(--color-accent);
  transition: transform var(--t-spring);
}
.nav-link:hover { background: rgba(29,52,97,0.08); }
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 68px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  padding: 24px;
  gap: 6px;
}
.mobile-menu.open { display: flex; animation: fadeInUp 0.2s ease both; }

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* --------------------------------------------------------------------------
   SECTION HERO — Mesh gradient animé
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero-dark);
}

/* Noise texture subtile */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 100px 24px 60px;
}

.hero-tagline {
  font-family: var(--font-tagline);
  font-style: italic;
  font-size: 20px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.7s ease 0.2s both;
  background: linear-gradient(165deg, #fff 0%, rgba(255,255,255,0.88) 50%, #C6D8FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.68);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.4s both;
}

/* Hero scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-family: var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease 0.8s both;
}
.hero-scroll-cue-dot {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: float-up 2s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   STATS STRIP — Premium dark avec icônes colorées
   -------------------------------------------------------------------------- */
.stats-strip {
  background: linear-gradient(135deg, #080E1C, #0D1728, #0A1520);
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}
.stats-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 10% 50%, rgba(29,52,97,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 90% 50%, rgba(10,126,114,0.20) 0%, transparent 70%);
}

.stats-strip-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 0 24px;
  position: relative;
}
.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.10), transparent);
}

.stat-item-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stat-item-label {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .stats-strip-inner { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stat-item + .stat-item::before { display: none; }
}

/* --------------------------------------------------------------------------
   SECTIONS PLATEFORME
   -------------------------------------------------------------------------- */
.section-platform {
  padding: 96px 0;
}
.section-platform-dark {
  padding: 96px 0;
  background: linear-gradient(160deg, #080E1C 0%, #0D1728 60%, #0A0F1E 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.section-platform-tinted {
  padding: 96px 0;
  background: linear-gradient(135deg, #EEF2F7 0%, #E8EDF5 100%);
}

.section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px; height: 2px;
  border-radius: 9999px;
  background: var(--color-accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 14px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-title-white { color: #fff; }

.section-subtitle {
  font-size: 17px;
  color: var(--color-gray-600);
  line-height: 1.7;
  max-width: 560px;
}
.section-subtitle-white { color: rgba(255,255,255,0.58); }

.container {
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   TYPES DE BIBLIOTHÈQUES (6 cards)
   -------------------------------------------------------------------------- */
.lib-types-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.lib-type-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 18px;
  padding: 28px 16px;
  text-align: center;
  transition: transform var(--t-spring), box-shadow var(--t-normal), border-color var(--t-normal);
  cursor: default;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.lib-type-card:hover {
  border-color: rgba(29,52,97,0.30);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(29,52,97,0.12);
}

.lib-type-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.10));
}
.lib-type-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-700);
}

@media (max-width: 768px)  { .lib-types-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .lib-types-grid { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------------------------
   FEATURES (3×2) — Glass cards avec icône glow
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.feature-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.60);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  transition: transform var(--t-spring), box-shadow var(--t-normal);
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(29,52,97,0.3), transparent);
  opacity: 0;
  transition: opacity var(--t-normal);
}
.feature-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 56px rgba(0,0,0,0.10), 0 0 0 1px rgba(29,52,97,0.12);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(29,52,97,0.10), rgba(29,52,97,0.18));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(29,52,97,0.15);
  transition: box-shadow var(--t-normal), transform var(--t-spring);
}
.feature-card:hover .feature-icon {
  transform: scale(1.10) rotate(-3deg);
  box-shadow: 0 8px 24px rgba(29,52,97,0.25);
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 10px;
}
.feature-desc {
  font-size: 14px;
  color: var(--color-gray-600);
  line-height: 1.7;
}

@media (max-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .features-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   PRICING (3 plans) — Featured avec gradient border
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
  align-items: start;
}

.pricing-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-card);
  padding: 36px 32px;
  transition: transform var(--t-spring), box-shadow var(--t-normal);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.10);
}

.pricing-card.featured {
  background: linear-gradient(165deg, #1D3461 0%, #2A4B8A 60%, #1A3A6E 100%);
  border: 1.5px solid rgba(255,255,255,0.20);
  box-shadow: 0 24px 60px rgba(29, 52, 97, 0.40), 0 0 0 1px rgba(255,255,255,0.12);
  transform: scale(1.04) translateY(-4px);
  position: relative;
  color: #fff;
  animation: glow-pulse-primary 3s ease infinite;
}
.pricing-card.featured:hover {
  transform: scale(1.04) translateY(-8px);
  box-shadow: 0 32px 80px rgba(29, 52, 97, 0.55);
  animation: none;
}

.pricing-badge-featured {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #A05E1A, #C97B2C);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(201,123,44,0.40);
}

.pricing-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 6px;
}
.pricing-card.featured .pricing-name { color: #fff; }

.pricing-price {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.pricing-card.featured .pricing-price { color: #fff; }

.pricing-price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-gray-400);
  letter-spacing: 0;
}
.pricing-card.featured .pricing-price span { color: rgba(255,255,255,0.55); }

.pricing-desc {
  font-size: 13px;
  color: var(--color-gray-400);
  margin-bottom: 28px;
}
.pricing-card.featured .pricing-desc { color: rgba(255,255,255,0.55); }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.pricing-features li {
  font-size: 14px;
  color: var(--color-gray-700);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-card.featured .pricing-features li { color: rgba(255,255,255,0.88); }

.pricing-features li::before {
  content: '';
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(26,122,74,0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231A7A4A'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.pricing-card.featured .pricing-features li::before {
  background-color: rgba(255,255,255,0.15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fff'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
  .pricing-card.featured { transform: scale(1); }
  .pricing-card.featured:hover { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   CTA SECTION FINALE — Mesh dark
   -------------------------------------------------------------------------- */
.cta-section {
  background-color: #0D1728;
  background-image:
    linear-gradient(160deg, rgba(13,23,40,0.86) 0%, rgba(29,52,97,0.86) 50%, rgba(42,75,138,0.86) 100%),
    url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 100px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 20% 50%, rgba(10,126,114,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(201,123,44,0.22) 0%, transparent 60%);
  pointer-events: none;
}
.cta-section > .container {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 50px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}
.cta-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}
.cta-section .cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   FOOTER PLATEFORME
   -------------------------------------------------------------------------- */
.platform-footer {
  background: #080E1C;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.45);
  padding: 48px 24px 32px;
  position: relative;
}
.platform-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(29,52,97,0.4), rgba(201,123,44,0.3), transparent);
}

.footer-inner {
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-link {
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  transition: color var(--t-fast);
}
.footer-link:hover { color: rgba(255,255,255,0.80); }

/* --------------------------------------------------------------------------
   CARTE BIBLIOTHÈQUE — Glass shimmer
   -------------------------------------------------------------------------- */
.lib-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform var(--t-spring), box-shadow var(--t-normal);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  position: relative;
}
.lib-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(29,52,97,0.10);
}

.lib-card-cover {
  height: 150px;
  background: linear-gradient(135deg, rgba(29,52,97,0.15), rgba(10,126,114,0.10));
  position: relative;
  overflow: hidden;
}
.lib-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,15,30,0.30) 100%);
}

.lib-card-badge-top {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

.lib-card-body { padding: 18px; }
.lib-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.lib-card-logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(29,52,97,0.12), rgba(29,52,97,0.20));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(29,52,97,0.10);
}
.lib-card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-gray-900);
}
.lib-card-location {
  font-size: 12px;
  color: var(--color-gray-400);
}
.lib-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--color-gray-400);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* --------------------------------------------------------------------------
   ANNUAIRE — layout 2 colonnes
   -------------------------------------------------------------------------- */
.directory-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 0;
  min-height: calc(100vh - 200px);
}
.directory-list {
  overflow-y: auto;
  height: calc(100vh - 200px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid rgba(0,0,0,0.06);
}
.directory-map {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
}
#libraries-map { width: 100%; height: 100%; }

.filter-bar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 1px 16px rgba(0,0,0,0.05);
}
.filter-input { flex: 1; min-width: 200px; }
.filter-select { min-width: 130px; }

@media (max-width: 900px) {
  .directory-layout { grid-template-columns: 1fr; }
  .directory-map { display: none; }
  .directory-list { height: auto; overflow: visible; border: none; }
}

/* --------------------------------------------------------------------------
   RECHERCHE GLOBALE
   -------------------------------------------------------------------------- */
.search-hero {
  background: var(--gradient-primary);
  padding: 60px 24px 40px;
  position: relative;
  overflow: hidden;
}
.search-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 20% 60%, rgba(10,126,114,0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(201,123,44,0.18) 0%, transparent 60%);
}

.search-bar-wrap {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.search-bar-input {
  flex: 1;
  padding: 18px 24px;
  border-radius: var(--radius-btn);
  border: none;
  font-family: var(--font-ui);
  font-size: 16px;
  outline: none;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  transition: box-shadow var(--t-normal);
}
.search-bar-input:focus {
  box-shadow: 0 4px 24px rgba(0,0,0,0.20), 0 0 0 3px rgba(201,123,44,0.25);
}

.search-layout {
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 32px;
}
.search-filters {
  position: sticky;
  top: 80px;
  align-self: start;
}
.filter-section-title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 10px;
}

.search-result-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-card);
  padding: 18px;
  transition: transform var(--t-spring), box-shadow var(--t-normal);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.search-result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
  border-color: rgba(29,52,97,0.20);
}
.search-result-cover {
  width: 56px; height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--color-gray-100);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

@media (max-width: 768px) {
  .search-layout { grid-template-columns: 1fr; }
  .search-filters { position: static; }
}

/* --------------------------------------------------------------------------
   FORMULAIRE INSCRIPTION — Steps premium
   -------------------------------------------------------------------------- */
.register-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #EEF2F8 0%, #E8ECF5 50%, #EDF0F5 100%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.register-header {
  background: linear-gradient(135deg, #0D1728, #1D3461);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.register-container {
  max-width: 660px;
  margin: 40px auto;
  padding: 0 24px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Step progress */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  position: relative;
}
.step-progress::before {
  content: '';
  position: absolute;
  top: 16px; left: 0; right: 0;
  height: 3px;
  background: rgba(29,52,97,0.12);
  border-radius: 9999px;
}
.step-progress-fill {
  position: absolute;
  top: 16px; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #1D3461, #C97B2C);
  border-radius: 9999px;
  transition: width 450ms var(--ease-spring);
  box-shadow: 0 0 12px rgba(201,123,44,0.40);
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(8px);
  border: 2.5px solid rgba(29,52,97,0.20);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--color-gray-400);
  position: relative; z-index: 1;
  transition: all var(--t-spring);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.step-dot.active {
  background: linear-gradient(135deg, #1D3461, #2A4B8A);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(29,52,97,0.35);
  transform: scale(1.10);
}
.step-dot.done {
  background: linear-gradient(135deg, #0A7E72, #13A394);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(10,126,114,0.30);
}

.step-panel {
  display: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.60);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.step-panel.active { display: block; animation: modal-in 0.30s var(--ease-spring) both; }

.step-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.step-subtitle {
  font-size: 14px;
  color: var(--color-gray-400);
  margin-bottom: 28px;
}

/* Radio options */
.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.radio-option { position: relative; }
.radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid rgba(29,52,97,0.15);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-normal);
  background: rgba(255,255,255,0.70);
  backdrop-filter: blur(8px);
}
.radio-label:hover {
  border-color: rgba(29,52,97,0.30);
  background: rgba(29,52,97,0.04);
}
.radio-option input[type="radio"]:checked + .radio-label {
  border-color: var(--color-primary);
  background: rgba(29,52,97,0.08);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(29,52,97,0.10);
}

/* Color picker */
.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}
.color-preview-btn {
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: none;
  cursor: default;
  transition: background var(--t-normal), box-shadow var(--t-normal);
  box-shadow: 0 4px 16px rgba(0,0,0,0.20);
}

/* Confirmation */
.confirm-panel {
  text-align: center;
  padding: 56px 36px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.60);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.confirm-icon { font-size: 64px; margin-bottom: 20px; }

/* --------------------------------------------------------------------------
   SUPERADMIN — Dashboard glass
   -------------------------------------------------------------------------- */
.superadmin-layout {
  display: grid;
  grid-template-columns: 256px 1fr;
  min-height: 100vh;
}

.superadmin-sidebar {
  background: linear-gradient(180deg, #070D1A 0%, #0A0F1E 50%, #080C18 100%);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  border-right: 1px solid rgba(255,255,255,0.05);
  box-shadow: 4px 0 32px rgba(0,0,0,0.25);
}

.superadmin-nav-item {
  padding: 11px 20px;
  font-size: 14px;
  font-family: var(--font-ui);
  color: rgba(255,255,255,0.48);
  cursor: pointer;
  transition: all var(--t-normal);
  border-radius: 12px;
  margin: 0 12px 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.superadmin-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.80);
}
.superadmin-nav-item.active {
  background: rgba(29,52,97,0.30);
  color: #fff;
  border-left: 3px solid #C97B2C;
  padding-left: 17px;
  box-shadow: inset 0 0 20px rgba(29,52,97,0.15);
}

.superadmin-content {
  background: linear-gradient(135deg, #F0EDE8 0%, #E8E4DD 100%);
  padding: 36px;
}

/* Approval card */
.approval-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.60);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--t-spring), box-shadow var(--t-normal);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.approval-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

@media (max-width: 900px) {
  .superadmin-layout { grid-template-columns: 1fr; }
  .superadmin-sidebar { display: none; }
}

/* --------------------------------------------------------------------------
   LEAFLET POPUP CUSTOM
   -------------------------------------------------------------------------- */
.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14) !important;
  border: 1px solid rgba(255,255,255,0.4) !important;
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(16px) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content { font-family: var(--font-ui) !important; font-size: 13px !important; margin: 0 !important; }
.map-popup { padding: 14px 16px; min-width: 200px; }
.map-popup-name { font-family: var(--font-heading); font-size: 14px; font-weight: 600; color: var(--color-gray-900); margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   MARQUEE COMMUNAUTÉ — infinite scroll
   -------------------------------------------------------------------------- */
@keyframes marquee-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-track {
  overflow: hidden;
  /* edge fade */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.marquee-inner {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee-left 35s linear infinite;
}
.marquee-inner.marquee-reverse {
  animation-name: marquee-right;
  animation-duration: 40s;
}
.marquee-track:hover .marquee-inner {
  animation-play-state: paused;
}

.comm-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.70);
  border-radius: 22px;
  padding: 18px 26px 18px 18px;
  min-width: 260px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.9) inset;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  color: inherit;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.comm-pill:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.14), 0 1px 0 rgba(255,255,255,0.9) inset;
  border-color: rgba(29,52,97,0.22);
}
.comm-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  margin-right: 3px;
  vertical-align: middle;
}
.comm-pill-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comm-pill-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-gray-900);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.comm-pill-meta {
  font-size: 12px;
  color: var(--color-gray-500);
  white-space: nowrap;
  font-family: var(--font-ui);
  margin-top: 3px;
}
.comm-pill-stats {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-gray-400);
  white-space: nowrap;
  font-family: var(--font-ui);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   LIVRES POPULAIRES — horizontal scroll cards
   -------------------------------------------------------------------------- */
.pop-book-card {
  flex-shrink: 0;
  width: 190px;
  scroll-snap-align: start;
  text-decoration: none;
  display: block;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s;
}
.pop-book-card:hover {
  transform: translateY(-10px) scale(1.03);
}
.pop-book-card:hover .pop-book-cover {
  box-shadow: 0 24px 60px rgba(0,0,0,0.28), 0 8px 20px rgba(29,52,97,0.18);
}

.pop-book-cover {
  position: relative;
  height: 272px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(0,0,0,0.18);
  margin-bottom: 12px;
  transition: box-shadow 0.35s;
}
.pop-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-smooth);
}
.pop-book-card:hover .pop-book-cover img {
  transform: scale(1.06);
}
.pop-book-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,13,26,0.75) 0%, rgba(5,13,26,0.15) 50%, transparent 100%);
}
.pop-book-status {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  z-index: 1;
  font-family: var(--font-ui);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pop-book-status.available { background: rgba(10,126,114,0.85); color: #fff; border: 1px solid rgba(255,255,255,0.20); }
.pop-book-status.loan      { background: rgba(201,123,44,0.85); color: #fff; border: 1px solid rgba(255,255,255,0.20); }
.pop-book-status.reserved  { background: rgba(124,58,237,0.85); color: #fff; border: 1px solid rgba(255,255,255,0.20); }

.pop-book-info { padding: 0 3px; }
.pop-book-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1.3;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: -0.01em;
}
.pop-book-author {
  font-size: 11.5px;
  color: var(--color-gray-400);
  font-family: var(--font-ui);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   TÉMOIGNAGES
   -------------------------------------------------------------------------- */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }
@media (min-width: 601px) and (max-width: 900px) { .testi-grid { grid-template-columns: repeat(2, 1fr); } }

.testi-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s;
}
.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.10);
}
.testi-card.testi-featured {
  background: linear-gradient(145deg, #fff 0%, #F0F4FF 100%);
  border-color: rgba(29,52,97,0.15);
  box-shadow: 0 8px 40px rgba(29,52,97,0.10);
}
.testi-stars { color: #C97B2C; font-size: 15px; letter-spacing: 2px; }
.testi-quote {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-gray-600);
  font-family: var(--font-ui);
  flex: 1;
  font-style: italic;
}
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.testi-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gray-900);
}
.testi-role { font-size: 11px; color: var(--color-gray-400); font-family: var(--font-ui); margin-top: 1px; }

/* --------------------------------------------------------------------------
   FOOTER PROFESSIONNEL — 4 colonnes
   -------------------------------------------------------------------------- */
.platform-footer-pro {
  background: #060B18;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
  position: relative;
}
.platform-footer-pro::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(29,52,97,0.5), rgba(201,123,44,0.35), transparent);
}

.footer-pro-top {
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
}
@media (max-width: 900px) {
  .footer-pro-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .footer-pro-top { grid-template-columns: 1fr; gap: 28px; }
}

.footer-col-brand {}
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 14px;
}
.footer-brand-tagline {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-ui);
  max-width: 280px;
  margin-bottom: 20px;
}
.footer-socials { display: flex; gap: 8px; }
.footer-social-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.footer-social-btn:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85); }

.footer-col-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}
.footer-col-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-link-pro {
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  text-decoration: none;
  font-family: var(--font-ui);
  transition: color 0.2s;
}
.footer-link-pro:hover { color: rgba(255,255,255,0.80); }

.footer-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  font-family: var(--font-ui);
  letter-spacing: 0.3px;
}

.footer-pro-bottom {
  width: calc(100% - 32px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copyright { font-size: 12px; color: rgba(255,255,255,0.28); font-family: var(--font-ui); }
.footer-legal-links { display: flex; gap: 20px; flex-wrap: wrap; }
.map-popup-meta { font-size: 12px; color: var(--color-gray-400); margin-bottom: 10px; }

/* ==========================================================================
   RESPONSIVE FIXES — Mobile-first overrides (consolidated)
   Following UX best practices: 44pt touch targets, no horizontal scroll,
   readable type, adaptive spacing, breakpoint-consistent layout.
   ========================================================================== */

/* Prevent horizontal scroll everywhere on mobile */
html, body { overflow-x: hidden; }

/* Use dynamic viewport units where appropriate (avoids mobile address-bar jump) */
@supports (height: 100dvh) {
  .hero-section { min-height: 100dvh; }
}

/* ---- Tablet & smaller (≤ 900px) ---- */
@media (max-width: 900px) {
  .section-platform { padding: 64px 20px; }
  .hero-section .hero-content,
  .hero-section [style*="padding:80px"],
  .hero-section [style*="padding:100px"],
  .hero-section [style*="padding:110px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  /* Hero text scaling */
  .hero-tagline { font-size: 17px; margin-bottom: 16px; }
  .hero-subtitle { font-size: 16px; }
  /* CTA section padding */
  .cta-section { padding: 72px 20px; }
  /* Footer adjusts */
  .footer-pro-top, .footer-pro-bottom { padding-left: 16px; padding-right: 16px; }
}

/* ---- Mobile (≤ 640px) ---- */
@media (max-width: 640px) {
  /* Container & section padding */
  .container { padding-left: 16px; padding-right: 16px; }
  .section-platform { padding: 48px 16px; }
  .cta-section { padding: 56px 16px; }

  /* Hero — tighter padding, smaller type */
  .hero-section { padding-top: 84px; }
  .hero-tagline { font-size: 16px; margin-bottom: 14px; }
  .hero-title { font-size: clamp(32px, 9vw, 44px) !important; line-height: 1.1; }
  .hero-subtitle { font-size: 15px; margin-bottom: 28px; }

  /* Hero actions — stack buttons full-width when wrapping */
  .hero-actions, .hero-section [style*="display:flex"][style*="flex-wrap:wrap"] {
    gap: 10px !important;
  }
  .hero-section .btn-accent.btn-xl,
  .hero-section .btn-accent.btn-lg,
  .hero-section .btn-ghost.btn-lg {
    font-size: 14px;
    padding: 12px 22px;
  }

  /* Buttons — ensure ≥44pt touch target on mobile */
  .btn-primary, .btn-accent, .btn-outline, .btn-ghost, .btn-teal, .btn-danger {
    min-height: 44px;
  }
  .btn-sm { min-height: 38px; padding: 8px 14px; }
  .footer-link-pro { padding: 4px 0; display: inline-block; min-height: 28px; }

  /* Decorative vertical dividers in inline stat rows — hide when wrapping */
  [style*="width:1px"][style*="background:rgba(255,255,255"],
  [style*="width:1px"][style*="background:rgba(0,0,0,0.08)"] {
    display: none !important;
  }

  /* Mobile menu padding adjustment */
  .mobile-menu { padding: 20px 16px; }

  /* Section title size */
  .section-title { font-size: clamp(26px, 6vw, 36px) !important; }
  .section-subtitle { font-size: 15px; }

  /* Comm-pill marquee speed up + smaller cards */
  .comm-pill { min-width: 220px; padding: 14px 18px 14px 14px; }
  .comm-pill-icon { width: 44px; height: 44px; }

  /* Pop book cards smaller on mobile */
  .pop-book-card { width: 156px !important; }
  .pop-book-cover { height: 224px !important; }

  /* Pricing card padding */
  .pricing-card { padding: 32px 24px; }

  /* Testimonials */
  .testi-card { padding: 22px; }

  /* CTA title */
  .cta-title { font-size: clamp(28px, 7vw, 36px) !important; }
  .cta-subtitle { font-size: 14px; }

  /* Tarifs compare table - allow horizontal scroll wrapper */
  .compare-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Inline form grids - single column */
  [style*="grid-template-columns:1fr 1fr"][style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }

  /* Two-column hero split (index.html photo + text) */
  .hero-section > [style*="display:flex"][style*="gap:48px"] {
    gap: 24px !important;
    padding: 90px 16px 50px !important;
  }
  .hero-content { flex: 1 1 100% !important; max-width: 100% !important; }
}

/* ---- Small mobile (≤ 480px) ---- */
@media (max-width: 480px) {
  /* Footer brand tagline takes less width */
  .footer-brand-tagline { font-size: 13px; }

  /* Section labels smaller */
  .section-label { font-size: 10px; }

  /* Card-style choice grid (inscription.html) single column */
  .choice-card { padding: 28px 22px; }

  /* Library cards in directory — full width with reduced gap */
  .lib-card { padding: 16px; }

  /* Stat number sizes when in glass strip */
  .hero-section [style*="font-family:var(--font-display)"][style*="font-size:34px"],
  .hero-section [style*="font-family:var(--font-display)"][style*="font-size:36px"] {
    font-size: 28px !important;
  }

  /* Mission card / value card padding tighten */
  .value-card, .mission-card { padding: 22px 20px; }
}

/* ---- Tiny screens (≤ 380px) ---- */
@media (max-width: 380px) {
  .hero-title { font-size: 28px !important; }
  .section-title { font-size: 22px !important; }
  .cta-title { font-size: 24px !important; }
  .btn-xl { font-size: 14px; padding: 12px 20px; }
  .nav-logo-text { font-size: 17px; }
}

/* ---- Touch-friendly inputs on mobile ---- */
@media (max-width: 768px) {
  .form-input, input[type="text"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="search"], textarea, select {
    font-size: 16px; /* prevents iOS zoom on focus */
    min-height: 44px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .blob { animation: none !important; }
  .marquee-inner { animation: none !important; }
}
