/* ================================================================
   FLSH Saïs Fès — Page d'accueil · Habillage institutionnel v3
   ----------------------------------------------------------------
   À charger APRÈS flsh-style.css. Toutes les règles sont limitées à
   body.page-home : les autres pages du site ne sont pas modifiées.
================================================================ */

body.page-home {
  --h-navy-950: #061a40;
  --h-navy-900: #0a2352;
  --h-navy-800: #0e2f68;
  --h-gold:     #c9a23a;
  --h-gold-soft:#e9d28a;
  --h-line:     #e4e9f2;
  --h-surface:  #f5f7fb;
  --h-radius:   14px;
  --h-shadow-1: 0 1px 2px rgba(10,35,82,.05), 0 1px 3px rgba(10,35,82,.06);
  --h-shadow-2: 0 4px 6px -1px rgba(10,35,82,.06), 0 12px 24px -6px rgba(10,35,82,.10);
  --h-shadow-3: 0 24px 48px -12px rgba(10,35,82,.22);
  background: var(--h-surface);
}

/* ── Accessibilité ─────────────────────────────────────────────── */
body.page-home .skip-link {
  position: absolute;
  top: -80px;
  inset-inline-start: 16px;
  z-index: 20000;
  padding: 10px 18px;
  background: var(--h-gold);
  color: var(--h-navy-950);
  font-weight: 800;
  border-radius: 0 0 10px 10px;
  transition: top .2s ease;
}
body.page-home .skip-link:focus { top: 0; }

body.page-home :focus-visible {
  outline: 3px solid rgba(201,162,58,.85);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Icônes SVG en ligne ───────────────────────────────────────── */
body.page-home .ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Topbar ────────────────────────────────────────────────────── */
body.page-home .topbar {
  background: var(--h-navy-950);
  min-height: 40px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.page-home .topbar-inner { padding: 4px 0; }
body.page-home .topbar-brand {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2px;
  opacity: .78;
}
body.page-home .top-links { gap: 4px; }
body.page-home .top-links a {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: .8rem;
  font-weight: 700;
  color: rgba(234,243,255,.9);
}
body.page-home .top-links a:hover {
  background: rgba(255,255,255,.09);
  border-color: transparent;
  transform: none;
  color: #fff;
}
body.page-home .top-links .top-cta {
  background: var(--h-gold);
  border-color: var(--h-gold);
  color: var(--h-navy-950);
}
body.page-home .top-links .top-cta:hover {
  background: var(--h-gold-soft);
  border-color: var(--h-gold-soft);
  color: var(--h-navy-950);
}

/* ── En-tête & navigation ──────────────────────────────────────── */
body.page-home .site-header {
  border-bottom: 1px solid var(--h-line);
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
}
body.page-home .site-header.scrolled {
  box-shadow: 0 8px 28px -10px rgba(10,35,82,.18);
}
body.page-home .header-inner { padding: 10px 0; }

@media (min-width: 901px) {
  body.page-home .nav-link,
  body.page-home .dd-toggle {
    padding: 10px 14px;
    font-size: .93rem;
    border-radius: 8px;
  }
  body.page-home .nav-link:hover,
  body.page-home .dd-toggle:hover {
    background: rgba(10,35,82,.045);
    color: var(--h-navy-900);
  }
  body.page-home .nav-link::after {
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 3px;
    background: linear-gradient(90deg, var(--h-gold), var(--h-gold-soft));
  }
  body.page-home .nav-link.active { color: var(--h-navy-900); }
  body.page-home .dropdown {
    border: 1px solid var(--h-line);
    border-radius: 12px;
    box-shadow: var(--h-shadow-3);
    padding: 8px;
    min-width: 240px;
  }
  body.page-home .dropdown a { padding: 10px 14px; font-weight: 700; }
  body.page-home .dropdown a:hover {
    background: #eef3fb;
    padding-inline-end: 14px;
    padding-inline-start: 18px;
  }
}

/* ── Hero ──────────────────────────────────────────────────────── */
body.page-home .hero { background: var(--h-navy-950); }
body.page-home .hero-bg { max-height: 580px; }
body.page-home .hero-overlay {
  background: linear-gradient(180deg, rgba(6,26,64,.35) 0%, rgba(6,26,64,.10) 45%, rgba(6,26,64,.55) 100%);
}
body.page-home .hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 4px;
  z-index: 2;
  background: linear-gradient(90deg, var(--h-gold), var(--c-sky), var(--h-gold));
}
body.page-home .hero:hover .hero-bg { transform: none; }

/* ── Titres de section ─────────────────────────────────────────── */
body.page-home .section { padding: 56px 0; }
body.page-home .section-head {
  text-align: center;
  margin-bottom: 34px;
}
body.page-home .section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0;
  color: var(--h-navy-900);
  margin-bottom: 0;
  padding-bottom: 4px;
}
body.page-home .section-title::after {
  bottom: -14px;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--h-gold), var(--h-gold-soft));
}
body.page-home .section-title-center::after {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  margin: 0;
}

