/* Accueil de rap-france.com (français et anglais), chargé après site.css : un disque qui tourne comme un vinyle, le
   titre, puis le choix entre deux portes, « Le jeu » et « Le serveur Discord », les vedettes de la page : grandes,
   éclairées chacune de sa couleur, elles penchent vers la souris (js/site.js, data-incline) et, au survol, montrent un
   aperçu qui bouge (le montage d'un clip pour le jeu, une discussion pour le serveur). À la première visite, la porte
   d'entrée du site (js/intro.js, styles dans site.css) se joue d'abord ; l'accueil entre en scène juste après. La mise
   en page ne dépend d'aucune classe posée par le JavaScript : sans lui, l'accueil s'affiche directement, complet.
   Couleurs : l'accueil est neutre (blanc sur nuit) ; chaque porte porte le thème de sa partie (theme-jeu : or ;
   theme-serveur : bleu Discord et turquoise, voir « les deux thèmes » dans site.css). */

/* ------------------------------------------------------------------------------------------------ ouverture */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100vh - 68px); min-height: calc(100svh - 68px); padding: clamp(18px, 3.4vh, 48px) 0 clamp(32px, 6vh, 72px);
}
.hero-fond { position: absolute; inset: 0; z-index: -2; background: #07080d; }
.hero-fond img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero-voile {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 32%, rgba(7, 8, 13, 0.25), rgba(7, 8, 13, 0.82) 75%),
    linear-gradient(180deg, rgba(7, 8, 13, 0.55) 0%, transparent 30%, rgba(12, 13, 22, 0.75) 70%, var(--dc-nuit) 100%);
}
.hero-dedans { display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2.4vh, 30px); }
.hero-tete { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-titre {
  margin: 0; font-family: var(--police-titre); font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.86;
  font-size: clamp(3rem, min(8.6vw, 11.5vh), 7.4rem); color: #fff; text-shadow: 0 12px 50px rgba(0, 0, 0, 0.55);
}
.hero-titre span { display: inline-block; }
.hero-titre span:last-child { padding: 0.16em 0; margin: -0.16em 0; background: linear-gradient(180deg, #fff 30%, #c9ccd8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@supports not ((background-clip: text) or (-webkit-background-clip: text)) { .hero-titre span:last-child { color: #fff; } }
.hero-accroche { margin: 12px 0 0; font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.45rem); color: #e8e9f0; text-wrap: balance; }

/* le disque : le logo recoloré de l'intro, qui tourne lentement comme un vinyle ; le reflet et les sillons ne tournent
   pas (c'est la lumière de la scène), le halo aux couleurs du site respire derrière */
.hero-disque { position: relative; isolation: isolate; display: block; width: clamp(76px, 11.5vh, 140px); aspect-ratio: 1; margin-bottom: clamp(10px, 1.8vh, 18px); border-radius: 50%; }
.hero-disque img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16), 0 22px 44px -14px rgba(0, 0, 0, 0.9); animation: vinyle 16s linear infinite; }
.hero-disque::before {
  content: ""; position: absolute; inset: -16%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 180deg, #ffb53d, #ffb53d 25%, #5865f2 50%, #5865f2 75%, #ffb53d);
  -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%);
  filter: blur(18px); opacity: 0.5; animation: respire 4.2s ease-in-out infinite;
}
.hero-disque::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.3), transparent 42%),
    conic-gradient(from 210deg, transparent 0 6%, rgba(255, 255, 255, 0.2) 11%, transparent 17% 54%, rgba(255, 255, 255, 0.13) 60%, transparent 67%),
    repeating-radial-gradient(circle, transparent 0 3px, rgba(255, 255, 255, 0.05) 3px 4px);
}
@keyframes vinyle { to { rotate: 1turn; } }
@keyframes respire { 50% { scale: 1.14; opacity: 0.85; } }

