/* MODULES SPECIFIC CSS */

/* PAGE HERO */
    .page-hero { padding-top: 68px; background: linear-gradient(160deg, #6E2F12 0%, #4A1F0C 55%, #3A1809 100%); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
    .page-hero::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
    .page-hero-watermark { position: absolute; right: 60px; top: 50%; transform: translateY(-50%); font-family: 'Amiri', serif; font-size: 13rem; line-height: 1; color: rgba(255,255,255,0.035); user-select: none; pointer-events: none; letter-spacing: -0.03em; }
    .page-hero-content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; width: 100%; padding: 22px 48px 46px; }
    .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.63rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
    .breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s; }
    .breadcrumb a:hover { color: var(--gold-lt); }
    .breadcrumb span { color: var(--bg); }
    .breadcrumb-sep { color: rgba(255,255,255,0.25); }
    .page-hero-tag { display: inline-flex; align-items: center; gap: 8px; padding: 3px 11px; border-radius: 999px; background: rgba(160,120,40,0.2); border: 1px solid rgba(160,120,40,0.4); color: var(--gold-lt); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-family: 'Raleway', sans-serif; margin-bottom: 8px; }
    .page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; margin-bottom: 10px; line-height: 1.1; }
    .page-hero h1 em { font-style: italic; color: var(--bg); }
    .hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
    .hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); font-family: 'Raleway', sans-serif; font-size: 0.72rem; font-weight: 600; color: #fff; letter-spacing: 0.01em; backdrop-filter: blur(4px); transition: background 0.25s, border-color 0.25s, color 0.25s; cursor: default; }
    .hero-badge:hover { background: rgba(160,120,40,0.35); border-color: rgba(196,154,54,0.5); color: var(--gold-lt); }
    .hero-badge svg { opacity: 0.85; flex-shrink: 0; }
    .hero-badge:hover svg { opacity: 1; }
    .page-hero-desc { font-size: 0.93rem; color: rgba(255,255,255,0.65); max-width: 720px; line-height: 1.65; font-weight: 400; }

    