/* ── Plateformes numériques (panneau flottant sur le hero) ─────── */
body.page-home #services {
  display: flow-root;
  position: relative;
  z-index: 3;
  padding: 0 0 56px;
  background: var(--h-surface);
}
body.page-home #services > .container {
  position: relative;
  margin-top: -68px;
  padding: 44px 40px 40px;
  background: #fff;
  border: 1px solid var(--h-line);
  border-top: 4px solid var(--h-gold);
  border-radius: 18px;
  box-shadow: var(--h-shadow-3);
}
body.page-home #services .section-head { margin-bottom: 28px; }

body.page-home .cards-5 { gap: 14px; }
body.page-home .digital-platform-card {
  min-height: 112px;
  padding: 16px 12px;
  gap: 8px;
  background: #f8faff;
  border: 1px solid var(--h-line);
  border-radius: var(--h-radius);
  box-shadow: none;
}
body.page-home .digital-platform-card::before {
  background: linear-gradient(90deg, var(--h-gold), var(--h-gold-soft));
  transform: scaleX(0);
}
body.page-home .digital-platform-card:hover {
  background: #fff;
  border-color: rgba(10,35,82,.18);
  box-shadow: var(--h-shadow-2);
  transform: translateY(-4px);
}
body.page-home .digital-platform-card:hover::before { transform: scaleX(1); }
body.page-home .platform-icon {
  background: #fff;
  box-shadow: 0 0 0 1px var(--h-line), var(--h-shadow-1);
}
body.page-home .digital-platform-card:hover .platform-icon {
  transform: scale(1.06);
  box-shadow: 0 0 0 1.5px var(--h-gold), 0 8px 18px rgba(201,162,58,.22);
}
body.page-home .platform-icon { width: 48px; height: 48px; }
body.page-home .platform-icon img { width: 34px; height: 34px; }
body.page-home .platform-name { color: var(--h-navy-900); font-size: .9rem; }

/* ── Annonces ──────────────────────────────────────────────────── */
body.page-home #actualites { background: var(--h-surface); }
body.page-home .grid-3 { gap: 20px; }

