/* ===== Alternance (alternance.css) — mise en avant discrète de la recherche d'alternance =====
   Données : alternance-data.js. Trois surfaces : accueil (trois lignes, .hi-*), Windows (carte acrylique, info-bulle, menu Démarrer, .aw-*)
   et Linux (indicateur de la barre du haut + panneau, résultat de recherche, .al-*).
   Règles : aucune animation en boucle, transform / opacity seulement, jouées une fois ; coupées par prefers-reduced-motion,
   l'interrupteur « Animations » de Linux (body.no-anim) et le mode appareil modeste. Thèmes clair et sombre. */

/* ---------- Éléments communs ---------- */
.alt-num { font-variant-numeric: tabular-nums; }
/* Point « disponible » : une seule impulsion à l'arrivée (jamais en boucle) */
.alt-dot { position: relative; flex: none; width: .62em; height: .62em; border-radius: 50%; background: #2fbf71; }
.alt-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #2fbf71; opacity: 0; animation: altPulse 1.6s ease-out 1 both; }
@keyframes altPulse { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.8); } }
@keyframes altIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes altDrop { from { opacity: 0; transform: translateY(-14px); } }

/* ---------- ACCUEIL : trois tuiles d'identité + grille de « pixels » ---------- */
.boot-menu { grid-template-rows: auto auto 1fr auto; }
.boot-menu.hi-on .avail-wrap, .boot-menu.hi-on .role { display: none; }     /* le nom n'apparaît qu'une fois : dans le grand titre */
.hi { --hi-a: #83a7ff; --hi-b: #ff9a5a; --hi-c: #3ddc84; --hi-tile: #ffffff0f; --hi-line: #ffffff26; --hi-pix: #ffffff12;
  display: grid; justify-items: center; gap: 12px; width: min(720px, 100%); margin-top: -6px; text-align: center; }
