/* Pages sans maquette habillées avec le langage du pack design v2 (design/pack-v2, 23/10/2026) : fiche journée, fiche circuit,
   espace pilote, pages secondaires. Chargé seulement par ces pages, qui portent la classe body.p2 ; tout est limité à body.p2
   pour ne rien changer ailleurs (Paddock, messagerie, agenda, accueil). Réutilise les composants td2-* du socle (site.css) :
   .td2-carte, .td2-badge, .td2-seg, .td2-puce, .td2-titre-barre. Préfixes : p2- (commun), fj- (fiche journée), ci- (circuit). */

/* ================================================================ Socle commun des pages */
body.p2 { background: var(--td2-bg); }
.p2 .crumbs { margin-bottom: 16px; font-size: 13px; color: var(--td2-muted); }
.p2 .crumbs a { color: var(--ink-2); text-underline-offset: 3px; }
.p2 .crumbs a:hover { color: var(--td2-action); }

/* Titre de page : Manrope 800, 32–40 px, barre rouge inclinée du pack (comme « On roule quand ? ») */
.p2 .page-head h1, .p2 .p2-h1 { font: 800 clamp(28px, 3.2vw, 40px)/1.12 var(--f-display); letter-spacing: -.025em; color: var(--td2-ink); }
.p2 .page-head:not(.ci-tete) h1:not(.tb-gr-titre):not(#cv-titre)::before, .p2 .p2-h1::before { content: ""; display: inline-block; width: 8px; height: .8em; margin-right: 14px;
  background: var(--td2-action); transform: skew(-15deg); vertical-align: -.04em; }
.p2 .lede { color: var(--ink-2); font-size: 16px; }

/* Cartes : surface blanche, bordure #DFE3E6, rayon 12 px, ombre légère ; espacement 16 px */
.p2 .card { background: var(--td2-surface); border: 1px solid var(--td2-border); border-radius: var(--td2-radius); box-shadow: var(--td2-shadow); }
.p2 .td-grid .card, .p2 .ci-grid .card { overflow: clip; }
.p2 .card + .card { margin-top: 16px; }
.p2 .card-h { display: flex; align-items: center; padding: 18px 20px 0; font: 800 18px/1.25 var(--f-display); letter-spacing: -.015em; text-transform: none; color: var(--td2-ink); }
.p2 .card-h::before { content: ""; flex: none; width: 6px; height: 15px; margin-right: 11px; background: var(--td2-action); transform: skew(-15deg); }
.p2 .card-b { padding: 14px 20px 20px; }
/* Bandeaux titre + lien (tableau de bord, temps au tour) : le bandeau porte la marge, pas le titre */
.p2 .tdb-h, .p2 .tt-tete { align-items: center; padding: 18px 20px 0; }
.p2 .tdb-h .card-h, .p2 .tt-tete .card-h { padding: 0; }
.p2 .tdb-voir, .p2 .tdb-h > a { font: 600 13.5px var(--f-text); color: var(--td2-action); }
/* Titres de section entre les cartes (« Réglages »…) */
.p2 .gb-titre { display: flex; align-items: center; margin: 32px 0 14px; font: 800 22px/1.2 var(--f-display); letter-spacing: -.02em; color: var(--td2-ink); }
.p2 .gb-titre::before { content: ""; width: 7px; height: 17px; margin-right: 12px; background: var(--td2-action); transform: skew(-15deg); }
.p2 .source { padding: 12px 20px 14px; border-top-color: var(--td2-border); font-size: 12.5px; color: var(--td2-muted); }
.p2 .source a { color: var(--ink-2); }

