:root[data-theme="dark"], 
:root:not([data-theme]){
  --bg:#303030; 
  --text:#e7edf6; 
  --muted:#9aa6b2;
  --brand:#5dd3ff; 
  --accent:#7cf3c6;
  --panel:#121725; 
  --panel-2:#1a2031; 
  --line:#2a334a;
  --radius:16px; 
  --shadow:0 12px 30px rgba(0,0,0,.25);
  --ring: rgba(128,255,234,.35);
}

:root[data-theme="light"]{
  --bg:#f6f7fb; 
  --text:#0f172a; 
  --muted:#5b6676;
  --brand:#2563eb; 
  --accent:#22c55e;
  --panel:#ffffff; 
  --panel-2:#f3f5f9; 
  --line:#e5e7eb;
  --shadow:0 12px 24px rgba(0,0,0,.08);
  --ring: rgba(37,99,235,.18);
}

/* Bouton de bascule thème */
#themeToggle{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  transition: transform .2s ease;
  z-index: 10000;
}




/* === Encart flottant superposé === */
.ad-float{
  position: fixed;
  left: 30px;
  top: 110px;
  width: 350px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 10000;
  display: grid;
  gap: 12px;
}

.ad-banner{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: adPulse 1.5s infinite;
}

/* ligne horizontale : Équipe 1 | VS | Équipe 2 | VS | Equipe 3*/
.ad-line{
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.ad-team{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.ad-vs{
  width: 70px;
  height: auto;
  display: block;
}
@keyframes adPulse{
  0%{ transform: scale(1); opacity: 1; }
  50%{ transform: scale(1.08); opacity: .85; }
  100%{ transform: scale(1); opacity: 1; }
}
/* Image Equipe 1 */
.ad-link1 {
  display: block;
}

.ad-link1 img {
  transition: transform 0.2s ease, box-shadow 0.2 ease;
  cursor: pointer;
}

.ad-link1 img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #2563eb;
}
/* Image Equipe 2  */
.ad-link2 {
  display: block;
}

.ad-link2 img {
  transition: transform 0.2s ease, box-shadow 0.2 ease;
  cursor: pointer;
}

.ad-link2 img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #ef4444;
}

/* Image Equipe 3  */
.ad-link3 {
  display: block;
}

.ad-link3 img {
  transition: transform 0.2s ease, box-shadow 0.2 ease;
  cursor: pointer;
}

.ad-link3 img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px #34ec0f;
}

/* Responsive : masque l'encart sur petits écrans pour ne pas gêner */
@media (max-width: 1024px){
  .ad-float{ display: none; }
}







#themeToggle:hover{ 
  transform: scale(1.1); 
}

* { box-sizing: border-box; }
html, body { 
  height: 100%; 
}

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(76,201,240,.12), transparent 60%),
    radial-gradient(900px 700px at -10% 20%, rgba(128,255,234,.12), transparent 60%),
    var(--bg);
}

.container { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 24px; 
}

header.hero { 
  display: grid; 
  gap: 10px; 
  align-items: center; 
  margin: 8px 0 20px; 
}

.title {
  display: flex; 
  align-items: center; 
  gap: 12px;
  font-weight: 800; 
  letter-spacing: .3px; 
  font-size: clamp(22px, 3vw, 32px);
}

.badge {
  font-size: 12px; 
  background: linear-gradient(90deg, var(--brand), var(--accent));
  color: #081018; 
  padding: 4px 10px; 
  border-radius: 999px; 
  font-weight: 700; 
  box-shadow: var(--shadow);
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  border-radius: 16px; 
  padding: 14px; 
  box-shadow: var(--shadow);
}

.controls { 
  display: grid; 
  grid-template-columns: 1fr auto; 
  gap: 10px; 
  align-items: center; 
}

.search {
  display: flex; 
  align-items: center; 
  gap: 10px; 
  background: var(--panel);
  border-radius: 12px; 
  padding: 10px 12px; 
  border: 1px solid rgba(255,255,255,.08);
}

.search input {
  outline: none; 
  border: none; 
  background: transparent; 
  color: var(--text); 
  width: 100%; 
  font-size: 15px;
}

.hint { 
  color: var(--muted); 
  font-size: 13px; 
  text-align: right; 
}

/* ===== Grille : même hauteur et items étirés ===== */
.grid {
  display: grid;
  grid-template-columns: repeat( auto-fill, minmax(240px, 1fr) );
  gap: 14px;
  margin-top: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

/* ===== Card en colonne flex + footer collé bas ===== */
.card {
  position: relative; 
  overflow: hidden; 
  border-radius: 16px; 
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06); 
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover { 
  transform: translateY(-2px); 
  border-color: var(--ring); 
}

.card-head {
  display: flex; 
  gap: 12px; 
  align-items: center; 
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}

.avatar {
  --size: 64px; 
  flex: 0 0 var(--size); 
  width: var(--size); 
  height: var(--size);
  display: grid; 
  place-items: center; 
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent)); 
  color: #001018;
  font-weight: 900; 
  letter-spacing: .5px; 
  font-size: 22px; 
  border: 2px solid rgba(255,255,255,.35);
  overflow: hidden;
}

.avatar img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

.card h3 { 
  margin: 0; 
  font-size: 18px; 
}

/* ---------- RÔLE : clampé à 4 lignes + hauteur min identique ---------- */
.role {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1em * 1.4 * 2);
}

/* ---------- TAGS : limite à 4 rangées visibles ---------- */
.tags {
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
  padding: 12px 14px;
  --row-h: 26px;
  max-height: calc(var(--row-h) * 4 + 6px);
  overflow: hidden;
}

/* Keep image at declared original width but allow it to scale down on small screens
   Usage: <img class="responsive-img" style="--orig-width:900px;" src="..."> */
.responsive-img{
  display:block;
  width:var(--orig-width, 100%);
  max-width:100%;
  height:auto;
}

@media (max-width:900px){
  .responsive-img{ width:calc(100% - 40px); }
}

@media (max-width:420px){
  .responsive-img{ width:calc(100% - 20px); }
}

.tag {
  font-size: 12px; 
  line-height: 1;
  padding: 4px 8px; 
  border-radius: 999px;
  background: var(--panel-2); 
  border: 1px solid rgba(255,255,255,.06);
  color: var(--muted);
}

/* ---------- BIO : prend l'espace restant + clamp à 4 lignes ---------- */
.bio {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 8px 14px;
  line-height: 1.4;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer poussé en bas + 2 rangées de boutons */
.card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.btn-row { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 8px; 
}

.btn-row.space-between { 
  justify-content: space-between; 
}

.btn-row.center { 
  justify-content: center; 
}

/* Boutons */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01));
  color: var(--text);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn:hover { 
  outline: 2px solid var(--ring); 
}

.empty { 
  text-align: center; 
  color: var(--muted); 
  padding: 22px; 
}

footer { 
  margin: 28px 0 10px; 
  color: var(--muted); 
  font-size: 12px; 
  text-align: center; 
}

.kbd { 
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; 
  background: var(--panel-2); 
  border: 1px solid rgba(255,255,255,.08); 
  padding: 2px 6px; 
  border-radius: 6px; 
}

