/* =============================================================================================
   accueil.css — Lot UX « Accueil, Staff, Présences » (16/11/2026)

   L'accueil dans le langage des pages Coach, Équipe et Outils refaites aujourd'hui (maquette
   `_CLAUDE_IMPORT/MAQUETTES_ACCUEIL_2026-11-16/01_accueil_maquette.webp`) : la MISE EN PLACE et
   la MISE EN FORME, pas les couleurs. Charte actuelle, aucun violet, pas de mascotte. Bornée à
   la vue d'accueil. Rien n'est retiré : chaque bloc garde ses identifiants et ses gestes.
   ============================================================================================= */

#view-home {
  --ac-gouttiere: clamp(22px, 3vw, 48px);
  --ac-rayon: 18px;
}
#view-home .picto { flex: none; }

/* --- 1. Le bandeau, pleine largeur ------------------------------------------------------------ */
#view-home .accueil-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: -30px calc(-1 * var(--ac-gouttiere)) 18px;
  padding: 26px var(--ac-gouttiere) 28px;
  border-radius: 0;
  box-shadow: none;
}
#view-home .accueil-hero > :not(.ac-hero-visuel) { position: relative; z-index: 1; }
#view-home .ac-hero-visuel {
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  z-index: 0;
  background: url("/app/decor-stade-paysage.webp") center 62% / cover no-repeat;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #fff 55%);
  mask-image: linear-gradient(90deg, transparent 0%, #fff 55%);
  pointer-events: none;
}
/* Correctif du 16/11 au soir : un bloc à droite, aligné — le bouton principal (quand une séance
   existe), puis « … » sur la même ligne, puis la ligne des disponibilités en dessous. Plus rien
   ne flotte seul en haut. */
#view-home .accueil-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 28px; }
#view-home .accueil-hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; align-content: center;
  gap: 10px; max-width: 440px; align-self: center;
}
#view-home .accueil-hero-actions .menu-secondaire-bouton { min-height: 44px; min-width: 48px; }
#view-home .accueil-hero-actions .accueil-dispo { flex: 1 0 100%; justify-content: flex-end; text-align: right; margin: 2px 0 0; }
#view-home #accueil-action-principale { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding-inline: 22px; }

/* --- 2. Quatre chiffres clés : le rond, la valeur, le rappel translucide ------------------------ */
#view-home .accueil-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
#view-home :where(.tq-kpi-carte:not([data-tq-ton])) { --tq-encre: var(--section); --tq-fond: var(--section-soft); }
#view-home [data-tq-ton="bleu"] { --tq-encre: var(--blue); --tq-fond: var(--blue-soft); }
#view-home [data-tq-ton="vert"] { --tq-encre: var(--green); --tq-fond: var(--green-soft); }
#view-home [data-tq-ton="orange"] { --tq-encre: var(--orange); --tq-fond: var(--orange-soft); }
#view-home [data-tq-ton="teal"] { --tq-encre: var(--teal); --tq-fond: var(--teal-soft); }
#view-home .tq-kpi-carte {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
  align-items: center;
  gap: 16px;
  min-height: 100px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--ac-rayon);
  background: var(--surface-premium);
  box-shadow: var(--ombre-1);
}
#view-home .tq-kpi-carte::before,
#view-home .tq-kpi-carte::after { display: none; }
#view-home .tq-kpi-rond {
  display: inline-grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--tq-fond); color: var(--tq-encre);
}
#view-home .tq-kpi-rond .picto { width: 28px; height: 28px; }
#view-home .tq-kpi-texte { display: grid; gap: 4px; min-width: 0; }
#view-home .tq-kpi-carte .accueil-kpi-valeur { font-size: 2.2rem; line-height: 1; color: var(--ink); white-space: nowrap; }
#view-home .tq-kpi-carte .accueil-kpi-libelle {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate);
}
#view-home .tq-kpi-fond { margin-left: auto; color: var(--tq-encre); opacity: 0.13; }
#view-home .tq-kpi-fond .picto { width: 52px; height: 52px; stroke-width: 2.2; }

