/* ===== Polices (auto-hebergees, licence OFL dans /fonts) ===== */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800; font-style: normal; font-display: swap;
}

/* ===== Theme : tout passe par ces variables pour pouvoir changer d'identite ===== */
:root {
  --fond: #ffffff;
  --surface: #f8f6fd;
  --surface-2: #f1edfb;
  --encre: #1b1530;
  --encre-2: #4a4363;
  --discret: #7a7391;
  --bord: #e8e3f4;
  --violet: #6a3de8;
  --violet-fonce: #4f25c4;
  --violet-doux: #efe9fe;
  --violet-pale: #f6f2ff;
  --succes: #127a52;
  --danger: #c0353f;
  --danger-doux: #fdeeee;
  --succes-doux: #e6f5ee;
  --ambre: #95600a;
  --ambre-doux: #fdf2df;

  --titre: 'Fraunces', Georgia, 'Times New Roman', serif;
  --texte: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --rayon: 18px;
  --rayon-s: 12px;
  --ombre: 0 1px 2px rgba(27, 21, 48, .04), 0 8px 24px -12px rgba(79, 37, 196, .18);
  --ombre-forte: 0 24px 60px -20px rgba(42, 20, 110, .35);
  --nav-h: 68px;
  --gouttiere: 16px;
  --ressort: cubic-bezier(.34, 1.4, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 16px/1.55 var(--texte);
  word-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  overflow-x: hidden;
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--violet); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

svg.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ===== En-tete ===== */
.entete {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gouttiere) 10px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.entete.defile { border-bottom-color: var(--bord); }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); min-height: 44px; }
/* le JPEG a des coins blancs : on le decoupe en cercle */
.marque-logo { width: 40px; height: 40px; flex: none; clip-path: circle(48.5%); }
.hero-logo {
  width: 92px; height: 92px; margin-bottom: 18px; clip-path: circle(48.5%);
  filter: drop-shadow(0 10px 24px rgba(106, 61, 232, .35));
  animation: flotte 6s ease-in-out infinite;
}
@keyframes flotte { 50% { transform: translateY(-5px) rotate(-2deg); } }
/* petits ecrans en hauteur : le bouton d'inscription doit rester visible sans defiler */
@media (max-height: 700px) {
  .hero { padding-top: 8px; }
  .hero-logo { width: 50px; height: 50px; margin-bottom: 8px; }
  .hero h1 { margin-top: 8px; }
  .chapo { margin-top: 10px; }
  .hero-actions { margin-top: 16px; }
}
.marque-texte { font: 500 19px/1 var(--titre); letter-spacing: -.01em; white-space: nowrap; }
.marque-texte em { color: var(--violet); }
.nav-haut { display: none; }

/* ===== Navigation basse (mobile) ===== */
.nav-bas {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; justify-content: space-around;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--bord);
}
.nav-bas:empty { display: none; }
.nav-bas a {
  flex: 1; max-width: 120px; min-height: 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--discret); text-decoration: none; font-size: 11.5px; font-weight: 600;
  border-radius: 14px; position: relative;
  transition: color .2s;
}
.nav-bas a .ico { transition: transform .3s var(--ressort); }
.nav-bas a[aria-current="page"] { color: var(--violet); }
.nav-bas a[aria-current="page"] .ico { transform: translateY(-1px) scale(1.08); }
.pastille {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center;
}

