    :root{
      --bg:#0b0b0c;
      --card:#0f1112;
      --muted:#9aa2a7;
      --accent:#e23b2e;
      --accent-2:#f2c94c;
      --glass: rgba(255,255,255,0.03);
      --radius:14px;
      font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    }
    html,body{height:100%;margin:0;background:linear-gradient(180deg,#060606 0%, #0b0b0c 100%);color:#fff}
	.phone {
	  width: 100vw;
	  height: 100dvh;
	  margin: 0 auto;
	  border-radius: 0;
	  background: linear-gradient(180deg,var(--card),#0b0b0c); /* couleur de secours */
	  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
	  overflow: hidden;
	  border: 1px solid rgba(255,255,255,0.03);
	  display: flex;
	  flex-direction: column;
	  position: relative; /* nécessaire pour placer le ::before */
	  z-index: 0; /* base */
	}

	/* Image + voile sombre + flou */
	.phone::before {
	  content: "";
	  position: absolute;
	  inset: 0;
	  background: url("https://zone2-event.fr/app/assets/img/background.jpg") center/cover no-repeat;
	  filter: blur(4px) brightness(0.4); /* flou + assombrissement */
	  z-index: -1; /* derrière tout */
	}
	
	/* Sur écrans “confortables”, on remet le look “téléphone” avec cadre */
	@media (min-width: 480px) and (min-height: 700px) {
	  .phone{
		width: min(390px, 95vw);
		height: min(844px, 95dvh);
		margin: 18px auto;
		border-radius: 36px;
	  }
	}
	
    header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,0.02)}
	/* ===== responsive logo fixes (mobile-first, robust) ===== */

	/* safety: make all images responsive by default */
	img {
	  max-width: 100%;
	  height: auto;
	  display: block;
	  box-sizing: border-box;
	}

	/* wrapper */
	.logo {
	  display: flex;
	  align-items: center;
	  gap: 10px;
	  max-width: 100%;
	  overflow: hidden;    /* empêche dépassement */
	  align-items: center;
	}

	/* target several possible markup variants:
	   - <img class="logo-mark"> 
	   - <div class="logo-mark"><img>...</div>
	   - <div class="mark"> (background or inner img)
	   - .logo img generic fallback
	*/
	.logo .logo-mark,
	.logo .mark,
	.logo img.logo-mark,
	.logo img {
	  flex-shrink: 0;     /* évite que l'image s'étire depuis flex */
	  max-width: 120px;   /* taille max sur mobile par défaut */
	  width: auto;
	  height: auto;
	  max-height: 42px;   /* hauteur max sur mobile */
	  object-fit: contain;
	  display: block;
	}

	/* si le logo est un élément avec background-image (ex: .mark), forcer la taille */
	.logo .mark {
	  width: auto;
	  max-width: 120px;
	  max-height: 42px;
	  height: auto;
	  background-size: contain;
	  background-repeat: no-repeat;
	  background-position: center;
	}

	/* Tablet / Desktop : augmenter légèrement */
	@media (min-width: 600px) {
	  .logo .logo-mark,
	  .logo .mark,
	  .logo img.logo-mark,
	  .logo img {
		max-width: 160px;
		max-height: 56px;
	  }
	}

	/* Si un style inline force une grosse taille, appliquer une règle plus spécifique (dernier recours) */
	.logo img[style], .logo .mark[style] {
	  max-width: 100% !important;
	  max-height: 56px !important;
	  height: auto !important;
	  width: auto !important;
	  object-fit: contain !important;
	}






	.logo .title{font-size:20px;font-weight: 700;}
    .content{flex:1;overflow:auto;padding:14px}
    .screen{display:none}
    .screen.active{display:block}
    .btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px;border-radius:10px;background:var(--glass);cursor:pointer;color:white;width: 100%}
	.btn2{display:flex;align-items:center;justify-content:center;padding:10px 12px;border-radius:10px;cursor:pointer;color:white}
	.btn3{display:flex;text-align:left;padding-left:8px;align-items:center;justify-content:center;padding:10px 12px;border-radius:10px;cursor:pointer;color:white;width: 100%}
    .btn.primary{background:linear-gradient(180deg,var(--accent),#b9362a);box-shadow:0 6px 18px rgba(226,59,46,0.25);font-weight:700;color:white;box-sizing:border-box}
	.btn2.primary{flex-direction:column;gap:8px;background:linear-gradient(180deg,var(--accent),#b9362a);font-weight:700;color:white;width: 100%}
	.btn3.primary{background:linear-gradient(180deg,var(--accent),#b9362a);box-shadow:0 6px 18px rgba(226,59,46,0.25);font-weight:700;color:white;box-sizing:border-box}
	.btn3.primary strong {
    font-size: 1.4em; /* ou 18px, par exemple */
	text-shadow: 0 0 3px #f2c94c, 0 0 5px #e23b2e;
	color:#0f1112;
	}
	.btn3.primary .small-muted {
    font-size: 0.85em;  /* plus petit que le texte normal */
    color: white;        /* si tu veux aussi l’atténuer visuellement */
	}
    .card{background:rgba(255,255,255,0.02);padding:12px;border-radius:12px;margin-bottom:12px;border:1px solid rgba(255,255,255,0.02)}
    label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
    select,input[type=text],input[type=number],input[type=date],input[type=time],input[type=tel],input[type=email],textarea{width:100%;padding:10px;border-radius:10px;box-sizing:border-box;background:transparent;border:1px solid rgba(255,255,255,0.03);color:#fff;outline:none}
    textarea{min-height:80px}
    .muted{color:var(--muted)}
    .flex{display:flex;gap:8px}
    .athlete-row{display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:10px;background:rgba(0,0,0,0.12);margin-bottom:8px}
    .avatar{width:36px;height:36px;border-radius:8px;background:linear-gradient(180deg,#2b2b2b,#1a1a1a);display:flex;align-items:center;justify-content:center;color:var(--muted);font-weight:700}
    .name{font-weight:600}
    .score-input{display:flex;gap:8px;align-items:center}
    .score-input .score-field{flex:1;padding:10px;border-radius:8px;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.03);color:#fff}
    .leaderboard .row{display:flex;align-items:center;justify-content:space-between;padding:12px;border-radius:12px;background:rgba(0,0,0,0.12);margin-bottom:8px;color:white}
    .podium{background:linear-gradient(90deg,var(--accent-2),#b58d29);color:#111}
    .rank{width:34px;height:34px;border-radius:8px;background:rgba(255,255,255,0.03);display:flex;align-items:center;justify-content:center;font-weight:700;margin-right:10px}
    .small{font-size:13px;color:var(--muted)}
    .admin-list{background:linear-gradient(180deg,var(--accent),#b9362a);box-shadow:0 6px 18px rgba(226,59,46,0.25);font-weight:700;color:white;width: 100%}
    .field-row{display:flex;gap:8px}
    .two-col{display:grid;grid-template-columns:1fr 1fr;gap:8px}
    footer{padding:10px;border-top:1px solid rgba(255,255,255,0.02);display:flex;gap:8px;align-items:center;justify-content:space-between}
    nav .nav-btn{flex:1;padding:10px;border-radius:10px;text-align:center;cursor:pointer;font-weight:700;color:white;background:linear-gradient(180deg,var(--accent),#b9362a)}
	
	#admin-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
	}
	
	.card-buttons .btn {
    padding: 4px 8px; /* réduit la hauteur et la largeur */
    font-size: 0.85em; /* texte plus petit */
	}
	
	.card-buttons {
		display: flex;
		gap: 4px;
		flex-shrink: 0; /* empêche le bloc de se compresser bizarrement */
	}
	
	.modal {
	  position: fixed;
	  top: 0; left: 0;
	  width: 100%; height: 100%;
	  background: rgba(0,0,0,0.6);
	  display: flex;              /* <-- manquait le ; */
	  z-index: 1000;
	  box-sizing: border-box;
	  color: black;
	}

	#registration-details-modal {
	  position: fixed;
	  top: 0;
	  left: 0;
	  width: 100%;          /* prend toute la largeur */
	  height: 100%;         /* prend toute la hauteur */
	  background: rgba(0, 0, 0, 0.6); /* fond semi-transparent */
	  display: none;
	  justify-content: center;
	  align-items: center;
	  z-index: 1000;           /* au-dessus du reste */
	}

	.modal-content {
	  background: var(--card);
	  color: white;
	  width: 100vw;
	  max-width: 100vw;
	  height: 100dvh;
	  max-height: 100dvh;
	  border-radius: 0;
	  display: flex;
	  flex-direction: column;
	  overflow-y: auto;
	  box-sizing: border-box;
	  padding: 16px;
	}
	
	/* Sur écrans confortables, reviens à la modale “centrée” façon téléphone */
	@media (min-width: 480px) and (min-height: 700px) {
	  .modal-content {
		width: 100%;
		max-width: 390px;
		height: 100%;
		max-height: 95vh;
		border-radius: 36px;
	  }
	}

	/* Layout fluide en petits écrans */
	@media (max-width: 600px) {
	  .two-col {
		display: grid;
		grid-template-columns: 1fr;  /* 1 colonne */
		gap: 8px;
		padding: 12px;             /* 👈 marge intérieure gauche/droite */
	  }

	  .two-col input,
	  .two-col select {
		width: 100%;                 /* reste fluide */
		box-sizing: border-box;       /* padding pris en compte */
	  }

	  .field-row,
	  .flex {
		display: flex;
		flex-direction: column;
	  }
	}

	/* Paysage très “bas” (ex: 568×320) : compacter un peu */
	@media (orientation: landscape) and (max-height: 480px) {
	  header, footer { padding: 8px; }
	  .content { padding: 8px; }
	  .btn, .btn2, .btn3 { padding: 8px 10px; }
	  .logo .title { font-size: 14px; }
	  .btn3.primary strong { font-size: 1.1em; }
	}

	/* Fluid scroll sur iOS */
	.content { -webkit-overflow-scrolling: touch; }

	/* Tout en border-box (plus prévisible) */
	*, *::before, *::after { box-sizing: border-box; }

	/* Images/documents responsives dans la modale */
	.modal-content img,
	.modal-content embed {
	  max-width: 100%;
	  height: auto;
	}


	.close-btn {
	  font-size: 18px;
	}
	
	.left {
	  display: flex;
	  align-items: center;
	}
	
	.meta {
	  display: flex;
	  flex-direction: column;
	  align-items: left;
	  margin-left: 8px;
	}

	.club {
	  font-size: 12px;
	  color: #777;
	}
	
	.admin-only {
	  display: none; /* par défaut caché */
	}


/* =========================
   DISPLAY MODE (TV)
========================= */

body.display-mode {
  background: #000;
  overflow: hidden;
}

/* On supprime le cadre "téléphone" */
body.display-mode .phone {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Header & footer inutiles */
body.display-mode header,
body.display-mode footer,
body.display-mode button {
  display: none !important;
}

/* Contenu plein écran */
body.display-mode main.content {
  padding: 24px 40px;
}

/* Header TV */
#display-header {
  text-align: center;
  margin-bottom: 24px;
}

.display-event-name {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.display-subtitle {
  font-size: 28px;
  opacity: 0.85;
}

/* Leaderboard rows */
body.display-mode .row {
  font-size: 22px;
  padding: 14px 20px !important;
}

/* Rang bien visible */
body.display-mode .rank {
  font-size: 26px;
  width: 40px;
  text-align: center;
}

/* Cartes */
body.display-mode .card {
  background: transparent;
  box-shadow: none;
}

/* Masquer les filtres */
body.display-mode #filter-wod,
body.display-mode #filter-cat,
body.display-mode label {
  display: none !important;
}

body.display-mode .normal-title {
  display: none;
}



/* MODE LECTURE SEULE */
body.readonly-mode [data-admin-readonly] {
  pointer-events: none;
  opacity: 0.6;
}

/* Navigation toujours active */
body.readonly-mode nav,
body.readonly-mode #admin-header {
  pointer-events: auto;
  opacity: 1;
}

/* Boutons toujours cliquables */
[data-allow-always="true"] {
  pointer-events: auto !important;
  opacity: 1 !important;
}