/* « Choisis ta porte » */
.portes-choisis {
  display: flex; align-items: center; gap: 14px; margin: 0; color: #c9cbd6;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase;
}
.portes-choisis::before, .portes-choisis::after { content: ""; width: clamp(28px, 6vw, 80px); height: 2px; border-radius: 1px; background: linear-gradient(90deg, transparent, #ffb53d); }
.portes-choisis::after { background: linear-gradient(90deg, #5865f2, transparent); }

/* ------------------------------------------------------------------------------------------------ les deux portes */
.portes { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3.2vw, 48px); width: 100%; perspective: 1500px; }
/* le halo de chaque porte, derrière elle, qui respire ; plus fort quand on s'en approche */
.portes::before, .portes::after {
  content: ""; position: absolute; z-index: -1; top: 6%; bottom: -4%; width: 50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 181, 61, 0.42), rgba(255, 90, 54, 0.12) 60%, transparent);
  filter: blur(36px); opacity: 0.55; transition: opacity 0.5s; animation: halo 5s ease-in-out infinite;
}
.portes::before { left: -3%; }
.portes::after { right: -3%; background: radial-gradient(closest-side, rgba(88, 101, 242, 0.6), rgba(45, 212, 174, 0.18) 60%, transparent); animation-delay: -2.5s; }
.portes:has(.porte-jeu:hover, .porte-jeu:focus-within)::before, .portes:has(.porte-serveur:hover, .porte-serveur:focus-within)::after { opacity: 1; }
@keyframes halo { 50% { scale: 1.08; } }

.porte {
  --lueur: rgba(var(--accent-rgb), 0.75);
  --rx: 0deg; --ry: 0deg; --monte: 0px; --mx: 50%; --my: 30%;
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(360px, 50vh, 560px);
  border-radius: 22px; background: #0b0b12; color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px -36px rgba(0, 0, 0, 0.95);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s, filter 0.4s;
}
.porte-serveur { --lueur: rgba(var(--accent-rgb), 0.85); }
/* le relief n'existe qu'au survol (au repos, aucune transformation : rendu net, captures d'écran comprises) */
.porte:hover, .porte:focus-within, .porte.suit { transform: translateY(var(--monte)) rotateX(var(--rx)) rotateY(var(--ry)); }
.porte.suit { transition: transform 0.12s linear, box-shadow 0.4s, filter 0.4s; }
/* le fond (image, aperçu du jeu, dégradé) est découpé aux coins arrondis ; l'aperçu du serveur, lui, peut dépasser */
.porte-fond { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; isolation: isolate; }
.porte-fond::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(8, 8, 14, 0.97) 0%, rgba(8, 8, 14, 0.82) 38%, rgba(8, 8, 14, 0.2) 72%, rgba(8, 8, 14, 0.35) 100%);
}
/* la bannière du serveur porte déjà un grand logo : le bas de la porte est plus sombre pour que le texte reste net */
.porte-serveur .porte-fond::after { background: linear-gradient(0deg, rgba(8, 8, 14, 0.97) 0%, rgba(8, 8, 14, 0.9) 46%, rgba(8, 8, 14, 0.5) 74%, rgba(8, 8, 14, 0.3) 100%); }
/* l'affiche du jeu est lumineuse (scène, projecteurs) : un voile plus dense sous le texte */
.porte-jeu .porte-fond::after { background: linear-gradient(0deg, rgba(10, 8, 6, 0.97) 0%, rgba(10, 8, 6, 0.88) 46%, rgba(10, 8, 6, 0.42) 76%, rgba(10, 8, 6, 0.4) 100%); }
.porte-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s; }
.porte-serveur .porte-image { object-position: 50% 30%; }
/* contour de la couleur de la porte et reflet qui suit la souris */
.porte::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.13), transparent 60%);
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 70px -12px var(--accent); opacity: 0; transition: opacity 0.35s;
}
.porte-dedans { display: grid; grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 8px 14px; padding: clamp(22px, 2.6vw, 36px); }
.porte-dedans > * { grid-column: 1 / -1; }
/* la vignette (logo) et l'étiquette sur la même ligne, pareil sur les deux portes */
.porte-dedans > .porte-logo { grid-column: 1; }
.porte-dedans > .porte-etiquette { grid-column: 2; }
.porte-jeu .porte-dedans { padding-bottom: calc(clamp(22px, 2.6vw, 36px) + 12px); padding-left: calc(clamp(22px, 2.6vw, 36px) + 6px); }
.porte-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 10px 26px rgba(0, 0, 0, 0.6); margin: 0 0 4px; transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.porte-etiquette { margin: 0; padding: 4px 10px 3px; border-radius: 4px; background: var(--accent); color: var(--accent-encre); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.porte-titre { margin: 4px 0 0; font-family: var(--police-titre); font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.92; font-size: clamp(1.9rem, 3.4vw, 3.1rem); text-wrap: balance; text-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }
.porte-texte { margin: 0; max-width: 30rem; color: #c9cbd6; }
.porte-points { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.porte-points li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); font-weight: 600; font-size: 0.82rem; color: #eceef4; }
.porte-points li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-vif); box-shadow: 0 0 8px var(--accent-vif); }
.porte-serveur .porte-points li::before { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.porte-info { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: #e8e9f0; font-weight: 600; font-size: 0.95rem; }
.porte-info strong { font-variant-numeric: tabular-nums; }
.porte-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 10px; }
.porte-actions .bouton { z-index: 2; }
.porte-lien {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - 8px) / 100% 2px no-repeat;
}
.porte-serveur .porte-lien { background-image: linear-gradient(var(--accent-2), var(--accent-2)); }
.porte-lien::after { content: "→"; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
/* toute la porte s'ouvre d'un clic : le lien « Découvrir… » la couvre entière (les boutons restent au-dessus) */
.porte-lien::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 22px; }
.porte-lien:focus-visible { outline: none; }
.porte-lien:focus-visible::before { outline: 3px solid var(--accent-vif); outline-offset: 4px; }
.porte .point-vert { animation: vivant 2.2s ease-in-out infinite; }
@keyframes vivant { 50% { box-shadow: 0 0 0 7px rgba(35, 165, 90, 0); } 0%, 100% { box-shadow: 0 0 0 3px rgba(35, 165, 90, 0.35); } }