.hi p { margin: 0; }
.hi-stage { position: relative; display: grid; place-items: center; width: 100%; padding: 10px 0; }
/* Grille décorative : les carrés sont dessinés par deux masques (aucun élément), seuls les carrés allumés sont des éléments */
.hi-pix { position: absolute; left: 50%; top: 50%; width: 644px; max-width: 100vw; height: 98px; overflow: hidden; transform: translate(-50%, -50%); pointer-events: none;
  background: linear-gradient(var(--hi-pix), var(--hi-pix));
  -webkit-mask: linear-gradient(90deg, #000 8px, #0000 0) 0 0 / 14px 14px, linear-gradient(#000 8px, #0000 0) 0 0 / 14px 14px, radial-gradient(closest-side, #000 55%, #0000);
  -webkit-mask-composite: source-in, source-in;
  mask: linear-gradient(90deg, #000 8px, #0000 0) 0 0 / 14px 14px, linear-gradient(#000 8px, #0000 0) 0 0 / 14px 14px, radial-gradient(closest-side, #000 55%, #0000);
  mask-composite: intersect; }
.hi-pix i { position: absolute; left: calc(var(--c) * 14px); top: calc(var(--r) * 14px); width: 8px; height: 8px; border-radius: 2px; background: var(--hi-a); opacity: .55;
  animation: hiPix .15s ease-out both; animation-delay: calc(var(--n) * 32ms + .15s); }
.hi-pix i:nth-child(3n + 2) { background: var(--hi-b); } .hi-pix i:nth-child(3n) { background: var(--hi-c); }
@keyframes hiPix { from { opacity: 0; transform: scale(.3); } }
.hi-tiles { position: relative; display: flex; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
html.lang-rtl .hi-tiles { flex-direction: row-reverse; }
.hi-tile { display: grid; justify-items: start; align-content: start; gap: 2px; width: 172px; min-height: 104px; padding: 12px 14px; border: 1px solid var(--hi-line); border-radius: 16px;
  background: var(--hi-tile); color: var(--fg); text-align: start; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: altIn .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 80ms + .1s); transition: transform .18s ease, border-color .18s; }
html.lang-rtl .hi-tile { direction: rtl; }
.hi-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--hi-tc) 60%, transparent); }
.hi-edu { --hi-tc: var(--hi-a); } .hi-iut { --hi-tc: var(--hi-b); } .hi-alt { --hi-tc: var(--hi-c); }
.hi-ic { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 10px; color: var(--hi-tc); background: color-mix(in srgb, var(--hi-tc) 16%, transparent); }
.hi-tile b { font: 700 14.5px/1.25 'DM Sans', system-ui, sans-serif; }
.hi-tile small { font: 500 12.5px/1.3 'DM Sans', system-ui, sans-serif; color: var(--muted); }
.hi-go { margin-top: 2px; font: 500 14px/1.4 'DM Sans', system-ui, sans-serif; color: var(--muted); }
.hi-arrow { margin-inline-start: .25em; font: 400 15px/1 'DM Sans', system-ui, sans-serif; }
.hi-go { animation: altIn .6s cubic-bezier(.2, .8, .2, 1) .4s both; }
:root[data-theme="light"] .hi { --hi-a: #2f5fd0; --hi-b: #c2410c; --hi-c: #0f7a43; --hi-tile: #ffffffb3; --hi-line: #12172b1f; --hi-pix: #12172b10; }
@media (prefers-reduced-motion: reduce) { .hi *, .alt-dot::after { animation: none !important; transition: none !important; } }
.perf-lite .hi * { animation: none !important; } .perf-lite .hi-tile { -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 899px) {
  .hi { gap: 8px; } .hi-pix { width: 364px; height: 84px; }
  .hi-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
  html.lang-rtl .hi-tiles { direction: rtl; }
  .hi-tile { width: auto; min-height: 0; padding: 10px; border-radius: 14px; }
  .hi-ic { width: 28px; height: 28px; margin-bottom: 4px; } .hi-ic .pi { width: 18px; height: 18px; }
  .hi-tile b { font-size: 12.5px; } .hi-tile small { font-size: 11px; }
  .hi-go { font-size: 13px; }
}

/* ---------- WINDOWS : carte acrylique (style Widgets de Windows 11) ---------- */
.aw-widget { --aw-fg: #17304d; --aw-mut: #4a627c; --aw-line: #17304d2e; --aw-bg: #f4f8fcd1; --aw-a: #2871b6;
  position: absolute; z-index: 8; width: 360px; max-width: calc(100% - 16px); border: 1px solid #ffffffa6; border-radius: 18px; color: var(--aw-fg); background: var(--aw-bg);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); box-shadow: 0 18px 50px #08203d55; font: 16px/1.4 'DM Sans', system-ui, sans-serif;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.aw-widget.is-on { opacity: 1; pointer-events: auto; transform: none; }
.aw-widget.is-off { display: none; }
.aw-widget.is-forced { position: fixed; z-index: 150; right: 12px; bottom: 76px; left: auto !important; top: auto !important; }
.aw-widget.is-drag { transition: none; cursor: grabbing; }
:root[data-theme="dark"] .aw-widget { --aw-fg: #eef4fc; --aw-mut: #b4c5da; --aw-line: #ffffff2e; --aw-bg: #182440d9; --aw-a: #7db4f2; border-color: #ffffff24; box-shadow: 0 18px 50px #000a; }
.aw-head { display: flex; align-items: center; gap: 10px; padding: 14px 10px 6px 18px; cursor: grab; user-select: none; }
.aw-title { display: flex; align-items: center; gap: .65em; flex: 1; min-width: 0; font-weight: 700; font-size: 17px; line-height: 1.3; }
.aw-title .alt-dot { width: 10px; height: 10px; }
.aw-min { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--aw-fg); font: 700 18px/1 inherit; cursor: pointer; }
.aw-min:hover { background: #17304d1a; }
:root[data-theme="dark"] .aw-min:hover { background: #ffffff1f; }
.aw-min:focus-visible, .aw-btn:focus-visible, .aw-tray:focus-visible, .aw-ri:focus-visible { outline: 2px solid var(--aw-a, #2871b6); outline-offset: 2px; }
.aw-body { padding: 8px 18px 18px; }
.aw-widget.is-min .aw-body { display: none; }
.aw-widget.is-min .aw-head { padding-bottom: 14px; }
.aw-act { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.aw-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 14px; border: 1px solid var(--aw-line); border-radius: 10px; background: #ffffff66; color: var(--aw-fg); font: 700 16px 'DM Sans', system-ui, sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .18s, background .18s, border-color .18s; }
.aw-btn:hover { transform: translateY(-1px); border-color: var(--aw-a); }
.aw-btn.primary { border-color: transparent; background: linear-gradient(95deg, #1f62a8, #6a45cc); color: #fff; }
:root[data-theme="dark"] .aw-btn { background: #ffffff17; }
:root[data-theme="dark"] .aw-btn.primary { background: linear-gradient(95deg, #2a6fb8, #7a4fd6); }
/* Zone de notification */
.aw-tray { position: absolute; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; font-size: 11px; cursor: pointer; }
.aw-tray:hover { background: #17304d1a; } :root[data-theme="dark"] .aw-tray:hover { background: #ffffff22; }
.aw-tray .alt-dot { width: 10px; height: 10px; }
.aw-tip { position: fixed; z-index: 9100; max-width: min(340px, calc(100vw - 16px)); padding: 7px 11px; border-radius: 8px; background: #17304df2; color: #fff; font: 600 12.5px/1.35 'DM Sans', system-ui, sans-serif; box-shadow: 0 10px 28px #0007; pointer-events: none; }
.aw-tip[hidden] { display: none; }
/* Menu Démarrer : deux entrées sous « Recommandé » */
.aw-reco { display: grid; gap: 4px; margin-top: 6px; }
.aw-ri { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: 600 13px 'DM Sans', system-ui, sans-serif; text-align: start; cursor: pointer; }
.aw-ri:hover { background: #2871b61c; }
.aw-ri > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #2871b61f; }
.start-menu.searching .aw-reco { display: none; }
@media (max-width: 899px) { .aw-widget:not(.is-forced) { display: none; } }
@media (prefers-reduced-motion: reduce) { .aw-widget { animation: none !important; transition: none !important; } }
.perf-lite .aw-widget { -webkit-backdrop-filter: none; backdrop-filter: none; background: #f4f8fcf2; }
:root[data-theme="dark"].perf-lite .aw-widget { background: #182440f2; }

/* ---------- LINUX : indicateur de la barre du haut + panneau GNOME ---------- */
.top.al-on .avail-top { display: none; }                      /* l'indicateur ci-dessous remplace la petite pastille */
.top .al-top { position: absolute; left: calc(50% + 92px); top: 4px; display: inline-flex; align-items: center; gap: .55em; height: 26px; padding: 0 11px; border-radius: 14px; font: 600 12px var(--font, system-ui); letter-spacing: .01em; }
.top .al-top .alt-dot { width: 8px; height: 8px; }
@media (max-width: 899px) { .top .al-top { display: none; } }
.al-panel { position: fixed; z-index: 3100; top: 40px; width: min(360px, calc(100vw - 16px)); padding: 16px 18px 18px; border: 1px solid #ffffff1c; border-radius: 22px; background: #1d1424f2; color: #f5f1f7; box-shadow: 0 24px 60px #000a; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); font: 16px/1.4 var(--font, system-ui); animation: altDrop .3s cubic-bezier(.2, .8, .2, 1) both; }
.al-panel[hidden] { display: none; }
.al-head { display: flex; align-items: center; gap: .65em; margin: 0 0 14px; font-size: 17px; line-height: 1.3; }
.al-head .alt-dot { width: 10px; height: 10px; }
.al-ht { flex: 1; min-width: 0; font-weight: 700; }
.al-x { flex: none; width: 30px; height: 30px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: transparent; color: #f5f1f7; font-size: 20px; line-height: 1; cursor: pointer; }
.al-x:hover { background: #ffffff26; }
.al-body, .al-card { display: grid; gap: 12px; }
.al-act { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.al-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 14px; border: 1px solid #ffffff3a; border-radius: 12px; background: #ffffff17; color: #fff; font: 700 16px var(--font, system-ui); text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .18s, background .18s, border-color .18s; }
.al-btn:hover { transform: translateY(-1px); background: #ffffff2b; }
.al-btn.primary { border-color: transparent; background: #c2410c; }
.al-btn.primary:hover { background: #d4490f; }
.al-btn:focus-visible, .al-x:focus-visible { outline: 2px solid #ffb08a; outline-offset: 2px; }
/* Activités : carte de résultat */
.al-card { padding: 16px 18px 18px; border-radius: 18px; background: #ffffff1f; color: #fff; text-align: start; }
.al-card .al-head { margin: 0 0 2px; }
/* À propos : ligne système (aucune règle : même style que les autres lignes de la liste) */
@media (prefers-reduced-motion: reduce) { .al-panel { animation: none !important; } }
body.no-anim .al-panel, .perf-lite .al-panel { animation: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.no-anim .alt-dot::after { animation: none !important; }