body.page-home .news-card {
  --accent: #0369a1;
  padding: 22px 24px 20px;
  border: 1px solid var(--h-line);
  border-top: 1px solid var(--h-line);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--h-radius);
  box-shadow: var(--h-shadow-1);
}
body.page-home .news-card:has(.tag-student)    { --accent: #059669; }
body.page-home .news-card:has(.tag-research)   { --accent: #0369a1; }
body.page-home .news-card:has(.tag-phd)        { --accent: #6d28d9; }
body.page-home .news-card:has(.tag-mobility)   { --accent: #c2410c; }
body.page-home .news-card:has(.tag-employment) { --accent: #a16207; }

body.page-home .news-card:hover {
  transform: translateY(-4px);
  border-color: #cfd8e6;
  border-top-color: #cfd8e6;
  border-inline-start-color: var(--accent);
  box-shadow: var(--h-shadow-2);
}
body.page-home .news-card.is-pinned-card {
  border: 1px solid #bbf7d0 !important;
  border-inline-start: 4px solid #10b981 !important;
  background: linear-gradient(180deg, #f3fdf7 0%, #fff 90px);
}
body.page-home .news-card .tag {
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .72rem;
  letter-spacing: .2px;
}
body.page-home .news-actions {
  padding-top: 14px;
  border-top: 1px solid #eef2f7;
}
body.page-home .news-actions a,
body.page-home .news-link--sm {
  background: #eef3fb;
  border: 1px solid #d9e3f3;
  color: var(--h-navy-900);
  border-radius: 8px;
  padding: 7px 14px;
}
body.page-home .news-actions a:hover,
body.page-home .news-link--sm:hover {
  background: var(--h-navy-900);
  border-color: var(--h-navy-900);
  color: #fff;
  box-shadow: 0 4px 10px rgba(10,35,82,.22);
}

body.page-home .all-news-cta-wrap { margin-top: 30px; }
body.page-home .all-news-cta {
  padding: 15px 34px;
  background: var(--h-navy-900);
  border-radius: 10px;
  box-shadow: 0 8px 20px -6px rgba(10,35,82,.45);
}
body.page-home .all-news-cta:hover {
  background: var(--h-navy-800);
  box-shadow: 0 14px 28px -8px rgba(10,35,82,.5);
}

/* ── Formations ────────────────────────────────────────────────── */
body.page-home #formations {
  background: #fff;
  border-top: 1px solid var(--h-line);
  border-bottom: 1px solid var(--h-line);
}
body.page-home .filters {
  justify-content: center;
  gap: 6px;
  margin: 0 auto 26px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  background: var(--h-surface);
  border: 1px solid var(--h-line);
  border-radius: 14px;
}
body.page-home .filter-btn {
  padding: 9px 20px;
  border: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #3b4b66;
  font-size: .86rem;
}
body.page-home .filter-btn:hover {
  background: #fff;
  color: var(--h-navy-900);
  transform: none;
  box-shadow: var(--h-shadow-1);
}
body.page-home .filter-btn.is-active {
  background: var(--h-navy-900);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(10,35,82,.4);
}

body.page-home .programs-grid { gap: 18px; }
body.page-home .program-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 112px;
  padding: 18px 20px 18px;
  background: #fff;
  border: 1px solid var(--h-line);
  border-inline-start: 4px solid transparent;
  border-radius: var(--h-radius);
  box-shadow: var(--h-shadow-1);
}
body.page-home .program-card:hover {
  background: #fbfcff;
  box-shadow: var(--h-shadow-2);
  transform: translateY(-3px);
}
body.page-home .program-card[data-type="licence"]  { border-inline-start-color: #0ea5d8; }
body.page-home .program-card[data-type="licencex"] { border-inline-start-color: #d99a0b; }
body.page-home .program-card[data-type="master"]   { border-inline-start-color: #10b981; }
body.page-home .program-card[data-type="masterx"]  { border-inline-start-color: #7c3aed; }
body.page-home .program-tag {
  margin: 0;
  border-radius: 6px;
  padding: 3px 10px;
}
body.page-home .program-card h3 {
  font-size: .96rem;
  line-height: 1.7;
  color: var(--h-navy-900);
  padding-inline-end: 22px;
}
body.page-home .program-card::after {
  content: '←';
  position: absolute;
  inset-inline-end: 46px;
  bottom: 14px;
  font-size: 15px;
  color: var(--h-gold);
  opacity: .7;
  transition: transform .25s ease, opacity .25s ease;
}
body.page-home .program-card:hover::after { transform: translateX(-4px); opacity: 1; }

/* Filières dont le lien n'est pas encore renseigné (href="") */
body.page-home .program-card[href=""] {
  pointer-events: none;
  cursor: default;
}
body.page-home .program-card[href=""]::after {
  content: 'قريبًا';
  inset-inline-end: 16px;
  bottom: 14px;
  padding: 2px 10px;
  font-size: .72rem;
  font-weight: 800;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  opacity: 1;
}

/* ── Statistiques (bandeau marine) ─────────────────────────────── */
body.page-home .section-stats {
  padding: 64px 0 68px;
  background:
    radial-gradient(900px 360px at 50% -8%, rgba(14,165,216,.20), transparent 65%),
    linear-gradient(180deg, var(--h-navy-800) 0%, var(--h-navy-900) 100%);
  color: #fff;
}
body.page-home .section-stats::after {
  background: linear-gradient(90deg, transparent, rgba(201,162,58,.55), transparent);
}
body.page-home .section-stats .section-title { color: #fff; }
body.page-home .section-stats .section-title::after {
  background: linear-gradient(90deg, var(--h-gold), var(--h-gold-soft));
}
body.page-home .stats-grid { gap: 28px; }
body.page-home .stat-card {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body.page-home .stat-card::after { height: 3px; opacity: .9; }
body.page-home .stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,.30);
  box-shadow: 0 24px 44px -16px rgba(0,0,0,.5);
}
body.page-home .stat-circle-track { stroke: rgba(255,255,255,.12); }
body.page-home .stat-circle-container::before { border-color: rgba(255,255,255,.18); }
body.page-home .stat-card[data-stat="students"]   .stat-circle-progress { stroke: #38bdf8; }
body.page-home .stat-card[data-stat="professors"] .stat-circle-progress { stroke: #e5c15d; }
body.page-home .stat-card[data-stat="admin"]      .stat-circle-progress { stroke: #34d399; }
body.page-home .stat-icon-blue,
body.page-home .stat-icon-gold,
body.page-home .stat-icon-teal {
  background: rgba(255,255,255,.10);
  color: var(--h-gold-soft);
}
body.page-home .stat-number { color: #fff; }
body.page-home .stat-plus   { color: var(--h-gold-soft); }
body.page-home .stat-label  { color: #fff; font-size: 1.2rem; }
body.page-home .stat-desc   { color: rgba(255,255,255,.7); }

/* ── Pied de page ──────────────────────────────────────────────── */
body.page-home .site-footer {
  background: var(--h-navy-950);
  border-top: 4px solid var(--h-gold);
}
body.page-home .footer-wave { display: none; }
body.page-home .footer-grid { padding: 48px 0 36px; gap: 36px; }
body.page-home .footer-logo-wrap { border-radius: 12px; }
body.page-home .footer-heading::after {
  height: 3px;
  background: linear-gradient(90deg, var(--h-gold), var(--h-gold-soft));
}
body.page-home .footer-list a:hover { color: var(--h-gold-soft); }
body.page-home .social-link {
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
body.page-home .contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: var(--h-gold-soft);
}
body.page-home .contact-icon .ico { width: 17px; height: 17px; }
body.page-home .sub-footer {
  background: rgba(0,0,0,.28);
  padding: 18px 0;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  body.page-home #services > .container { padding: 38px 28px 32px; }
}
@media (max-width: 900px) {
  /* Logo : le style en ligne (height:85px) de index.html annulait la règle mobile
     de flsh-style.css et poussait le bouton du menu hors de l'écran sur petits mobiles. */
  body.page-home .brand { min-width: 0; flex: 1 1 0; }
  body.page-home .brand img {
    height: 62px !important;
    max-height: 62px !important;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    object-position: right center;
  }
  body.page-home .section { padding: 44px 0; }
  body.page-home #services > .container { margin-top: -44px; }
}
@media (max-width: 700px) {
  body.page-home .section { padding: 36px 0; }
  body.page-home .section-head { margin-bottom: 26px; }
  body.page-home #services { padding-bottom: 36px; }
  body.page-home #services > .container {
    margin-top: -32px;
    padding: 22px 14px 16px;
    border-radius: 16px;
  }
  body.page-home #services .section-head { margin-bottom: 20px; }
  body.page-home .digital-platform-card { background: #f8faff; }
  /* Filtres des formations : « الكل » en pleine largeur, puis 2 × 2 */
  body.page-home .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    padding: 8px;
    margin-bottom: 22px;
  }
  body.page-home .filter-btn {
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
    font-size: .84rem;
    line-height: 1.3;
    text-align: center;
    background: #fff;
    border: 1px solid var(--h-line);
  }
  body.page-home .filter-btn:first-child { grid-column: 1 / -1; }
  body.page-home .filter-btn.is-active { border-color: var(--h-navy-900); }
  body.page-home .grid-3 { gap: 14px; }
  body.page-home .section-stats { padding: 44px 0 48px; }
}

/* Barre du haut : les 3 boutons passent à la ligne sur petits écrans */
@media (max-width: 600px) {
  body.page-home .topbar-inner { justify-content: center; }
  body.page-home .top-links {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 6px;
  }
  body.page-home .top-links a { padding: 5px 10px; font-size: .76rem; }
}

/* ── Mouvement réduit ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.page-home *,
  body.page-home *::before,
  body.page-home *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  body.page-home [data-reveal] { opacity: 1; transform: none; }
}


/* ================================================================
   Fond zellige (motif fourni)
   - chaque section a sa propre teinte, un peu plus sombre ;
   - le motif est très discret : voilé au centre, visible surtout
     sur les bords et dans les 4 coins de la section ;
   - les cartes et boutons reprennent le même motif dans leurs coins.
   Fichiers : images/zellige/*.png (filets transparents, 289×167 px)
================================================================ */

/* ── Titres de section : texte réellement centré ───────────────── */
body.page-home .section-head .section-title {
  display: block;
  text-align: center;
}

/* ── 1) Teintes par section + vignette + voile central ─────────── */
body.page-home #services   { --tone: 219,228,242; }
body.page-home #actualites { --tone: 208,220,238; }
body.page-home #formations { --tone: 217,226,241; }

body.page-home #services,
body.page-home #actualites,
body.page-home #formations {
  position: relative;
  background-color: rgb(var(--tone));
  background-image:
    radial-gradient(ellipse 95% 100% at 50% 50%, rgba(10,35,82,0) 50%, rgba(10,35,82,.17) 100%),
    radial-gradient(ellipse 72% 78% at 50% 50%, rgba(var(--tone), .90) 0%, rgba(var(--tone), .72) 55%, rgba(var(--tone), 0) 100%),
    url("images/zellige/zellige-blue-faint.png");
  background-size: auto, auto, 289px 167px;
  background-position: center, center, top center;
  background-repeat: no-repeat, no-repeat, repeat;
  box-shadow:
    inset 0 16px 20px -16px rgba(10,35,82,.20),
    inset 0 -16px 20px -16px rgba(10,35,82,.20);
}
/* le panneau flottant des plateformes ne doit pas être assombri en haut */
body.page-home #services { box-shadow: inset 0 -16px 20px -16px rgba(10,35,82,.20); }

/* Bandeau chiffres : bleu marine plus profond, motif clair très discret */
body.page-home .section-stats {
  background-color: #071b44;
  background-image:
    radial-gradient(ellipse 95% 100% at 50% 50%, rgba(2,10,30,0) 45%, rgba(2,10,30,.50) 100%),
    url("images/zellige/zellige-light-faint.png"),
    radial-gradient(900px 360px at 50% -8%, rgba(14,165,216,.16), transparent 65%),
    linear-gradient(180deg, #0b2a60 0%, #061a40 100%);
  background-size: auto, 289px 167px, auto, auto;
  background-position: center, top center, center, center;
  background-repeat: no-repeat, repeat, no-repeat, no-repeat;
}

/* Pied de page */
body.page-home .site-footer {
  background-color: #051536;
  background-image:
    radial-gradient(ellipse 95% 100% at 50% 50%, rgba(2,10,30,0) 45%, rgba(2,10,30,.45) 100%),
    url("images/zellige/zellige-light-faint.png");
  background-size: auto, 289px 167px;
  background-position: center, top center;
  background-repeat: no-repeat, repeat;
}

/* ── 2) Ornements d'angle des sections ──────────────────────────── */
@supports ((-webkit-mask-image: none) or (mask-image: none)) {
  body.page-home #services::before,
  body.page-home #actualites::before,
  body.page-home #formations::before,
  body.page-home .section-stats::before,
  body.page-home .site-footer::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    height: auto;
    z-index: 0;
    pointer-events: none;
    background-repeat: repeat;
    background-size: 289px 167px;
    background-position: top center;
    -webkit-mask-image:
      radial-gradient(circle 260px at 0 0,       #000, transparent),
      radial-gradient(circle 260px at 100% 0,    #000, transparent),
      radial-gradient(circle 260px at 0 100%,    #000, transparent),
      radial-gradient(circle 260px at 100% 100%, #000, transparent);
            mask-image:
      radial-gradient(circle 260px at 0 0,       #000, transparent),
      radial-gradient(circle 260px at 100% 0,    #000, transparent),
      radial-gradient(circle 260px at 0 100%,    #000, transparent),
      radial-gradient(circle 260px at 100% 100%, #000, transparent);
  }
  body.page-home #services::before,
  body.page-home #actualites::before,
  body.page-home #formations::before {
    background-image: url("images/zellige/zellige-blue.png");
    opacity: .38;
  }
  body.page-home .section-stats::before,
  body.page-home .site-footer::before {
    background-image: url("images/zellige/zellige-light.png");
    opacity: .5;
  }

  /* le contenu reste toujours au-dessus des motifs */
  body.page-home #services > .container,
  body.page-home #actualites > .container,
  body.page-home #formations > .container,
  body.page-home .section-stats > .container,
  body.page-home .site-footer > .container,
  body.page-home .site-footer > .sub-footer {
    position: relative;
    z-index: 1;
  }
}

/* ── 3) Mini-rosaces dans les coins des cartes et des boutons ─────
   Une rosace du motif zellige est posée dans chacun des 4 coins ;
   seul son quart de coin est visible et elle s'estompe vers l'intérieur,
   donc le texte reste toujours parfaitement lisible.
   Variables : --orn-img (couleur) · --orn-s (taille) · --orn-o (opacité) */
body.page-home .program-card,
body.page-home .news-card,
body.page-home .digital-platform-card,
body.page-home .news-actions a,
body.page-home .news-link--sm,
body.page-home .top-links .top-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --orn-img: url("images/zellige/rosette-blue.png");
  --orn-s: 108px;
  --orn-o: .9;
}

body.page-home .program-card::before,
body.page-home .news-card::after,
body.page-home .digital-platform-card::after,
body.page-home .news-actions a::before,
body.page-home .news-link--sm::before,
body.page-home .top-links .top-cta::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--orn-img), var(--orn-img), var(--orn-img), var(--orn-img);
  background-repeat: no-repeat;
  background-size: var(--orn-s) var(--orn-s);
  background-position:
    left  calc(var(--orn-s) / -2) top    calc(var(--orn-s) / -2),
    right calc(var(--orn-s) / -2) top    calc(var(--orn-s) / -2),
    left  calc(var(--orn-s) / -2) bottom calc(var(--orn-s) / -2),
    right calc(var(--orn-s) / -2) bottom calc(var(--orn-s) / -2);
  opacity: var(--orn-o);
  transition: opacity .25s ease;
}
body.page-home .program-card:hover::before,
body.page-home .news-card:hover::after,
body.page-home .digital-platform-card:hover::after { opacity: 1; }

/* Plateformes : cartes compactes */
body.page-home .digital-platform-card { --orn-s: 90px; }

/* Filières : rosace plus compacte (la flèche reste dégagée) */
body.page-home .program-card { --orn-s: 96px; }

/* Annonces : rosace un peu plus grande */
body.page-home .news-card { --orn-s: 116px; }

/* Petits boutons : rosace réduite, texte toujours dégagé */
body.page-home .news-actions a,
body.page-home .news-link--sm,
body.page-home .top-links .top-cta {
  --orn-img: url("images/zellige/rosette-blue-sm.png");
  --orn-s: 44px;
}
/* sur fond marine ou au survol : rosace claire */
body.page-home .news-actions a:hover,
body.page-home .news-link--sm:hover {
  --orn-img: url("images/zellige/rosette-light-sm.png");
}
/* bouton doré : motif marine très léger */
body.page-home .top-links .top-cta { --orn-o: .55; }

@media (max-width: 900px) {
  body.page-home #services,
  body.page-home #actualites,
  body.page-home #formations { background-size: auto, auto, 231px 134px; }
  body.page-home .section-stats { background-size: auto, 231px 134px, auto, auto; }
  body.page-home .site-footer { background-size: auto, 231px 134px; }
}
@media (max-width: 700px) {
  body.page-home #services::before,
  body.page-home #actualites::before,
  body.page-home #formations::before,
  body.page-home .section-stats::before,
  body.page-home .site-footer::before {
    background-size: 231px 134px;
    -webkit-mask-image:
      radial-gradient(circle 200px at 0 0,       #000, transparent),
      radial-gradient(circle 200px at 100% 0,    #000, transparent),
      radial-gradient(circle 200px at 0 100%,    #000, transparent),
      radial-gradient(circle 200px at 100% 100%, #000, transparent);
            mask-image:
      radial-gradient(circle 200px at 0 0,       #000, transparent),
      radial-gradient(circle 200px at 100% 0,    #000, transparent),
      radial-gradient(circle 200px at 0 100%,    #000, transparent),
      radial-gradient(circle 200px at 100% 100%, #000, transparent);
  }
}

/* ── Plateformes sur mobile : « تطبيق الطالب » seul, puis 2 par ligne ── */
@media (max-width: 700px) {
  body.page-home .cards-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.page-home .digital-platform-card {
    flex-direction: column;
    justify-content: center;
    min-height: 92px;
    padding: 12px 8px;
    gap: 6px;
    --orn-s: 64px;
  }
  body.page-home .digital-platform-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    min-height: 64px;
    padding: 10px 16px;
    gap: 12px;
  }
  body.page-home .platform-icon { width: 40px; height: 40px; }
  body.page-home .platform-icon img { width: 28px; height: 28px; }
  body.page-home .platform-name { font-size: .84rem; line-height: 1.35; }
  body.page-home .digital-platform-card:not(:first-child) .platform-arrow { display: none; }
  body.page-home .digital-platform-card:first-child .platform-arrow { bottom: 50%; margin-bottom: -9px; }
  body.page-home .footer-grid { padding: 36px 0 28px; gap: 24px; }
}

@media print {
  body.page-home #services::before,
  body.page-home #actualites::before,
  body.page-home #formations::before,
  body.page-home .section-stats::before,
  body.page-home .site-footer::before,
  body.page-home .program-card::before,
  body.page-home .news-card::after,
  body.page-home .digital-platform-card::after,
  body.page-home .news-actions a::before,
  body.page-home .news-link--sm::before,
  body.page-home .top-links .top-cta::before { display: none; }
}