/* au survol (ou au clavier) : la porte monte vers toi, s'éclaire, son aperçu se joue ; l'autre s'efface un peu */
.porte:hover, .porte:focus-within { --monte: -8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 50px 100px -34px var(--lueur), 0 0 60px -20px var(--lueur); }
.porte:hover::after, .porte:focus-within::after { opacity: 1; }
.porte:hover .porte-image, .porte:focus-within .porte-image { transform: scale(1.06); }
.porte:hover .porte-logo, .porte:focus-within .porte-logo { transform: rotate(-6deg) scale(1.08); }
.porte:hover .porte-lien::after, .porte:focus-within .porte-lien::after { transform: translateX(7px); }
.portes:has(.porte:hover) .porte:not(:hover) { filter: brightness(0.7) saturate(0.7); }

/* viseur de caméra sur la porte du jeu : coins, REC, et au survol le timecode et la piste de montage */
.porte-viseur { position: absolute; inset: 16px; z-index: 0; pointer-events: none; }
.porte-viseur i { position: absolute; width: 26px; height: 26px; border: 0 solid rgba(255, 255, 255, 0.75); }
.porte-viseur i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.porte-viseur i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.porte-viseur i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.porte-viseur i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.porte-viseur b { position: absolute; top: 4px; right: 40px; display: flex; align-items: center; gap: 7px; font: 600 0.75rem/1 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }
.porte-viseur b::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: rec 1.2s steps(2, start) infinite; }
@keyframes rec { to { visibility: hidden; } }
@property --tc { syntax: "<integer>"; inherits: false; initial-value: 0; }
.porte:hover .porte-viseur b::after, .porte:focus-within .porte-viseur b::after { content: "00:00:" counter(tc, decimal-leading-zero); counter-reset: tc var(--tc); animation: timecode 6s linear infinite; }
@keyframes timecode { to { --tc: 24; } }
.porte-piste { position: absolute; top: 4px; left: 40px; right: 190px; display: flex; gap: 3px; height: 8px; transition: opacity 0.4s; }
.porte-piste span { flex: 1; border-radius: 2px; background: rgba(var(--accent-rgb), 0.75); }
.porte-piste span:nth-child(even) { background: rgba(var(--accent-rgb), 0.45); }
.porte-piste em { position: absolute; inset: -5px 0; animation: tete 6s linear infinite paused; }
.porte-piste em::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px #fff; }
@keyframes tete { from { translate: 0; } to { translate: 100%; } }
.porte:not(:hover):not(:focus-within) .porte-piste { opacity: 0; }