/* --- 3. « À faire maintenant » : une ligne, une bordure d'accent, « Voir la liste → » ------------ */
#view-home .accueil-actions-liste { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
#view-home .accueil-action-carte {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "rond titre lien" "rond detail lien";
  align-items: center;
  column-gap: 14px;
  min-height: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ac-accent, var(--orange));
  border-radius: 14px;
  background: var(--surface-premium);
  text-align: left;
}
#view-home .accueil-action-carte[data-ton="information"] { --ac-accent: var(--blue); }
#view-home .accueil-action-carte[data-ton="alerte"] { --ac-accent: var(--red); }
#view-home .accueil-action-rond {
  grid-area: rond; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in srgb, var(--ac-accent, var(--orange)) 14%, var(--surface-premium));
  color: var(--ac-accent, var(--orange));
}
#view-home .accueil-action-rond .picto { width: 22px; height: 22px; }
#view-home .accueil-action-titre { grid-area: titre; font-size: 1.02rem; font-weight: 850; color: var(--ink); }
#view-home .accueil-action-detail { grid-area: detail; color: var(--slate); font-size: 0.86rem; }
#view-home .accueil-action-lien {
  grid-area: lien; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-pilule);
  background: var(--surface-premium); color: var(--ink); font-size: 0.86rem; font-weight: 800; white-space: nowrap;
}
#view-home .accueil-action-carte:hover .accueil-action-lien { border-color: var(--section); color: var(--section); }

/* --- 4. « Mon équipe » (widget FFF) — correctif du 16/11 au soir ---------------------------------
   Vérifié sur une équipe RÉELLEMENT reliée (pages réelles du C.A. de Pontarlier). Le même rendu à
   l'accueil et dans la fenêtre « Mon équipe » que le DT ouvre depuis son planning. */