/* Grilles d'infos (dl) : cases séparées par un filet clair, libellé gris 12,5 px, valeur 14,5 px */
.p2 .spec { gap: 1px; background: #eef0f2; border-top-color: #eef0f2; }
.p2 .spec div { padding: 13px 20px; }
.p2 .spec .ico { color: var(--td2-muted); }
.p2 .spec dt { color: var(--td2-muted); }
.p2 .spec dd { font-weight: 600; color: var(--td2-ink); }

/* Boutons-liens : jamais soulignés */
.p2 a.btn, .p2 a.btn:hover, .p2 .status-cta a, .p2 .status-cta a:hover { text-decoration: none; }
.p2 .status-cta .btn-2l b, .p2 .status-cta .btn-2l small { text-decoration: none; }

/* Liens latéraux, en boutons de 44 px */
.p2 .side-links a { min-height: 44px; border-color: var(--td2-border); border-radius: 10px; color: var(--td2-ink); font-weight: 600; }
.p2 .side-links a:hover { border-color: var(--rule-strong); background: var(--td2-bg); }
.p2 .side-links a .ico { color: var(--td2-muted); }

/* Tableaux */
.p2 .ci-tab { border-top-color: var(--td2-border); }
.p2 .ci-tab th { background: var(--td2-bg); color: var(--td2-muted); font-size: 11.5px; }
.p2 .ci-tab td { border-top-color: #eef0f2; }

/* Choix « trier par » rendu en onglets segmentés (td2-seg) */
.p2 .tri { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--td2-border); border-radius: 10px; background: #fff; }
.p2 .tri button, .p2 .ci-comp-h .tri button { min-height: 40px; height: auto; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--td2-ink);
  font: 600 14px var(--f-text); cursor: pointer; }
.p2 .tri button[aria-checked=true], .p2 .ci-comp-h .tri button[aria-checked=true] { background: var(--td2-active-bg); color: var(--td2-action); }

/* Petites étiquettes de disponibilité (listes de dates) alignées sur .td2-badge */
.p2 .mini { border-radius: 99px; font: 600 12.5px/1.3 var(--f-text); padding: 4px 10px; }
.p2 .mini.st-complet { background: var(--td2-active-bg); color: var(--td2-action-hover); }

/* Badges d'en-tête : icône discrète dans les badges sans point */
.p2 .fj-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.p2 .fj-badges .td2-badge { padding: 5px 11px; font-size: 13px; }
.p2 .fj-badges .td2-badge .ico { width: 14px; height: 14px; color: var(--td2-muted); }
.p2 .fj-badges + .td2-releve { margin-top: 8px; }

/* Focus clavier visible partout dans la page */
.p2 main a:focus-visible, .p2 main button:focus-visible, .p2 main select:focus-visible, .p2 main input:focus-visible, .p2 main textarea:focus-visible,
.p2 main summary:focus-visible, .p2 main [tabindex]:focus-visible { outline: 2px solid var(--td2-action); outline-offset: 2px; }

/* ================================================================ Fiche journée (trackday.html, fiche.js) */
.fj-tete { display: grid; grid-template-columns: 76px minmax(0, 1fr) 150px; gap: 22px; align-items: center; margin-bottom: 20px; padding: 22px 24px; }
.fj-date { display: flex; flex-direction: column; line-height: 1.05; }
.fj-date b { font: 800 48px/1 var(--f-display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--td2-ink); }
.fj-date span { margin-top: 6px; font: 700 13px/1 var(--f-text); color: var(--td2-action); text-transform: uppercase; letter-spacing: .04em; }
.fj-date small { margin-top: 5px; font-size: 12.5px; color: var(--td2-muted); }
.p2 .fj-tete h1 { font: 800 clamp(26px, 2.8vw, 36px)/1.12 var(--f-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.p2 .fj-tete .td-sub { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.p2 .fj-tete .td-sub a { color: var(--td2-ink); font-weight: 600; }
.fj-trace { display: grid; place-items: center; height: 120px; border-radius: 10px; background: var(--td2-bg); border: 1px solid #eef0f2; }
.fj-trace:hover { border-color: var(--rule-strong); }
.fj-trace .trace-mini { width: 104px; height: 104px; }
.fj-trace .trace-mini .tr-loop { stroke: var(--td2-ink); stroke-width: 2.4; }
.fj-trace .trace-none.trace-mini { width: 56px; height: 56px; border: 0; background: none; }
.p2 .td-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
.p2 .td-grid > div:first-child { display: grid; gap: 16px; min-width: 0; }
.p2 .td-grid > div:first-child > .card { margin-top: 0; }
.p2 .fi-convois[hidden] { display: none; }
.p2 .trace-card { grid-template-columns: 84px 1fr; }
.p2 .trace-card .trace, .p2 .trace-card .trace-none { width: 84px; }

/* Places : pastille, jauge et actions aux couleurs du pack (vert / ambre / rouge discret / gris) */
.p2 .place-card { padding: 20px 20px 0; --pc: var(--td2-success); --pc-soft: var(--td2-success-bg); }
.p2 .place-card.st-dernieres { --pc: var(--td2-warning); --pc-soft: var(--td2-warning-bg); }
.p2 .place-card.st-complet { --pc: var(--td2-action-hover); --pc-soft: var(--td2-active-bg); }
.p2 .place-card.st-inconnu { --pc: var(--td2-neutral); --pc-soft: var(--td2-neutral-bg); }
.p2 .pc-pill { border-radius: 10px; }
.p2 .place-card h2 { font: 800 22px/1.2 var(--f-display); letter-spacing: -.02em; }
.p2 .pc-fraicheur { color: var(--td2-muted); }
.p2 .pc-jauge i { border-radius: 3px; }
.p2 .place-card .status-cta { padding: 18px 0 20px; }
.p2 .status-cta .btn { height: auto; min-height: 48px; padding-top: 6px; padding-bottom: 6px; border-radius: 10px; }

/* Météo : créneaux en petites cases */
.p2 .meteo .h { border-color: var(--td2-border); border-radius: 10px; background: var(--td2-bg); }
.p2 .meteo .h .ico { color: var(--td2-ink); }
.p2 .climat { border-color: var(--td2-border); border-radius: 10px; background: var(--td2-bg); }
.p2 .fi-meteo { margin-top: 14px; }
.p2 .tarifs td { padding: 11px 0; border-bottom: 1px solid #eef0f2; }
.p2 .tarifs td:last-child { font: 700 15px var(--f-text); color: var(--td2-ink); }

/* Colonne de droite */
.p2 .side .card + .card { margin-top: 16px; }
.p2 .trace-card .trace .tr-loop { stroke: var(--td2-ink); }
.p2 .fi-es p b { font-size: 22px; }
.p2 .fi-es-lien { min-height: 44px; border-color: var(--td2-border); border-radius: 10px; }

/* ================================================================ Fiche circuit (circuit.html, circuit.js) */
.ci-tete { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 22px; align-items: center; margin-bottom: 20px; padding: 22px 24px; }
.ci-tete-trace { display: grid; place-items: center; height: 120px; border-radius: 10px; background: var(--td2-bg); border: 1px solid #eef0f2; }
.ci-tete-trace .trace-mini { width: 100px; height: 100px; }
.ci-tete-trace .trace-mini .tr-loop { stroke: var(--td2-ink); stroke-width: 2.4; }
.ci-tete-trace .trace-none.trace-mini { width: 56px; height: 56px; border: 0; background: none; }
.p2 .ci-tete h1 { display: flex; align-items: center; gap: 12px; overflow-wrap: anywhere; }
.p2 .ci-tete h1 .flag { flex: none; }
.p2 .ci-tete .lede { margin-top: 6px; }
.p2 .ci-tete .map-cta { align-self: center; min-height: 56px; border: 1px solid var(--td2-border); border-radius: 10px; background: #fff; box-shadow: none; }
.p2 .ci-tete .map-cta:hover { border-color: var(--rule-strong); background: var(--td2-bg); }
.p2 .ci-tete .map-cta .ico { color: var(--td2-action); }
.p2 .ci-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
.p2 .ci-col { gap: 16px; }
.p2 .ci-plan { margin: 14px 20px 0; padding: 22px; border-radius: 10px; background: var(--td2-bg); }
.p2 .ci-plan .trace .tr-loop { stroke: var(--td2-ink); }
.p2 .ci-plan .trace, .p2 .ci-plan .trace-none { max-width: 400px; }
.p2 .ci-facts { margin-top: 16px; background: #eef0f2; border-top-color: #eef0f2; }
.p2 .ci-facts div { padding: 13px 20px; }
.p2 .ci-facts dt { color: var(--td2-muted); }
.p2 .ci-facts dd { font: 800 20px/1.2 var(--f-display); letter-spacing: -.02em; font-stretch: normal; font-variant-numeric: tabular-nums; }
.p2 .ci-dates a { min-height: 64px; padding: 10px 20px; }
.p2 .ci-dates a:hover { background: var(--td2-bg); }
.p2 .ci-dates li + li { border-top-color: #eef0f2; }
.p2 .ci-dates .e-date .m { color: var(--td2-action); }
.p2 .ci-dates b { font: 700 15.5px/1.25 var(--f-display); font-stretch: normal; }
.p2 .ci-contact a { min-height: 32px; }

/* Temps au tour (rendu par temps-tour.js, partagé avec le Paddock) : seule l'apparence change, ici */
.p2 .tt-cats button { border-radius: 99px; }
.p2 .tt-cats button[aria-pressed=true] { background: var(--td2-ink); border-color: var(--td2-ink); color: #fff; }
.p2 .lb-barre select, .p2 .lb-barre input, .p2 .lb-barre label { border-color: var(--td2-border); border-radius: 10px; }

/* ================================================================ Espace pilote (garage, performances, profil, potes, groupe, compte,
   emails, convoi, profil public) : mêmes onglets que l'agenda ; formulaires et titres de section au langage du pack */
/* Onglets : le texte .sr-only du compteur « Mes potes » reste dans la barre qui défile (sinon la page s'élargit à 320 px, comme corrigé sur l'agenda) */
.p2 .pt-onglets { position: relative; }
/* Libellés de champs : casse normale, Inter 600 13 px (le pack n'emploie pas de petites capitales pour les formulaires) */
.p2 .fld > span, .p2 .fld > label, .p2 .pt-couleurs legend, .p2 .pt-alertes legend,
.p2 .mp-voitures legend, .p2 .mp-liens legend, .p2 .mp-pressions legend, .p2 .mp-photo-l, .p2 .cpt-type legend, .p2 .we-from > label {
  font: 600 13px/1.3 var(--f-text); letter-spacing: 0; text-transform: none; font-stretch: normal; color: var(--ink-2); }
.p2 .fld input:not([type=checkbox]):not([type=radio]), .p2 .fld select, .p2 .fld textarea, .p2 .cpt-form input:not([type=checkbox]):not([type=radio]):not([type=file]),
.p2 .cpt-form select, .p2 .cpt-form textarea { border-color: var(--td2-border); border-radius: 10px; }
.p2 .fld input:not([type=checkbox]):not([type=radio]), .p2 .fld select, .p2 .cpt-form select { min-height: 44px; }
.p2 .cpt-aide { color: var(--td2-muted); }

/* Titres de section entre les cartes */
.p2 .pl-h { display: flex; align-items: center; font: 800 24px/1.2 var(--f-display); letter-spacing: -.02em; }
.p2 .pl-h::before { content: ""; flex: none; width: 7px; height: 18px; margin-right: 12px; background: var(--td2-action); transform: skew(-15deg); }
.p2 .pl-apercu .pl-h::before { display: none; }

/* Convoi : intertitres et titre du bloc « convois ouverts » au langage des cartes */
.p2 .cv-notes h3, .p2 .cv-recues h3, .p2 .cv-ouv-h3, .p2 .cv-sugg-t { font: 700 13px/1.3 var(--f-text); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.p2 .cv-ouv-h { display: flex; align-items: center; font: 800 18px/1.25 var(--f-display); font-stretch: normal; letter-spacing: -.015em; text-transform: none; color: var(--td2-ink); }
.p2 .cv-ouv-h::before { content: ""; flex: none; width: 6px; height: 15px; margin-right: 11px; background: var(--td2-action); transform: skew(-15deg); }

/* Bandes de chiffres (Mes performances, profil public) */
.p2 .mf-resume { border-color: var(--td2-border); border-radius: var(--td2-radius); background: #eef0f2; box-shadow: var(--td2-shadow); }
.p2 .mf-resume dt { color: var(--td2-muted); }

/* Messages d'état et bandeaux d'information */
.p2 .mf-public { border-radius: 10px; }

/* ================================================================ Pages secondaires (Circuits par pays, Organisateurs, Essence, Mon week-end) */
/* Mon week-end : les titres d'étape gardent leur numéro (pas de barre rouge en plus), en casse normale */
.p2 .we .card-h::before { display: none; }
.p2 .we .card-h { padding-top: 18px; }
/* Tableaux et listes en cartes td2 */
.p2 .ctable { border-color: var(--td2-border); border-radius: var(--td2-radius); box-shadow: var(--td2-shadow); }

/* ================================================================ Écrans moyens et téléphone */
@media (max-width: 1199px) {
  .p2 .page { padding-left: 32px; padding-right: 32px; }
  .p2 .td-grid, .p2 .ci-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
}
@media (max-width: 899px) {
  .p2 .td-grid, .p2 .ci-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  /* En-tête compact du socle : à 320 px, la 1re colonne (190-270 px) + l'écart poussaient le menu hors de l'écran (même correctif que agenda.css) */
  body.p2.td-espace .hd { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .p2 .page { padding: 18px 16px 48px; }
  .fj-tete { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .fj-date b { font-size: 36px; }
  .fj-trace { display: none; }
  .p2 .fj-tete h1 { font-size: 24px; }
  .fj-tete .fj-badges, .fj-tete .td2-releve { grid-column: 1 / -1; }
  .fj-tete-txt { display: contents; }
  .fj-tete-txt > h1, .fj-tete-txt > .td-sub { grid-column: 2; }
  .fj-tete-txt > h1 { grid-row: 1; align-self: center; }
  .fj-tete-txt > .td-sub { grid-column: 1 / -1; margin-top: 0; }
  .fj-tete .fj-badges { margin-top: 0; }
  .p2 .card-h { padding: 16px 16px 0; font-size: 17px; }
  .p2 .card-b { padding: 12px 16px 16px; }
  .p2 .spec div, .p2 .ci-facts div { padding: 12px 16px; }
  .p2 .source { padding: 12px 16px; }
  .p2 .place-card { padding: 16px 16px 0; }
  .p2 .status-cta { flex-direction: column; align-items: stretch; }
  .p2 .status-cta > * { width: 100%; }
  .ci-tete { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 16px; }
  .ci-tete-trace { height: 72px; }
  .ci-tete-trace .trace-mini { width: 60px; height: 60px; }
  .p2 .ci-tete h1 { font-size: 24px; gap: 8px; }
  .p2 .ci-tete .fj-badges, .p2 .ci-tete .map-cta { grid-column: 1 / -1; }
  .ci-tete-txt { display: contents; }
  .p2 .ci-tete .lede { grid-column: 2; margin-top: -8px; }
  .p2 .ci-tete h1 { grid-column: 2; align-self: end; }
  .p2 .ci-tete .ci-tete-trace { grid-row: 1 / span 2; }
  .p2 .ci-tete .fj-badges { margin-top: 0; }
  .p2 .ci-plan { margin: 12px 16px 0; padding: 14px; }
  .p2 .ci-dates a { padding: 10px 16px; }
}
@media (max-width: 359px) {
  .p2 .mp-photo .mp-android { flex-wrap: wrap; }
  .p2 .fj-badges .td2-badge { white-space: normal; }
}

/* Météo heure par heure de la fiche : icônes en couleur (plus fort que .p2 .meteo .h .ico) */
.meteo .h.wx-soleil .ico { color: #e3a008; }
.meteo .h.wx-eclaircies .ico { color: #d69406; }
.meteo .h.wx-nuageux .ico { color: #7b8794; }
.meteo .h.wx-pluie .ico { color: #2f7fd6; }

/* « Qui vient ? » sur la fiche journée */
.qv .card-h small { margin-left: 6px; color: var(--ink-3); font: 600 13px var(--f-text); }
.qv-l { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.qv-l li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qv-p { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.qv-p:hover span { text-decoration: underline; }
.qv-av { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; background: var(--paper-2); color: var(--ink-2);
  display: inline-grid; place-items: center; font: 700 13px var(--f-text); }
.qv-vide { margin: 0 0 12px; color: var(--ink-3); font-size: 14px; }
.qv-moi { margin: 4px 0 8px; font: 600 13px var(--f-text); color: var(--ink-2); }
.qv-seg { display: flex; width: 100%; }
.qv-seg button { flex: 1; justify-content: center; }
.qv-seg button:disabled { opacity: .6; }
.qv-note { margin: 10px 0 0; color: var(--ink-3); font-size: 12.5px; }
.qv-err { margin: 8px 0 0; color: var(--danger); font-size: 13px; }

/* Mes performances : lien « Partager en image » (partager.html), visible aussi sur ordinateur, à côté de « Ajouter un temps » */
.mf-liens { display: inline-flex; flex-wrap: wrap; gap: 4px 18px; }
.mf-aller.mf-partage { display: inline-flex; align-items: center; min-height: 40px; }