/* LAYOUT */
    .page-body { max-width: 1200px; margin: 0 auto; padding: 36px 48px 72px; }

    /* SECTION HEADER */
    .section-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dk); font-family: 'Raleway', sans-serif; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
    .section-label::before { content: ''; display: inline-block; width: 28px; height: 1.5px; background: var(--gold-dk); }
    .section-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); color: var(--text); margin-bottom: 16px; }
    .section-subtitle { font-size: 1rem; color: var(--muted); line-height: 1.7; max-width: 600px; margin-bottom: 40px; }

    /* FILTRES */
    .filters-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
    .filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
    .filter-tab { padding: 7px 16px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-family: 'Raleway', sans-serif; background: none; border: 1.5px solid transparent; color: var(--muted); cursor: pointer; transition: all 0.18s; }
    .filter-tab:hover { background: rgba(26,82,52,0.06); color: var(--green); }
    .filter-tab.active { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 2px 8px rgba(26,82,52,0.18); }
    .search-input-wrap { position: relative; }
    .search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
    .search-input { padding: 8px 14px 8px 36px; border-radius: 9px; border: 1.5px solid var(--border-strong); background: var(--surface); font-family: 'Raleway', sans-serif; font-size: 0.83rem; color: var(--text); width: 220px; transition: border-color 0.2s, box-shadow 0.2s; outline: none; }
    .search-input:focus { border-color: rgba(26,82,52,0.4); box-shadow: 0 0 0 3px rgba(26,82,52,0.08); }
    .search-input::placeholder { color: var(--faint); }

    /* TOGGLE masquer terminés */
    .filter-actions { display: flex; align-items: center; gap: 16px; }
    .toggle-wrap { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
    .toggle-label { font-size: 0.73rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; white-space: nowrap; }
    .toggle-track { width: 36px; height: 20px; border-radius: 10px; background: var(--bg3); border: 1.5px solid var(--border-strong); position: relative; transition: background 0.25s, border-color 0.25s; flex-shrink: 0; }
    .toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1); }
    .toggle-wrap.active .toggle-track { background: var(--green); border-color: var(--green); }
    .toggle-wrap.active .toggle-track::after { transform: translateX(16px); }

    /* Transition masquage smooth */
    .modules-grid.hide-past .module-card.past { display: none !important; }

    /* MODULES GRID */
    .modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

    /* MODULE CARD */
    .module-card { background: #FDFAF5; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; position: relative; display: flex; flex-direction: column; }
    .module-card:hover { border-color: rgba(26,82,52,0.28); box-shadow: 0 8px 28px rgba(26,82,52,0.1); transform: translateY(-2px); }

    /* MODULE PASSÉ */
    .module-card.past { opacity: 0.45; filter: grayscale(0.85) brightness(0.95); pointer-events: none; }
    .module-card.past:hover { transform: none; box-shadow: none; border-color: var(--border); }
    .module-card.past .module-card-header { background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%); }
    .module-card.past .module-card-header.coran-header   { background: linear-gradient(135deg, #3a3828 0%, #2a2818 100%); }
    .module-card.past .module-card-header.arabe-header   { background: linear-gradient(135deg, #4a3a3a 0%, #3a2a2a 100%); }
    .module-card.past .module-card-header.sciences-header{ background: linear-gradient(135deg, #3a3a4a 0%, #2a2a3a 100%); }
    .module-card.past .module-card-header.rose-header    { background: linear-gradient(135deg, #4a3a3a 0%, #3a2a2a 100%); }
    .module-card.past .module-card-header.culture-header { background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%); }
    .module-card.past .btn-module { background: var(--faint); box-shadow: none; cursor: default; }
    .module-card.past .module-places-fill { background: var(--faint); }
    .module-past-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-family: 'Raleway', sans-serif; color: rgba(255,255,255,0.8); }

    /* MODULE RÉSERVÉ */
    .module-card.locked { position: relative; pointer-events: none; }
    .module-card.locked .module-card-header,
    .module-card.locked .module-card-body,
    .module-card.locked .module-card-footer { filter: blur(6px); opacity: 0.45; }
    .module-card.locked:hover { transform: none; box-shadow: none; }
    .module-locked-overlay {
      position: absolute; inset: 0; z-index: 5;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
      background: rgba(244,239,230,0.35);
      border-radius: 18px;
      padding: 32px;
    }
    .module-locked-icon {
      width: 48px; height: 48px; border-radius: 50%;
      background: rgba(26,82,52,0.1); border: 1.5px solid rgba(26,82,52,0.2);
      display: flex; align-items: center; justify-content: center;
      color: var(--green);
    }
    .module-locked-text {
      font-family: 'DM Serif Display', serif;
      font-size: 1.05rem; color: var(--text); text-align: center; line-height: 1.3;
    }
    .module-locked-sub {
      font-family: 'Raleway', sans-serif;
      font-size: 0.75rem; color: var(--muted); text-align: center; line-height: 1.5; max-width: 240px;
    }
    .module-ribbon { position: absolute; top: 16px; right: -1px; background: var(--gold); color: #fff; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-family: 'Raleway', sans-serif; padding: 4px 12px 4px 10px; border-radius: 4px 0 0 4px; box-shadow: -2px 2px 8px rgba(0,0,0,0.15); }

    /* Headers couleur — alignés sur Inscriptions.html */
    .module-card-header { padding: 22px 24px 18px; background: linear-gradient(135deg, #6E2F12 0%, #4A1F0C 100%); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
    .module-card-header.coran-header   { background: linear-gradient(145deg, #5C3A08 0%, #331F04 100%); }
    .module-card-header.arabe-header   { background: linear-gradient(145deg, #6E2433 0%, #3C1018 100%); }
    .module-card-header.sciences-header{ background: linear-gradient(145deg, #2B4A7A 0%, #152740 100%); }
    .module-card-header.rose-header    { background: linear-gradient(145deg, #6e1e38 0%, #3c0d1e 100%); }
    .module-card-header.culture-header { background: linear-gradient(145deg, #4a3828 0%, #2c1e12 100%); }
    .module-card-ar-watermark { position: absolute; right: 12px; bottom: -10px; font-family: 'Amiri', serif; font-size: 5.5rem; line-height: 1; color: rgba(255,255,255,0.07); user-select: none; pointer-events: none; }
    .module-card-badges { display: flex; gap: 6px; flex-wrap: wrap; position: relative; z-index: 1; }
    .module-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-family: 'Raleway', sans-serif; color: rgba(255,255,255,0.85); }
    .module-badge.gold { background: rgba(160,120,40,0.3); border-color: rgba(196,154,54,0.45); color: var(--gold-lt); }
    .module-badge.culture { background: rgba(180,140,80,0.25); border-color: rgba(180,140,80,0.4); color: #d4b877; }
    .module-icon { display: none; }
    .module-title { font-family: 'DM Serif Display', serif; font-size: 1.15rem; color: #fff; line-height: 1.2; position: relative; z-index: 1; }
    .module-title em { font-style: italic; color: var(--gold-lt); }

    /* Corps */
    .module-card-body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
    .module-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.65; font-weight: 400; flex: 1; }
    .module-meta { display: flex; flex-direction: column; gap: 7px; }
    .module-meta-row { display: flex; align-items: center; gap: 8px; font-size: 0.79rem; color: var(--muted); font-weight: 500; }
    .module-meta-row svg { color: var(--faint); flex-shrink: 0; }
    .module-places-wrap { margin-top: 2px; }
    .module-places-label { display: flex; justify-content: space-between; font-size: 0.68rem; font-weight: 700; color: var(--faint); letter-spacing: 0.04em; margin-bottom: 5px; }
    .module-places-label span:last-child { color: var(--gold-dk); }
    .module-places-track { height: 4px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
    .module-places-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--green), var(--green-xl)); transition: width 1.2s cubic-bezier(0.4,0,0.2,1); width: 0%; }

    /* Footer carte */
    .module-card-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .module-price { display: flex; flex-direction: column; gap: 1px; }
    .module-price-label { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-family: 'Raleway', sans-serif; }
    .module-price-value { font-family: 'DM Serif Display', serif; font-size: 1.3rem; color: var(--text); }
    .module-price-value span { font-size: 0.78rem; color: var(--muted); font-family: 'Raleway', sans-serif; font-weight: 500; }
    .btn-module { padding: 9px 18px; border-radius: 9px; background: var(--green); color: #fff; font-family: 'Raleway', sans-serif; font-size: 0.78rem; font-weight: 700; text-decoration: none; letter-spacing: 0.03em; transition: background 0.2s, transform 0.2s, box-shadow 0.2s; box-shadow: 0 2px 8px rgba(26,82,52,0.2); white-space: nowrap; }
    .btn-module:hover { background: var(--green-lt); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,82,52,0.28); }

    /* État vide */
    .modules-empty { display: none; grid-column: 1 / -1; text-align: center; padding: 72px 24px; color: var(--faint); }
    .modules-empty .empty-icon { font-family: 'Amiri', serif; font-size: 4rem; color: var(--bg3); display: block; margin-bottom: 16px; }

    

    
/* RESPONSIVE */
@media (max-width: 960px) {
  .page-hero { padding-top: 76px; }
  .page-hero-content { padding: 24px 24px 36px; }
  .page-hero-watermark { right: 20px; font-size: 8.5rem; }
  .page-body { padding: 28px 24px 56px; }
  .filters-bar { flex-direction: column; align-items: stretch; gap: 16px; }
  .filter-actions { flex-direction: column; align-items: stretch; width: 100%; gap: 12px; }
  .toggle-wrap { width: 100%; justify-content: space-between; }
  .search-input-wrap { width: 100%; }
  .search-input { width: 100%; box-sizing: border-box; }
  .modules-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 640px) {
  .page-hero { padding-top: 80px; }
  .page-hero-content { padding: 20px 18px 30px; }
  .page-hero-watermark { right: 10px; font-size: 6.5rem; opacity: 0.7; }
  .breadcrumb { flex-wrap: wrap; row-gap: 4px; }
  .page-hero h1 { font-size: clamp(1.55rem, 6.5vw, 2rem); }
  .page-hero-desc { font-size: 0.86rem; }
  .page-body { padding: 22px 16px 48px; }
  .filters-bar { margin-bottom: 22px; padding-bottom: 18px; }
  .filter-tabs { gap: 6px; width: 100%; }
  .filter-tab { padding: 7px 13px; font-size: 0.72rem; }
  .filter-actions { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
  .toggle-wrap { width: 100%; justify-content: space-between; }
  .search-input-wrap { width: 100%; }
  .search-input { width: 100%; box-sizing: border-box; }
  .modules-grid { grid-template-columns: 1fr; gap: 16px; }
  .module-card-header { padding: 18px 18px 16px; }
  .module-card-body { padding: 18px; }
  .module-card-footer { padding: 14px 18px; }
}