#view-home .accueil-fff { padding: 20px 22px; border-radius: var(--ac-rayon); }
:is(#view-home, #fff-dialog) .fff-carte { display: grid; gap: 14px; }
:is(#view-home, #fff-dialog) .fff-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
:is(#view-home, #fff-dialog) .fff-tete-rond {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
}
:is(#view-home, #fff-dialog) .fff-tete-rond .picto { width: 22px; height: 22px; }
:is(#view-home, #fff-dialog) .fff-tete-sur { margin: 0; color: var(--slate); font-size: 0.74rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
:is(#view-home, #fff-dialog) .fff-tete strong { font-size: 1.15rem; }
:is(#view-home, #fff-dialog) .fff-tete .fff-championnat { margin-left: 6px; color: var(--slate); font-weight: 700; }
:is(#view-home, #fff-dialog) .fff-etat { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--slate); font-size: 0.82rem; }
:is(#view-home, #fff-dialog) .fff-actualiser {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface-premium); color: var(--ink); cursor: pointer;
}
:is(#view-home, #fff-dialog) .fff-actualiser .picto { width: 16px; height: 16px; }

/* Les trois cartes visuelles. */
:is(#view-home, #fff-dialog) .fff-grille { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-content: start; }
:is(#view-home, #fff-dialog) .fff-bloc {
  display: grid; gap: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface-premium); box-shadow: var(--ombre-1);
}
:is(#view-home, #fff-dialog) .fff-bloc-titre {
  display: flex; align-items: center; gap: 8px; margin: 0;
  color: var(--blue); font-size: 0.8rem; font-weight: 850; letter-spacing: 0.05em; text-transform: uppercase;
}
:is(#view-home, #fff-dialog) .fff-bloc-titre .picto { width: 18px; height: 18px; }
:is(#view-home, #fff-dialog) .fff-rebours {
  margin-left: auto; padding: 3px 10px; border-radius: var(--radius-pilule);
  background: var(--blue-soft); color: var(--blue); font-size: 0.74rem; letter-spacing: 0; text-transform: none;
}
:is(#view-home, #fff-dialog) .fff-bloc-corps { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
:is(#view-home, #fff-dialog) .fff-bloc-texte { display: grid; gap: 2px; flex: 1 1 160px; min-width: 0; }
:is(#view-home, #fff-dialog) .fff-adversaire { font-size: 1.05rem; font-weight: 880; text-transform: uppercase; overflow-wrap: anywhere; }
:is(#view-home, #fff-dialog) .fff-quand { font-size: 1rem; font-weight: 750; color: var(--ink); }
:is(#view-home, #fff-dialog) .fff-logo-rond {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: 48px; height: 48px; border-radius: 50%; background: var(--surface-soft); color: var(--muted);
}
:is(#view-home, #fff-dialog) .fff-logo-rond.est-grand { width: 64px; height: 64px; }
:is(#view-home, #fff-dialog) .fff-logo-rond img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
:is(#view-home, #fff-dialog) .fff-logo-rond .picto { width: 60%; height: 60%; }
:is(#view-home, #fff-dialog) .fff-face { display: inline-flex; }
:is(#view-home, #fff-dialog) .fff-face .fff-logo-rond + .fff-logo-rond { margin-left: -10px; box-shadow: 0 0 0 3px var(--surface-premium); }
:is(#view-home, #fff-dialog) .fff-puce {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: var(--radius-pilule); background: var(--surface-soft); color: var(--slate);
  font-size: 0.8rem; font-weight: 800; white-space: nowrap;
}
:is(#view-home, #fff-dialog) .fff-puce .picto { width: 15px; height: 15px; }
:is(#view-home, #fff-dialog) .fff-puce[data-lieu="domicile"] { background: var(--green-soft); color: var(--green); }
:is(#view-home, #fff-dialog) .fff-puce.est-reliee { background: var(--green-soft); color: var(--green); white-space: normal; }
:is(#view-home, #fff-dialog) .fff-score-pastille {
  display: inline-flex; align-items: center; justify-content: center; min-width: 84px;
  padding: 8px 16px; border-radius: 14px; background: var(--surface-soft); color: var(--slate);
  font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums;
}
:is(#view-home, #fff-dialog) .fff-score-pastille[data-vnd="V"] { background: var(--green-soft); color: var(--green); }
:is(#view-home, #fff-dialog) .fff-score-pastille[data-vnd="D"] { background: var(--red-soft); color: var(--red); }
:is(#view-home, #fff-dialog) .fff-rang { font-size: 2.6rem; line-height: 1; font-weight: 900; }
:is(#view-home, #fff-dialog) .fff-rang sup { font-size: 0.45em; }
:is(#view-home, #fff-dialog) .fff-forme { display: inline-flex; gap: 6px; }
:is(#view-home, #fff-dialog) .fff-forme .fff-vnd {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-weight: 900; background: var(--surface-soft); color: var(--slate);
}
:is(#view-home, #fff-dialog) .fff-vnd[data-vnd="V"] { background: var(--green-soft); color: var(--green); }
:is(#view-home, #fff-dialog) .fff-vnd[data-vnd="D"] { background: var(--red-soft); color: var(--red); }
:is(#view-home, #fff-dialog) .fff-vnd[data-vnd="N"] { background: var(--orange-soft); color: var(--orange); }
:is(#view-home, #fff-dialog) .fff-points { margin-left: auto; color: var(--slate); }
:is(#view-home, #fff-dialog) .fff-points strong { font-size: 1.3rem; color: var(--ink); }

/* Le classement, aéré ; notre ligne surlignée, bordure à gauche et « Nous ». */
:is(#view-home, #fff-dialog) .fff-classement {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-premium); box-shadow: var(--ombre-1);
}
:is(#view-home, #fff-dialog) .fff-classement > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  color: var(--blue); font-size: 0.82rem; font-weight: 850; letter-spacing: 0.04em; text-transform: uppercase;
}
:is(#view-home, #fff-dialog) .fff-classement > summary .picto { width: 18px; height: 18px; }
:is(#view-home, #fff-dialog) .fff-classement > summary .coach-note { text-transform: none; letter-spacing: 0; font-weight: 600; }
:is(#view-home, #fff-dialog) .fff-table { margin-top: 10px; overflow-x: auto; }
:is(#view-home, #fff-dialog) .fff-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
:is(#view-home, #fff-dialog) .fff-table th {
  padding: 8px 10px; color: var(--slate); font-size: 0.74rem; font-weight: 850; text-transform: uppercase; text-align: left;
  border-bottom: 1px solid var(--line);
}
:is(#view-home, #fff-dialog) .fff-table td { padding: 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
:is(#view-home, #fff-dialog) .fff-table .fff-col-rang { width: 42px; font-weight: 850; color: var(--slate); }
:is(#view-home, #fff-dialog) .fff-table .fff-col-equipe { font-weight: 700; }
:is(#view-home, #fff-dialog) .fff-table .fff-col-pts { font-weight: 900; }
:is(#view-home, #fff-dialog) .fff-table tr.est-podium .fff-col-rang { color: var(--amber); }
:is(#view-home, #fff-dialog) .fff-table tr.est-nous td { background: var(--blue-soft); font-weight: 850; }
:is(#view-home, #fff-dialog) .fff-table tr.est-nous td:first-child { box-shadow: inset 4px 0 0 var(--blue); border-radius: 8px 0 0 8px; }
:is(#view-home, #fff-dialog) .fff-table tr.est-nous td:last-child { border-radius: 0 8px 8px 0; }
:is(#view-home, #fff-dialog) .fff-nous {
  margin-left: 6px; padding: 2px 8px; border-radius: var(--radius-pilule); background: var(--blue); color: #fff; font-size: 0.7rem;
}

/* Les actions : des pastilles-boutons homogènes, avec leurs icônes. */
:is(#view-home, #fff-dialog) .fff-actions,
:is(#view-home, #fff-dialog) .fff-lien-mjp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:is(#view-home, #fff-dialog) .fff-actions { padding-top: 12px; border-top: 1px solid var(--line); }
:is(#view-home, #fff-dialog) :is(.fff-actions, .fff-lien-mjp) :is(.button, .fff-lien) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: var(--radius-pilule); font-size: 0.84rem; text-decoration: none;
}
:is(#view-home, #fff-dialog) .fff-actions .fff-lien { border: 1px solid var(--line); color: var(--ink); font-weight: 800; }
:is(#view-home, #fff-dialog) :is(.fff-actions, .fff-lien-mjp) .picto { width: 16px; height: 16px; }
:is(#view-home, #fff-dialog) .fff-lien-mjp .ec-action-maitresse { margin-left: auto; }

@media (min-width: 1200px) {
  :is(#view-home, #fff-dialog) .fff-carte {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.4fr);
    grid-template-areas: "tete tete" "gauche droite" "actions actions" "lien lien";
    column-gap: 18px;
  }
  :is(#view-home, #fff-dialog) .fff-carte > .fff-tete { grid-area: tete; }
  :is(#view-home, #fff-dialog) .fff-carte > .fff-grille { grid-area: gauche; }
  :is(#view-home, #fff-dialog) .fff-carte > details { grid-area: droite; align-self: start; }
  :is(#view-home, #fff-dialog) .fff-carte > .fff-actions { grid-area: actions; }
  :is(#view-home, #fff-dialog) .fff-carte > .fff-lien-mjp { grid-area: lien; }
  :is(#view-home, #fff-dialog) .fff-carte > :not(.fff-tete):not(.fff-grille):not(details):not(.fff-actions):not(.fff-lien-mjp) { grid-column: 1 / -1; }
}

/* --- 5. « Prochaine séance » : les faits en ligne, une photo discrète à droite ------------------- */
#view-home .accueil-seance { position: relative; overflow: hidden; isolation: isolate; }
#view-home .accueil-seance::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 38%;
  z-index: -1;
  background: url("/app/decor-amateur-surface.webp") center / cover no-repeat;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #fff 60%);
  mask-image: linear-gradient(90deg, transparent 0%, #fff 60%);
  pointer-events: none;
}
#view-home .accueil-seance > * { max-width: 68%; }

/* --- 5 bis. « Semaine en cours » : les sous-principes numérotés, aux couleurs de la charte -------- */
#view-home .week-subprinciple[data-rank="1"] { --rang: var(--blue); }
#view-home .week-subprinciple[data-rank="2"] { --rang: var(--teal); }
#view-home .week-subprinciple[data-rank="3"] { --rang: var(--orange); }

/* --- 6. « Accès rapides » : cinq cartes, l'icône dans un rond ----------------------------------- */
#view-home .accueil-acces-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
#view-home .accueil-acces-carte { border-radius: 14px; box-shadow: var(--ombre-1); }
#view-home .accueil-acces-carte:hover { box-shadow: var(--ombre-2); }

/* --- Le planning et le périmètre du DT : mêmes cartes ---------------------------------------- */
#view-home .accueil-perimetre { border-radius: var(--ac-rayon); }

#view-home :is(.accueil-action-carte, .accueil-acces-carte, #accueil-action-principale):focus-visible {
  outline: 3px solid var(--section); outline-offset: 2px;
}

@media (max-width: 860px) {
  #view-home .accueil-hero { grid-template-columns: minmax(0, 1fr); }
  #view-home .accueil-hero-actions { justify-content: flex-start; max-width: none; }
  #view-home .accueil-hero-actions .accueil-dispo { justify-content: flex-start; text-align: left; }
  #view-home .accueil-actions-liste { grid-template-columns: minmax(0, 1fr); }
  #view-home .accueil-seance::after { display: none; }
  #view-home .accueil-seance > * { max-width: none; }
  #view-home .tq-kpi-fond { display: none; }
}
@media (max-width: 620px) {
  #view-home { --ac-gouttiere: 15px; }
  #view-home .accueil-hero { margin-top: -22px; padding-block: 20px 22px; }
  #view-home .accueil-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #view-home .tq-kpi-carte { min-height: 0; padding: 12px; gap: 10px; }
  #view-home .tq-kpi-rond { width: 40px; height: 40px; }
  #view-home .tq-kpi-rond .picto { width: 22px; height: 22px; }
  #view-home .tq-kpi-carte .accueil-kpi-valeur { font-size: 1.6rem; }
  #view-home .tq-kpi-carte .accueil-kpi-libelle { font-size: 0.66rem; letter-spacing: 0.02em; overflow-wrap: anywhere; }
  #view-home .accueil-action-carte { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rond titre" "rond detail" "lien lien"; row-gap: 8px; }
  #view-home .accueil-action-lien { justify-self: start; }
  #view-home .accueil-acces-grille { grid-template-columns: minmax(0, 1fr); }
}

/* « Pas de violet » : l'icône de la Programmation prend le bleu de la charte, ici. */
#view-home #accueil-acces-planning .accueil-acces-icone { background: var(--blue-soft); color: var(--blue); }

/* « Mon équipe » porte son propre en-tête : le titre de la section ne le répète pas. */
#view-home .accueil-fff:has(.fff-carte) > #accueil-fff-titre { display: none; }

/* Au téléphone, l'ordre des blocs (styles.css, ≤ 640 px) a été écrit avant « Mon équipe » et le
   périmètre du DT : restés à `order: 0`, ils passaient AVANT le bandeau. Ils prennent leur
   place, après les alertes et les repères, avant la semaine. */
@media (max-width: 640px) {
  #view-home .accueil-perimetre,
  #view-home .accueil-fff { order: 4; }
}

/* Le classement défile dans sa carte, il ne coupe pas « 1-0-1 » en trois lignes. */
:is(#view-home, #fff-dialog) .fff-table td:not(.fff-col-equipe),
:is(#view-home, #fff-dialog) .fff-table th { white-space: nowrap; }
:is(#view-home, #fff-dialog) .fff-table .fff-col-equipe { min-width: 140px; }