/* aperçu du jeu au survol : le montage d'un clip, quatre décors coupés sur le rythme */
.porte-film { position: absolute; inset: 0; transition: opacity 0.5s; }
.porte-film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: plan 6s linear infinite paused; }
.porte-film img:nth-child(2) { animation-delay: -4.5s; }
.porte-film img:nth-child(3) { animation-delay: -3s; }
.porte-film img:nth-child(4) { animation-delay: -1.5s; }
.porte:not(:hover):not(:focus-within) .porte-film { opacity: 0; }
.porte:hover .porte-film img, .porte:focus-within .porte-film img, .porte:hover .porte-piste em, .porte:focus-within .porte-piste em { animation-play-state: running; }
@keyframes plan { 0% { opacity: 0; transform: scale(1.16); } 2% { opacity: 1; } 25% { opacity: 1; } 27% { opacity: 0; transform: scale(1.07); } 100% { opacity: 0; transform: scale(1.07); } }

/* aperçu du serveur au survol (et au clic) : une petite fenêtre Discord posée par-dessus la porte, où la discussion
   s'anime. Droite, calée sur la marge intérieure de la porte, au-dessus de son reflet et de son contour (z-index 4 :
   rien ne la voile), sur un fond translucide flouté : la porte se devine dessous. */
.porte-discord {
  --marge-porte: clamp(22px, 2.6vw, 36px);
  position: absolute; top: -56px; right: var(--marge-porte); z-index: 4; display: grid; gap: 7px; width: 240px; padding: 10px 12px 11px;
  border-radius: 12px; background: rgba(24, 25, 30, 0.7); color: var(--dc-texte); font-size: 0.74rem; line-height: 1.3; pointer-events: none;
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 26px 50px -18px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(88, 101, 242, 0.6);
  transform-origin: 80% 100%; transition: opacity 0.35s, translate 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2), scale 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.porte:not(:hover):not(:focus-within):not(:active) .porte-discord { opacity: 0; translate: 0 18px; scale: 0.94; }