/* ===== Conteneur des vues ===== */
main:focus, main:focus-visible { outline: none; }
main {
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding: 8px var(--gouttiere) calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
}
body.sans-nav main { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.vue-entre { animation: entre .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes entre { from { opacity: 0; transform: translateY(10px); } }

/* ===== Typo ===== */
h1, h2, h3 { font-family: var(--titre); font-weight: 500; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
h1 em, h2 em { color: var(--violet); font-weight: 400; }
.surtitre {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--violet);
}
.surtitre::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.chapo { color: var(--encre-2); font-size: 16.5px; margin: 12px 0 0; max-width: 40ch; }
.discret { color: var(--discret); }
.section { margin-top: 40px; }
.section-tete { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-tete h2 { font-size: 26px; }

/* ===== Boutons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .2s, box-shadow .2s, color .2s, border-color .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-plein { background: var(--violet); color: #fff; box-shadow: 0 8px 20px -8px rgba(106, 61, 232, .7); }
.btn-plein:hover { background: var(--violet-fonce); }
.btn-contour { background: var(--fond); color: var(--encre); border-color: var(--bord); }
.btn-contour:hover { border-color: #d3c9ef; background: var(--violet-pale); }
.btn-doux { background: var(--violet-doux); color: var(--violet-fonce); }
.btn-danger { background: var(--danger-doux); color: var(--danger); }
.btn-bloc { width: 100%; }
.btn-s { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .rond { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .7s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.lien-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--violet); font-weight: 700; cursor: pointer; }

/* ===== Accueil ===== */
.hero { position: relative; padding: 28px 0 8px; }
.hero::before {
  content: ''; position: absolute; z-index: -1; inset: -40px calc(var(--gouttiere) * -1) auto auto; width: min(360px, 100vw); height: 360px;
  background: radial-gradient(closest-side, rgba(146, 108, 255, .28), rgba(146, 108, 255, 0));
  filter: blur(8px); pointer-events: none;
}
.hero h1 { font-size: clamp(40px, 11.5vw, 76px); margin-top: 16px; }
.hero h1 .vers { display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-actions .btn { flex: 1 1 180px; }
.compteur-inscrits { margin-top: 18px; font-size: 14px; color: var(--discret); display: flex; align-items: center; gap: 8px; }
.point-vivant { width: 8px; height: 8px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 0 rgba(43, 182, 115, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(43, 182, 115, 0); } 100% { box-shadow: 0 0 0 0 rgba(43, 182, 115, 0); } }

.infos {
  margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
}
.info {
  padding: 16px; border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord);
}
.info b { display: block; font: 500 22px/1.15 var(--titre); margin-top: 4px; overflow-wrap: anywhere; }
.info small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); }
.info.compte { background: var(--violet); border-color: var(--violet); color: #fff; }
.info.compte small { color: rgba(255, 255, 255, .75); }
.message-orga {
  margin-top: 12px; padding: 16px 18px; border-radius: var(--rayon); background: var(--violet-pale);
  border-left: 3px solid var(--violet); color: var(--encre-2); white-space: pre-line;
}

.defile-teams {
  margin: 36px calc(var(--gouttiere) * -1) 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.defile-double { display: contents; }
.defile-piste { display: flex; gap: 10px; width: max-content; animation: defile 38s linear infinite; padding: 4px 0; }
.defile-teams:hover .defile-piste { animation-play-state: paused; }
@keyframes defile { to { transform: translateX(-50%); } }
.etiquette {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--bord); background: var(--fond); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.etiquette .ico { color: var(--violet); width: 18px; height: 18px; }

.etapes { display: grid; gap: 12px; counter-reset: etape; }
.etape {
  display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: var(--rayon);
  border: 1px solid var(--bord); background: var(--fond);
}
.etape::before {
  counter-increment: etape; content: counter(etape);
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--violet-doux); color: var(--violet-fonce); font: italic 600 19px/1 var(--titre);
}
.etape h3 { font: 700 16px/1.3 var(--texte); letter-spacing: 0; }
.etape p { margin: 4px 0 0; color: var(--encre-2); font-size: 14.5px; }

.pied { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--bord); font-size: 13px; color: var(--discret); }

/* ===== Formulaires ===== */
.carte-form {
  max-width: 460px; margin: 12px auto 0; padding: 26px 20px; border-radius: 24px;
  background: var(--fond); border: 1px solid var(--bord); box-shadow: var(--ombre);
}
.carte-form h1 { font-size: 34px; }
.carte-form .chapo { font-size: 15px; }
form.champs { display: grid; gap: 14px; margin-top: 22px; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo-large { display: grid; gap: 14px; }
@media (min-width: 640px) { .duo-large { grid-template-columns: 1fr 1fr; gap: 12px; } }
.champ { display: grid; gap: 6px; min-width: 0; }
.champ label { font-size: 13.5px; font-weight: 700; color: var(--encre-2); }
.champ label .discret { font-weight: 500; }
.champ input, .champ select, .champ textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--bord); background: var(--surface);
  font-size: 16px; /* 16px : evite le zoom auto d'iOS */
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.champ textarea { min-height: 110px; resize: vertical; }
.champ select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7391' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--violet); background: var(--fond); box-shadow: 0 0 0 4px rgba(106, 61, 232, .12);
}
.mdp { position: relative; }
.mdp input { padding-right: 56px; }
.mdp button {
  position: absolute; right: 3px; top: 3px; width: 44px; height: 44px; border: 0; background: none;
  color: var(--discret); cursor: pointer; display: grid; place-items: center; border-radius: 12px;
}
.erreur-form {
  padding: 12px 14px; border-radius: 12px; background: var(--danger-doux); color: var(--danger);
  font-size: 14px; font-weight: 600;
}
.bascule { margin-top: 18px; text-align: center; font-size: 14.5px; color: var(--encre-2); }
.mention { font-size: 12.5px; color: var(--discret); margin: 0; }

/* ===== Teams ===== */
.bonjour { padding-top: 12px; }
.bonjour h1 { font-size: clamp(32px, 8.5vw, 48px); margin-top: 14px; }
.progression {
  margin-top: 18px; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: var(--rayon); background: var(--surface); border: 1px solid var(--bord);
}
.progression-anneau { position: relative; width: 52px; height: 52px; flex: none; }
.progression-anneau svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.progression-anneau circle { fill: none; stroke-width: 5; }
.progression-anneau .piste { stroke: var(--surface-2); }
.progression-anneau .valeur { stroke: var(--violet); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.progression-anneau span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 17px/1 var(--titre); }
.progression p { margin: 0; font-size: 14.5px; color: var(--encre-2); }
.progression strong { color: var(--encre); }

.filtres {
  display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; margin: 20px calc(var(--gouttiere) * -1) 0;
  padding: 2px var(--gouttiere) 4px; scrollbar-width: none;
}
.filtres::-webkit-scrollbar { display: none; }
.filtre {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--bord);
  background: var(--fond); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--encre-2);
  transition: background .2s, color .2s, border-color .2s;
}
.filtre[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }

.grille-teams > * { min-width: 0; }
.grille-teams { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
.team {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 14px;
  border-radius: var(--rayon); border: 1px solid var(--bord); background: var(--fond);
  transition: border-color .2s, box-shadow .25s, transform .2s;
  cursor: pointer; text-align: left; width: 100%;
}
.team:hover { box-shadow: var(--ombre); border-color: #dcd3f5; }
.team:active { transform: scale(.99); }
.team.rejointe { border-color: rgba(106, 61, 232, .45); background: linear-gradient(180deg, var(--violet-pale), var(--fond)); }
.team-icone {
  flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--violet-doux); color: var(--violet-fonce);
  transition: background .25s, color .25s, transform .4s var(--ressort);
}
.team-icone .ico { width: 26px; height: 26px; }
.team.rejointe .team-icone { background: var(--violet); color: #fff; }
.team-corps { flex: 1; min-width: 0; }
.team-nom { font: 600 19px/1.2 var(--titre); letter-spacing: -.01em; }
.team-accroche { font-size: 13.5px; color: var(--discret); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-membres { font-size: 12.5px; font-weight: 600; color: var(--encre-2); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.team-membres .ico { width: 15px; height: 15px; }
.rejoindre {
  flex: none; position: relative; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--bord); background: var(--fond); color: var(--violet);
  display: grid; place-items: center; cursor: pointer;
  transition: background .25s, border-color .25s, color .25s, transform .35s var(--ressort);
}
.rejoindre:hover { border-color: var(--violet); }
.rejoindre:active { transform: scale(.88); }
.rejoindre[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.rejoindre .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.rejoindre.pop { animation: pop .5s var(--ressort); }
@keyframes pop { 40% { transform: scale(1.22); } }

.eclat {
  position: fixed; z-index: 60; width: 7px; height: 7px; border-radius: 2px; pointer-events: none;
  background: var(--violet); animation: eclat .7s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes eclat {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

.vide {
  margin-top: 20px; padding: 36px 20px; text-align: center; border-radius: var(--rayon);
  border: 1.5px dashed #d9d1f1; background: var(--violet-pale);
}
.vide .ico { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--violet); }
.vide h2 { font-size: 24px; }
.vide p { color: var(--encre-2); margin: 8px auto 18px; max-width: 34ch; }

/* ===== Feuille (bottom sheet) ===== */
.feuille { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.feuille-fond { position: absolute; inset: 0; background: rgba(27, 21, 48, .38); animation: fondu .25s both; }
.feuille-panneau {
  position: relative; width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--fond); border-radius: 26px 26px 0 0; box-shadow: var(--ombre-forte);
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  animation: monte .38s cubic-bezier(.2, .9, .25, 1) both;
}
.feuille.sort .feuille-fond { animation: fondu .2s reverse both; }
.feuille.sort .feuille-panneau { animation: descend .22s ease-in both; }
@keyframes fondu { from { opacity: 0; } }
@keyframes monte { from { transform: translateY(100%); } }
@keyframes descend { to { transform: translateY(100%); } }
.feuille-panneau:focus { outline: none; }
.feuille-poignee { width: 40px; height: 5px; border-radius: 5px; background: var(--bord); margin: 0 auto 8px; }
.feuille-fermer {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--encre-2);
}
.feuille-fermer svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.detail-tete { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding-right: 44px; }
.detail-tete .team-icone { width: 60px; height: 60px; border-radius: 18px; }
.detail-tete h2 { font-size: 28px; }
.detail-desc { color: var(--encre-2); margin: 16px 0 20px; }
.membres-liste { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.membre {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--surface); font-size: 14px; font-weight: 600;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--violet-doux); color: var(--violet-fonce); font-size: 12px; font-weight: 800;
}
.membre small { color: var(--discret); font-weight: 500; }
.sous-titre { font: 700 13px/1 var(--texte); letter-spacing: .06em; text-transform: uppercase; color: var(--discret); margin-top: 24px; }

/* ===== Profil ===== */
.profil-tete { display: flex; align-items: center; gap: 16px; }
.profil-tete .avatar { width: 64px; height: 64px; font: italic 600 26px/1 var(--titre); }
.profil-tete h1 { font-size: 30px; }
.bloc { margin-top: 18px; padding: 20px 18px; border-radius: var(--rayon); border: 1px solid var(--bord); }
.bloc h2 { font-size: 21px; }
.bloc.danger { border-color: #f3d2d4; }
.puces-teams { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--violet-doux); color: var(--violet-fonce); font-size: 13px; font-weight: 700;
}
.puce .ico { width: 15px; height: 15px; }

/* ===== Espace orga ===== */
.onglets {
  display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; margin: 18px calc(var(--gouttiere) * -1) 0;
  padding: 0 var(--gouttiere); scrollbar-width: none; border-bottom: 1px solid var(--bord);
}
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  flex: none; min-height: 46px; padding: 0 14px; border: 0; background: none; cursor: pointer;
  font-weight: 700; font-size: 14.5px; color: var(--discret); border-bottom: 2.5px solid transparent; margin-bottom: -1px;
}
.onglet[aria-selected="true"] { color: var(--violet); border-bottom-color: var(--violet); }
.chiffres { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.chiffre { padding: 16px; border-radius: var(--rayon); background: var(--surface); }
.chiffre b { display: block; font: 500 34px/1 var(--titre); }
.chiffre span { font-size: 13px; color: var(--discret); font-weight: 600; }
.barres { display: grid; gap: 4px; margin-top: 16px; }
.barre {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px;
  padding: 10px 4px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 10px; width: 100%;
}
.barre:hover { background: var(--violet-pale); }
.barre-nom { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-val { font-weight: 700; font-size: 14px; color: var(--encre-2); font-variant-numeric: tabular-nums; }
.barre-piste { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.barre-piste i { display: block; height: 100%; border-radius: 8px; background: var(--violet); width: 0; transition: width .7s cubic-bezier(.2, .8, .2, 1); }

.outils { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.recherche { flex: 1 1 220px; position: relative; }
.recherche input { width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; border-radius: 999px; border: 1.5px solid var(--bord); background: var(--surface); font-size: 16px; }
.recherche input:focus { outline: none; border-color: var(--violet); background: var(--fond); }
.recherche .ico { position: absolute; left: 14px; top: 12px; width: 20px; height: 20px; color: var(--discret); }
.outils select { min-height: 46px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--bord); background: var(--surface); font-size: 15px; max-width: 100%; }

.liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
.ligne {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bord);
  background: var(--fond); width: 100%; text-align: left; cursor: pointer;
}
.ligne:hover { border-color: #dcd3f5; }
.ligne-corps { flex: 1; min-width: 0; }
.ligne-titre, .ligne-sous { display: block; }
.ligne-titre { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-sous { font-size: 13px; color: var(--discret); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-fin { flex: none; white-space: nowrap; font-size: 12.5px; font-weight: 700; color: var(--violet-fonce); background: var(--violet-doux); padding: 4px 10px; border-radius: 999px; }
.ligne-fin.zero { background: var(--surface); color: var(--discret); }
.coord { display: grid; gap: 4px; margin-top: 12px; font-size: 15px; }
.coord a { overflow-wrap: anywhere; }
.actions-col { display: grid; gap: 8px; margin-top: 20px; }
.motdepasse-provisoire {
  margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--violet-pale); border: 1px dashed var(--violet);
  font-size: 14px;
}
.motdepasse-provisoire code { display: block; margin-top: 6px; font: 600 20px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }
.interrupteur { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-weight: 600; font-size: 14.5px; }
.interrupteur input { width: 48px; height: 28px; appearance: none; -webkit-appearance: none; border-radius: 28px; background: var(--bord); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.interrupteur input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ressort); }
.interrupteur input:checked { background: var(--violet); }
.interrupteur input:checked::after { transform: translateX(20px); }
.retirer { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--danger-doux); color: var(--danger); display: grid; place-items: center; cursor: pointer; }
.retirer .ico { width: 18px; height: 18px; }

/* Emargement */
.em-aide { margin-top: 14px; }
.ligne .date-bloc { width: 46px; min-height: 50px; border-radius: 12px; }
.ligne .date-bloc b { font-size: 19px; }
.ligne .date-bloc small { font-size: 10px; }
.ligne-fin.a-faire { background: var(--ambre-doux); color: var(--ambre); }
.ligne-fin.faible { background: var(--danger-doux); color: var(--danger); }
.ligne-fin.bon { background: var(--succes-doux); color: var(--succes); }
.fi-presence { margin: 10px 0 0; font-size: 14.5px; }
.appel-quand { margin: 4px 0 0; font-size: 14px; }
.appel-legende { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.appel-legende span { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.appel-legende .ico { width: 14px; height: 14px; }
.legende-present { color: var(--succes); }
.legende-excuse { color: var(--ambre); }
.legende-absent { color: var(--danger); }
.appel-resume { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.appel-resume:empty { display: none; }
.puce-present { background: var(--succes-doux); color: var(--succes); }
.puce-excuse { background: var(--ambre-doux); color: var(--ambre); }
.puce-absent { background: var(--danger-doux); color: var(--danger); }
.puce-reste { background: var(--surface); color: var(--discret); }
.appel-recherche { display: block; margin-top: 12px; }
.appel-ligne { cursor: default; padding: 10px 10px 10px 12px; gap: 10px; }
.appel-ligne .avatar { width: 34px; height: 34px; font-size: 14px; }
.statuts { flex: none; display: flex; gap: 4px; }
.statut {
  width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--bord); background: var(--fond);
  color: var(--discret); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background .15s, color .15s, border-color .15s, transform .2s var(--ressort);
}
.statut .ico { width: 18px; height: 18px; }
.statut:active { transform: scale(.9); }
.statut-present[aria-pressed="true"] { background: var(--succes); border-color: var(--succes); color: #fff; }
.statut-excuse[aria-pressed="true"] { background: var(--ambre); border-color: var(--ambre); color: #fff; }
.statut-absent[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #fff; }
.convention-form { margin-top: 16px; }
.emarge-auto { color: var(--succes); font-weight: 600; }
.emarge-action { margin-top: 12px; }
.emarge-action .appel-fini + .lien-btn { margin-top: 4px; padding-left: 0; }
.emarge-attente { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.emarge-attente .ico { width: 16px; height: 16px; }
.btn-emarger { min-height: 52px; font-size: 16px; }
.chiffre b small { font-size: 18px; color: var(--discret); }
.emarge-rappel {
  margin-top: 12px; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--rayon);
  background: var(--succes); color: #fff; box-shadow: 0 12px 28px -14px rgba(18, 122, 82, .8);
}
.emarge-rappel-corps { flex: 1; min-width: 0; display: grid; }
.emarge-rappel-corps small { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.emarge-rappel-corps b { font: 600 18px/1.25 var(--titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emarge-rappel-corps span { font-size: 13.5px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-blanc { background: #fff; color: var(--succes); flex: none; }
.btn-blanc .ico { width: 18px; height: 18px; }
.appel-autres { margin-top: 18px; }
.appel-autres summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--violet-fonce); min-height: 44px; display: flex; align-items: center; }
.appel-autres .ligne-fin { display: inline-flex; align-items: center; gap: 4px; }
.appel-autres .ligne-fin .ico { width: 14px; height: 14px; }
.appel-fini { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; color: var(--succes); }
.appel-fini .ico { width: 20px; height: 20px; flex: none; }
@media (max-width: 360px) {
  .appel-ligne .avatar { display: none; }
  .statut { width: 36px; height: 36px; }
}

.sous-section { margin: 26px 0 0; align-items: center; }
.section-tete.sous-section h2.sous-titre { margin: 0; font: 700 13px/1 var(--texte); letter-spacing: .06em; }
.sous-section .lien-btn { padding: 0 4px; white-space: nowrap; }
.barre[tabindex="-1"] { cursor: default; }
.barre[tabindex="-1"]:hover { background: none; }
.fil { display: grid; margin-top: 10px; border-left: 2px solid var(--surface-2); margin-left: 15px; }
.evenement { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0 8px 0; margin-left: -16px; font-size: 14.5px; }
.evenement-ico {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fond); border: 1.5px solid var(--bord); color: var(--violet);
}
.evenement-ico .ico { width: 15px; height: 15px; }
.evenement-texte { flex: 1; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; color: var(--encre-2); }
.evenement-texte b { color: var(--encre); font-weight: 700; }
.evenement time { flex: none; padding-top: 5px; font-size: 12.5px; color: var(--discret); font-variant-numeric: tabular-nums; }

/* ===== Cloche et annonces ===== */
.entete-droite { display: flex; align-items: center; gap: 6px; }
.cloche {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--encre-2); background: var(--surface); text-decoration: none; flex: none;
}
.cloche[aria-current] { background: var(--violet-doux); color: var(--violet-fonce); }
.cloche .pastille { top: 2px; left: auto; right: 0; border: 2px solid var(--fond); height: 20px; min-width: 20px; }
.cloche.sonne .ico { animation: sonne .9s ease-in-out; transform-origin: 50% 10%; }
@keyframes sonne { 15%, 45%, 75% { transform: rotate(14deg); } 30%, 60% { transform: rotate(-14deg); } }

.prochaine {
  margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--rayon);
  background: var(--violet); color: #fff; text-decoration: none; box-shadow: 0 12px 28px -14px rgba(106, 61, 232, .8);
}
.prochaine .date-bloc { background: rgba(255, 255, 255, .16); color: #fff; }
.prochaine .date-bloc small { color: rgba(255, 255, 255, .8); }
.prochaine-corps { flex: 1; min-width: 0; display: grid; }
.prochaine-corps small { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.prochaine-corps b { font: 600 18px/1.25 var(--titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prochaine-corps span { font-size: 13.5px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.date-bloc {
  flex: none; width: 54px; min-height: 60px; border-radius: 14px; background: var(--violet-doux); color: var(--violet-fonce);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
}
.date-bloc b { font: 600 24px/1 var(--titre); margin: 2px 0; }
.date-bloc small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.date-bloc.vide-date .ico { width: 22px; height: 22px; }

.liste-annonces { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.annonce {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--rayon);
  border: 1px solid var(--bord); background: var(--fond);
}
.annonce.non-lue { border-color: rgba(106, 61, 232, .45); background: linear-gradient(180deg, var(--violet-pale), var(--fond)); }
.annonce-corps { flex: 1; min-width: 0; }
.annonce h3 { font-size: 20px; overflow-wrap: anywhere; }
.badge-nouveau {
  display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 999px; background: var(--violet); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.annonce-meta { display: grid; gap: 4px; margin-top: 8px; font-size: 14px; color: var(--encre-2); }
.annonce-meta span { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.annonce-meta .ico { width: 16px; height: 16px; color: var(--violet); }
.annonce-texte { margin: 10px 0 0; color: var(--encre-2); white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; }
.annonce .puces-teams { margin-top: 10px; }
.annonce-pied { margin-top: 10px; font-size: 12.5px; color: var(--discret); }
.lien-danger { color: var(--danger); padding-left: 0; }

.alerte-texte { color: var(--danger); font-weight: 600; }
.etiquette-champ { font-size: 13.5px; font-weight: 700; color: var(--encre-2); }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix .filtre { min-height: 44px; }

/* ===== Calendrier ===== */
.cal {
  margin-top: 16px; padding: 14px 10px 10px; border-radius: 22px; border: 1px solid var(--bord); background: var(--fond);
  touch-action: pan-y;
}
.cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 8px; }
.cal-tete h2 { font-size: 22px; text-transform: capitalize; text-align: center; flex: 1; }
.cal-nav {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--bord); background: var(--fond);
  display: grid; place-items: center; cursor: pointer; color: var(--encre-2);
}
.cal-nav:hover { background: var(--violet-pale); }
.cal-semaine, .cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-semaine span { text-align: center; font-size: 12px; font-weight: 700; color: var(--discret); padding: 6px 0; }
.cal-grille { gap: 2px; }
.cal-jour {
  position: relative; aspect-ratio: 1; min-height: 44px; border: 0; border-radius: 14px; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-weight: 600; font-size: 15px; color: var(--encre); font-variant-numeric: tabular-nums;
  transition: background .15s, color .15s, transform .15s;
}
.cal-jour:hover { background: var(--violet-pale); }
.cal-jour:active { transform: scale(.94); }
.cal-jour.hors { color: #c3bdd3; }
.cal-jour.auj span { color: var(--violet); font-weight: 800; }
.cal-jour.auj::after { content: ''; position: absolute; inset: 4px; border-radius: 12px; border: 1.5px solid var(--violet); pointer-events: none; }
.cal-jour.occupe { background: var(--violet-pale); }
.cal-jour.choisi { background: var(--violet); color: #fff; }
.cal-jour.choisi span { color: #fff; }
.cal-jour.choisi::after { display: none; }
.points { display: flex; gap: 3px; height: 5px; }
.points b { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); }
.points b.autre { background: #b9aee0; }
.cal-jour.choisi .points b { background: #fff; }
.cal-auj { display: block; margin: 4px auto 0; }
.annonce.cliquable { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.annonce.cliquable:hover { border-color: #dcd3f5; box-shadow: var(--ombre); }
#c-liste > .btn { margin-top: 12px; }
@media (min-width: 900px) {
  .cal { padding: 20px; }
  .cal-jour { aspect-ratio: auto; min-height: 64px; }
}

/* ===== Accueil : atouts ===== */
.atouts { display: grid; gap: 12px; }
.atout { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--rayon); background: var(--surface); }
.atout > .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--fond); color: var(--violet); flex: none; }
.atout h3 { font: 700 16px/1.3 var(--texte); letter-spacing: 0; }
.atout p { margin: 4px 0 0; color: var(--encre-2); font-size: 14.5px; }
.pied a { display: block; padding: 12px 0; color: var(--encre-2); }
@media (min-width: 640px) { .atouts { grid-template-columns: repeat(3, 1fr); } .atout { flex-direction: column; } }

/* ===== Photo de profil ===== */
img.avatar-photo { object-fit: cover; padding: 0; background: var(--surface-2); }
.photo-profil { position: relative; flex: none; cursor: pointer; border-radius: 50%; }
.photo-profil .avatar { width: 72px; height: 72px; font: italic 600 28px/1 var(--titre); }
.photo-badge {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--violet); color: #fff; border: 2.5px solid var(--fond);
}
.photo-badge .ico { width: 15px; height: 15px; }
.photo-profil:active { transform: scale(.96); }
.photo-profil:focus-within { outline: 2px solid var(--violet); outline-offset: 3px; }
.lien-discret { padding: 6px 0; min-height: 0; font-size: 13.5px; color: var(--discret); font-weight: 600; }
.profil-tete .mention { display: block; margin-top: 4px; }
.case { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--encre-2); cursor: pointer; min-height: 44px; }
.case input {
  flex: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; border: 1.5px solid #cfc6ea; background: var(--fond);
  appearance: none; -webkit-appearance: none; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.case input:checked { background: var(--violet); border-color: var(--violet); }
.case input:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.case input:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* ===== Badge orga ===== */
.badge-orga {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
  background: var(--violet); color: #fff; font: 800 10.5px/1.5 var(--texte); letter-spacing: .05em; text-transform: uppercase;
}
.membre.est-orga { background: var(--violet-doux); }

/* ===== Accueil membre ===== */
.mini-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mini-team {
  display: grid; justify-items: start; gap: 6px; padding: 14px; border-radius: var(--rayon); text-align: left; cursor: pointer;
  border: 1px solid rgba(106, 61, 232, .3); background: linear-gradient(180deg, var(--violet-pale), var(--fond));
  transition: transform .15s, box-shadow .2s;
}
.mini-team:hover { box-shadow: var(--ombre); }
.mini-team:active { transform: scale(.97); }
.mini-team .team-icone { width: 42px; height: 42px; border-radius: 13px; background: var(--violet); color: #fff; }
.mini-team .team-icone .ico { width: 22px; height: 22px; }
.mini-team-nom { font: 600 17px/1.2 var(--titre); overflow-wrap: anywhere; }
.mini-team-membres { font-size: 12.5px; font-weight: 600; color: var(--discret); }
.rien-prevu {
  margin-top: 16px; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--rayon);
  background: var(--surface); color: var(--encre-2); font-size: 14.5px;
}
.rien-prevu .ico { color: var(--violet); }
.section-tete .lien-btn { white-space: nowrap; }
.lien-fort { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-weight: 700; text-decoration: none; min-height: 44px; }
.lien-fort .ico { width: 16px; height: 16px; }
@media (min-width: 640px) { .mini-teams { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== Bandeau de mise a jour ===== */
.bandeau-maj {
  position: fixed; z-index: 65; left: 50%; transform: translateX(-50%);
  top: calc(12px + env(safe-area-inset-top)); width: min(92vw, 420px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--encre); color: #fff;
  font-weight: 600; font-size: 14.5px; box-shadow: var(--ombre-forte); animation: toast .4s var(--ressort) both;
}

/* ===== Bloc notifications ===== */
.notif-bloc {
  margin-top: 16px; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--rayon);
  background: var(--violet-pale); border: 1px solid #e2d8fb;
}
.notif-bloc.ok { background: #effaf4; border-color: #cfeedd; }
.notif-bloc.ok .notif-ico { color: var(--succes); }
.notif-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--fond); color: var(--violet); }
.notif-corps { flex: 1; min-width: 0; display: grid; gap: 2px; }
.notif-corps b { font-size: 15.5px; }
.notif-corps > span { font-size: 14px; color: var(--encre-2); }
.notif-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.notif-actions:empty { display: none; }
/* zone de tap agrandie sans changer la ligne de texte */
.lien-texte { background: none; border: 0; padding: 11px 0; margin: -11px 0; font: inherit; color: var(--violet); font-weight: 700; text-decoration: underline; cursor: pointer; }
.carte-texte { margin-top: 18px; padding: 20px 18px; border-radius: var(--rayon); border: 1px solid var(--bord); }
.politique h3 { font: 700 16px/1.3 var(--texte); letter-spacing: 0; margin-top: 20px; color: var(--encre); }
.politique h3:first-child { margin-top: 4px; }
.politique p, .politique li { color: var(--encre-2); font-size: 15px; overflow-wrap: anywhere; }
.politique p { margin: 6px 0 0; }
.politique ul { margin: 6px 0 0; padding-left: 20px; }
.feuille .politique { margin: 8px 0 20px; }

/* ===== Tuto ecran d'accueil ===== */
.tuto { text-align: center; padding-top: 6px; }
.tuto-logo { width: 72px; height: 72px; margin: 0 auto 14px; clip-path: circle(48.5%); }
.tuto h2 { font-size: 26px; padding: 0 30px; }
.tuto .detail-desc { margin: 10px 0 18px; }
.tuto-ou { margin: 12px 0 0; }
.tuto-etapes { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; text-align: left; counter-reset: tuto; }
.tuto-etapes li {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface);
}
.tuto-ico {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--fond); color: var(--violet); border: 1px solid var(--bord);
}
.tuto-titre { display: block; font-size: 15px; font-weight: 600; }
.tuto-titre b { font-weight: 800; color: var(--violet-fonce); }
.tuto-desc { display: block; font-size: 13px; color: var(--discret); margin-top: 2px; }

/* ===== Toasts ===== */
.toasts {
  /* les messages ne doivent jamais intercepter un appui destine aux boutons en dessous */
  pointer-events: none;
  position: fixed; z-index: 70; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none;
}
body.sans-nav .toasts { bottom: calc(20px + env(safe-area-inset-bottom)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 16px;
  background: var(--encre); color: #fff; font-weight: 600; font-size: 14.5px; box-shadow: var(--ombre-forte);
  animation: toast .4s var(--ressort) both;
}
.toast.erreur { background: var(--danger); }
.toast .ico { width: 20px; height: 20px; }
/* animation de sortie distincte : rejouer « toast » en sens inverse ne relance rien, le message restait affiche */
.toast.sort { animation: toast-sort .25s ease-in both; }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-sort { to { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ===== Chargement ===== */
.squelette { border-radius: var(--rayon); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: luit 1.2s infinite; height: 82px; }
@keyframes luit { to { background-position: -200% 0; } }

/* ===== Tablette et ordinateur ===== */
@media (min-width: 640px) {
  :root { --gouttiere: 28px; }
  .grille-teams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etapes { grid-template-columns: repeat(3, 1fr); }
  .etape { flex-direction: column; }
  .carte-form { padding: 34px 32px; margin-top: 28px; }
  .chiffres { grid-template-columns: repeat(4, 1fr); }
  .feuille { align-items: center; }
  .feuille-panneau { border-radius: 26px; animation-name: apparait; max-height: 84dvh; }
  .feuille.sort .feuille-panneau { animation-name: disparait; }
  .feuille-poignee { display: none; }
  @keyframes apparait { from { opacity: 0; transform: translateY(16px) scale(.97); } }
  @keyframes disparait { to { opacity: 0; transform: translateY(10px) scale(.98); } }
}
@media (min-width: 900px) {
  .nav-bas { display: none; }
  main { padding-bottom: 56px; }
  .toasts { bottom: 28px; }
  .nav-haut { display: flex; gap: 4px; }
  .nav-haut a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
    text-decoration: none; color: var(--encre-2); font-weight: 600; font-size: 14.5px;
  }
  .nav-haut a .ico { width: 19px; height: 19px; }
  .nav-haut a:hover { background: var(--surface); }
  .nav-haut a[aria-current="page"] { background: var(--violet-doux); color: var(--violet-fonce); }
  .nav-haut a.btn-plein { color: #fff; background: var(--violet); }
  .grille-teams { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team { flex-direction: column; align-items: flex-start; padding: 20px; min-height: 196px; }
  .team-corps { width: 100%; }
  .team-accroche { white-space: normal; }
  .team .rejoindre { position: absolute; top: 16px; right: 16px; }
  .hero { padding-top: 64px; }
  .hero-actions .btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .defile-piste { animation: none; flex-wrap: wrap; width: auto; padding: 4px var(--gouttiere); }
  .defile-double { display: none; }
}

/* Tableau de team (musique) : morceaux en lignes, instruments en colonnes */
.detail-tableau { margin-top: 10px; }
.tb-defile {
  overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  margin: 16px calc(var(--gouttiere) * -1) 0; padding: 0 var(--gouttiere) 6px 0;
}
.tb-defile:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.tb { border-collapse: separate; border-spacing: 0 6px; min-width: 100%; }
.tb th, .tb td { padding: 0 3px; vertical-align: middle; }
.tb thead th {
  font: 700 12px/1.2 var(--texte); letter-spacing: .05em; text-transform: uppercase; color: var(--discret);
  text-align: center; padding-bottom: 4px; white-space: nowrap;
}
.tb th[scope="row"], .tb .tb-coin {
  position: sticky; left: 0; z-index: 1; background: var(--fond);
  text-align: left; min-width: calc(118px + var(--gouttiere)); max-width: calc(150px + var(--gouttiere)); padding: 0 10px 0 var(--gouttiere);
  box-shadow: 6px 0 8px -8px rgba(27, 21, 48, .25);
}
.tb th[scope="row"] { font: 700 14px/1.25 var(--texte); }
.tb-titre { display: block; overflow-wrap: anywhere; }
.tb th small { display: block; font-weight: 500; font-size: 12px; color: var(--discret); }
.tb-entete, .tb-ligne {
  background: none; border: 0; padding: 6px 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-align: inherit; border-radius: 8px; min-height: 40px;
}
.tb-ligne { display: block; width: 100%; }
.tb-entete .ico { width: 12px; height: 12px; opacity: .6; }
.tb-entete:hover, .tb-ligne:hover { background: var(--violet-pale); }
.tb td { min-width: 96px; }
.tb-case {
  width: 100%; min-height: 54px; padding: 6px; border-radius: var(--rayon-s); cursor: pointer;
  border: 1.5px dashed var(--bord); background: var(--fond); color: var(--encre);
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, transform .15s var(--ressort);
}
.tb-case:active:not(:disabled) { transform: scale(.96); }
.tb-case:disabled { cursor: default; opacity: .75; }
.tb-case.remplie { border-style: solid; border-color: transparent; background: var(--surface-2); }
.tb-case.a-moi { background: var(--violet-doux); border-color: var(--violet); }
.tb-vide { color: #c9c0e4; font-size: 20px; font-weight: 600; line-height: 1; }
.tb-puce { font-size: 12.5px; font-weight: 700; background: var(--fond); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tb-puce.moi { background: var(--violet); color: #fff; }
.tb-resume.complet { display: flex; align-items: center; gap: 8px; color: var(--succes); font-weight: 700; margin-top: 18px; }
.tb-resume .ico { width: 18px; height: 18px; }
.tb-choix { display: grid; gap: 4px; margin: 14px 0 18px; }
.tb-choix .membre { background: none; padding-left: 0; }
.tb-deplacer { display: flex; gap: 8px; margin-top: 10px; }
.tb-deplacer .btn { flex: 1; }
.tb-aide { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 10px 14px; border-radius: var(--rayon-s); background: var(--ambre-doux); color: var(--ambre); font-size: 14px; font-weight: 600; }
.tb-aide .ico { width: 18px; height: 18px; flex: none; }

/* Page d'une team : la carte choisie en haut, son contenu dessous */
.tp { margin-top: 18px; }
.tp-carte { cursor: default; padding: 16px; will-change: transform; }
.tp-carte:hover { box-shadow: none; border-color: rgba(106, 61, 232, .45); }
.tp-carte:not(.rejointe):hover { border-color: var(--bord); }
.tp-carte:active { transform: none; }
.tp-carte .team-nom { font-size: 24px; margin: 0; }
.tp-menu {
  flex: none; align-self: flex-start; width: 44px; height: 44px; border-radius: 50%; border: 0; margin: -6px -6px 0 0;
  background: none; color: var(--encre-2); display: grid; place-items: center; cursor: pointer;
}
.tp-menu:hover { background: var(--violet-doux); }
.tp-menu .ico { width: 22px; height: 22px; transform: rotate(90deg); }
.tp-corps .detail-desc { margin-top: 18px; }
.tp-rejoindre { margin-top: 18px; }
.tp-corps > .sous-titre { margin-top: 36px; }
.tp-bientot { margin-top: 24px; }
.mt-section { margin-top: 28px; }
.mt-section > h2 { font-size: 26px; }
a.ligne { text-decoration: none; color: inherit; }
.ligne .team-icone { width: 40px; height: 40px; border-radius: 12px; }
.ligne .team-icone .ico { width: 20px; height: 20px; }
.ligne > .ico { width: 18px; height: 18px; color: var(--discret); flex: none; }
.tp-quitter { margin-top: 24px; }
#feuille-contenu .sous-titre:first-of-type { margin-top: 18px; }

/* 7 boutons (orgas) : texte un peu plus petit pour que les libelles ne se touchent pas */
.nav-bas.serree a { font-size: 10.5px; letter-spacing: -.01em; }

/* Calendrier : prochaines dates en tuiles cote a cote */
.tuiles-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .tuiles-dates { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .tuiles-dates { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tuile-date {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 12px;
  border-radius: var(--rayon-s); border: 1px solid var(--bord); background: var(--fond); color: var(--encre);
  font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s var(--ressort);
}
.tuile-date:hover { border-color: #dcd3f5; box-shadow: var(--ombre); }
.tuile-date:active { transform: scale(.97); }
.tuile-date.autre { background: var(--surface); }
.td-date { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--violet-fonce); }
.td-date b { font: 600 28px/1 var(--titre); }
.td-date small { font-size: 11px; font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: .04em; }
.td-titre {
  font-weight: 700; font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.td-info { display: flex; align-items: center; gap: 5px; max-width: 100%; font-size: 12.5px; color: var(--encre-2); }
.td-info .ico { width: 13px; height: 13px; flex: none; color: var(--violet); }
.td-info span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#c-liste { scroll-margin-top: 84px; }

/* Emargement par team */
.emarge-place + .emarge-place { margin-top: 10px; }
.emarge-plusieurs { font-size: 13.5px; margin: 0 0 10px; }
.emarge-puces { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.appel-teams { margin-top: 14px; }
.appel-teams .filtre { display: inline-flex; align-items: center; gap: 6px; }
.appel-teams .filtre .ico { width: 16px; height: 16px; }
.appel-teams .filtre small { font-size: 12px; font-weight: 700; opacity: .75; }