.pd-tete { display: flex; align-items: center; gap: 5px; padding-bottom: 7px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: var(--dc-titre); font-weight: 600; font-size: 0.82rem; }
.pd-diese { color: #80848e; font-size: 1.15em; line-height: 1; }
.pd-direct { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: #ff6b6e; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.pd-direct::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dc-rouge); box-shadow: 0 0 8px var(--dc-rouge); animation: rec 1.2s steps(2, start) infinite; }
.pd-msg { display: flex; align-items: flex-start; gap: 8px; }
.pd-msg b { display: block; color: var(--dc-titre); font-weight: 600; }
.pd-msg em { padding: 0 4px; border-radius: 3px; background: #5865f2; color: #fff; font: 600 0.6rem/1.5 var(--police); vertical-align: 0.1em; }
.pd-av { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 700 0.72rem/1 var(--police); }
.pd-av.av-1 { background: linear-gradient(135deg, #8e97ff, #5865f2); }
.pd-av.av-2 { background: linear-gradient(135deg, #2dd4ae, #5865f2); }
.pd-av.av-bot { background: #f3f0ea url("/img/serveur/logo-serveur-96.webp") center / cover; }
.pd-ecrit { display: flex; align-items: center; gap: 7px; color: var(--dc-doux); font-size: 0.7rem; }
.pd-points { display: inline-flex; gap: 3px; }
.pd-points i { width: 5px; height: 5px; border-radius: 50%; background: var(--dc-doux); animation: saute 1s ease-in-out infinite; }
.pd-points i:nth-child(2) { animation-delay: 0.15s; }
.pd-points i:nth-child(3) { animation-delay: 0.3s; }
@keyframes saute { 30% { translate: 0 -3px; background: #fff; } }
.porte:hover .pd-msg, .porte:focus-within .pd-msg { animation: message 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) backwards; }
.porte:hover .pd-msg:nth-child(2), .porte:focus-within .pd-msg:nth-child(2) { animation-delay: 0.25s; }
.porte:hover .pd-msg:nth-child(3), .porte:focus-within .pd-msg:nth-child(3) { animation-delay: 0.85s; }
.porte:hover .pd-msg:nth-child(4), .porte:focus-within .pd-msg:nth-child(4) { animation-delay: 1.45s; }
.porte:hover .pd-ecrit, .porte:focus-within .pd-ecrit { animation: message 0.4s 2s ease-out backwards; }
@keyframes message { from { opacity: 0; translate: 0 10px; scale: 0.96; } }

/* le « ou » entre les deux portes */
.portes-ou {
  position: absolute; left: 50%; top: 50%; z-index: 4; display: grid; place-items: center; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; background: #12131c; color: #fff; font: 900 0.95rem/1 var(--police-titre); text-transform: uppercase; letter-spacing: 0.04em;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 0 7px rgba(12, 13, 22, 0.9), 0 0 30px 6px rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

/* ------------------------------------------------------------------------------------------------ entrée en scène */
/* À chaque arrivée sur l'accueil (et juste après la porte d'entrée, à la première visite) : le disque se pose, le titre
   monte, les deux portes s'ouvrent depuis les côtés puis s'allument. Rien n'est caché sans la classe « anime » ; chaque
   animation part d'une image clé « from » et finit à l'état normal, en moins de 1,4 s. Elles touchent aux propriétés
   translate, rotate et scale : la porte garde son relief (transform) pour suivre la souris. */
html.anime:not(.entree) .hero-disque { animation: i-pop 0.8s 0.05s cubic-bezier(0.2, 0.9, 0.3, 1.3) backwards; }
html.anime:not(.entree) .hero-titre span:first-child { animation: i-monte 0.75s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
html.anime:not(.entree) .hero-titre span:last-child { animation: i-monte 0.75s 0.27s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
html.anime:not(.entree) .hero-accroche, html.anime:not(.entree) .portes-choisis { animation: i-fondu 0.6s 0.4s ease-out backwards; }
/* d'où vient chaque porte : des côtés sur ordinateur, du bas sur téléphone (variables : le nom de l'animation ne change
   jamais selon l'écran, sinon elle se rejouerait à chaque changement de taille de la fenêtre) */
html.anime:not(.entree) .porte { --de-x: -90px; --de-y: 0px; --de-r: 24deg; animation: i-porte 0.85s 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
html.anime:not(.entree) .porte-serveur { --de-x: 90px; --de-r: -24deg; animation-delay: 0.5s; }
html.anime:not(.entree) .portes-ou { animation: i-pop 0.6s 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.4) backwards; }
html.anime:not(.entree) .portes::before, html.anime:not(.entree) .portes::after { animation: i-allume 1.2s 0.4s ease-out backwards, halo 5s 1.6s ease-in-out infinite; }
html.anime:not(.entree) .portes::after { animation-delay: 0.55s, -0.9s; }
/* juste après la porte d'entrée : la scène de concert sort du noir */
html.porte-ouverte .hero-fond img { animation: i-fond 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes i-fond { from { transform: scale(1.14); filter: brightness(0.15) blur(6px); } 60% { filter: brightness(0.8) blur(0); } }
@keyframes i-pop { from { scale: 0.4; rotate: -40deg; opacity: 0; } }
@keyframes i-monte { from { translate: 0 0.45em; opacity: 0; clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20% 0); } }
@keyframes i-fondu { from { opacity: 0; translate: 0 10px; } }
@keyframes i-porte { from { opacity: 0; translate: var(--de-x) var(--de-y); rotate: y var(--de-r); } }
@keyframes i-allume { from { opacity: 0; scale: 0.6; } }

/* ------------------------------------------------------------------------------------------------ écrans moyens et petits */
/* écrans larges mais peu hauts (portable, zoom 125 %) : les deux portes et leurs boutons tiennent dans l'écran */
@media (min-width: 761px) and (max-height: 820px) {
  .hero-accroche { margin-top: 8px; }
  .hero-disque { width: clamp(62px, 9.5vh, 84px); margin-bottom: 8px; }
  .hero-titre { font-size: clamp(2.8rem, min(8vw, 10.5vh), 6rem); }
  .porte { min-height: 0; }
  .porte-dedans { gap: 6px 12px; padding-top: 56px; }
  .porte-logo { width: 52px; height: 52px; border-radius: 15px; }
  .porte-titre { font-size: clamp(1.8rem, min(3.2vw, 5.6vh), 2.6rem); }
  .porte-texte { font-size: 0.94rem; line-height: 1.45; }
  .porte-actions { margin-top: 4px; }
}
/* l'aperçu animé ne se joue qu'à la souris, sur les écrans assez larges pour lui laisser la place */
@media (hover: none), (max-width: 1100px) {
  .porte-film, .porte-piste { display: none; }
  /* sans survol (téléphone, tablette) ou sur un écran étroit : la fenêtre Discord, en petit, reste posée dans le coin
     haut de la porte, à droite du logo (deux messages, une ligne chacun) */
  .porte-discord { top: 12px; right: 12px; width: min(250px, calc(100% - 118px)); grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 7px 10px 8px; font-size: 0.7rem; }
  .porte:not(:hover):not(:focus-within):not(:active) .porte-discord { opacity: 1; translate: none; scale: none; }
  .porte-discord .pd-msg:nth-of-type(n + 4), .porte-discord .pd-ecrit { display: none; }
  .porte-discord .pd-msg > span { min-width: 0; }
  .porte-discord .pd-msg > span, .porte-discord .pd-msg b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .porte-discord .pd-msg { align-items: center; gap: 6px; }
  .porte-discord .pd-msg b { display: inline; margin-right: 5px; }
  .porte-discord .pd-av { width: 18px; height: 18px; font-size: 0.6rem; }
  .porte-discord .pd-tete { padding-bottom: 5px; font-size: 0.76rem; }
}
@media (max-width: 960px) {
  .porte-points li { font-size: 0.78rem; }
}
@media (max-width: 760px) {
  .hero { min-height: 0; padding-top: 26px; }
  .portes { grid-template-columns: 1fr; gap: 34px; }
  .portes::before, .portes::after { left: 0; right: 0; width: auto; top: 0; bottom: 52%; }
  .portes::after { top: 52%; bottom: 0; }
  .porte { min-height: 360px; }
  html.anime:not(.entree) .porte.porte { --de-x: 0px; --de-y: 24px; --de-r: 0deg; }
}
@media (max-width: 560px) {
  .porte-actions .bouton { flex: 1 1 100%; justify-content: center; }
  .porte-dedans { padding: 22px 20px 20px; }
  .porte-jeu .porte-dedans { padding: 46px 26px 34px; }
  .porte-dedans > .porte-etiquette { grid-column: 1 / -1; }
  .porte-actions .bouton-principal { margin-right: 7px; }
}
@media print {
  .hero-voile, .portes-ou, .portes::before, .portes::after { display: none !important; }
}
