:root {
  --encre: #1f2a44; --encre-2: #34405e; --fond: #f6f4ef; --papier: #ffffff; --trait: #e2ddd2; --texte: #22252b; --doux: #6a6f7a;
  --accent: #b4542d; --accent-doux: #f6e3d9;
  --confirme: #2e7d4f; --option: #d9861c; --region: #6b7fa8; --libre: #b9bcc4; --annule: #b23a3a;
  --we: #efece5; --ferie: #fbe9e4; --vac: #eef2fa;
  --r: 10px; --ombre: 0 2px 10px rgba(20, 25, 40, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: var(--fond); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; margin: 0; }

/* connexion */
#connexion { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--encre); }
.carte-connexion { background: var(--papier); border-radius: 16px; padding: 32px 24px; width: 100%; max-width: 360px; display: grid; gap: 14px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.carte-connexion img { margin: 0 auto; }
.carte-connexion h1 { font-size: 30px; }
.carte-connexion label { text-align: left; display: grid; gap: 4px; font-weight: 600; font-size: 15px; }
.carte-connexion input { padding: 12px; border: 1px solid var(--trait); border-radius: 8px; font-size: 17px; }
.sous { margin: -10px 0 6px; color: var(--doux); }
.erreur { color: var(--annule); min-height: 1.2em; margin: 0; }

/* boutons */
.btn { border: 1px solid var(--trait); background: var(--papier); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--encre-2); }
.btn.primaire { background: color-mix(in srgb, var(--accent) 90%, white); color: #fff; border-color: color-mix(in srgb, var(--accent) 90%, white); }
.btn.danger { color: var(--annule); }
.btn.grand { padding: 13px 18px; font-size: 17px; }
.btn.lien { border: 0; background: none; padding: 6px 8px; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.btn.petit { padding: 4px 10px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }

/* entête */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.entete { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--encre); color: #fff; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 8px; font-family: Georgia, serif; font-size: 20px; }
#saison { background: var(--encre-2); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; }
.onglets { display: flex; gap: 8px; flex: 1; align-items: center; }
.onglets .espace { flex: 1; }
#choix-page { background: var(--encre-2); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.onglets button, .onglets-bas button { background: none; border: 0; color: inherit; cursor: pointer; padding: 8px 12px; border-radius: 8px; position: relative; }
.onglets button[aria-current="page"] { background: rgba(255,255,255,.15); font-weight: 600; }
.onglets button:hover { background: rgba(255,255,255,.1); }
.onglets .bascule-carte { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.35); }
.onglets .bascule-carte .coche { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid rgba(255,255,255,.7); font-size: 12px; line-height: 1; }
.onglets .bascule-carte[aria-pressed="true"] { background: rgba(255,255,255,.15); }
.onglets .bascule-carte[aria-pressed="true"] .coche { background: var(--accent); border-color: var(--accent); }
.pastille { position: absolute; top: 2px; right: 0; background: var(--accent); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 5px; min-width: 16px; text-align: center; }
.moi { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.moi .btn.lien { color: #fff; }
.sync { color: #7fd19b; font-size: 12px; }
.sync.coupe { color: #e7a23b; }
.onglets-bas { display: none; }
main#vue { flex: 1; min-width: 0; overflow: auto; position: relative; }

/* panneau carte à droite, largeur réglable */
.corps { flex: 1; display: flex; min-height: 0; }
#cote-carte { flex: none; width: var(--largeur-carte, 40vw); min-width: 280px; display: flex; flex-direction: column; background: var(--papier); }
.cote-tete { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.cote-tete b { font-family: Georgia, serif; font-size: 17px; }
#map-cote { flex: 1; min-height: 0; }
#poignee { flex: none; width: 12px; cursor: col-resize; background: var(--trait); position: relative; touch-action: none; outline: none; }
#poignee::before { content: ""; position: absolute; top: 50%; left: 4px; width: 4px; height: 44px; margin-top: -22px; background: radial-gradient(circle, var(--doux) 1.2px, transparent 1.6px) 0 0 / 4px 6px; opacity: .7; }
#poignee:hover, #poignee:focus-visible, body.redim #poignee { background: var(--accent-doux); }
#replier { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 24px; height: 40px; border-radius: 6px; border: 1px solid var(--trait); background: var(--papier); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; z-index: 2; box-shadow: var(--ombre); }
#replier:hover { border-color: var(--accent); color: var(--accent); }
body.carte-repliee #poignee { width: 36px; cursor: pointer; background: var(--encre-2); }
body.carte-repliee #poignee::before { display: none; }
body.carte-repliee #replier { top: 14px; width: 28px; height: auto; padding: 12px 0; writing-mode: vertical-rl; font-size: 15px; font-weight: 600; background: var(--accent); color: #fff; border-color: var(--accent); }
body.redim { user-select: none; cursor: col-resize; }
body.redim #map-cote { pointer-events: none; }
body.avec-carte .panneau { right: calc(var(--largeur-carte, 40vw) + 12px); width: min(600px, calc(100% - var(--largeur-carte, 40vw) - 12px)); box-shadow: -8px 0 30px rgba(0,0,0,.15); }
body.avec-carte #voile { right: calc(var(--largeur-carte, 40vw) + 12px); }

/* barre d'outils */
.outils { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; background: var(--papier); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 500; }
.outils input[type=search], .outils select { padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; background: #fff; }
.outils input[type=search] { min-width: 180px; flex: 1; max-width: 320px; }
.groupe-recherche { display: flex; flex: 1; max-width: 320px; }
.groupe-recherche input[type=search] { max-width: none; }
/* compteurs conf / opt / équipe dans la barre du haut, en bleus assortis */
.comptes-entete { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nb-repr { height: 30px; padding: 0 10px; border-radius: 8px; white-space: nowrap; color: #fff; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; cursor: default; }
.nb-repr.conf { background: #2f5d9e; }
.nb-repr.opt { background: #4a7bbf; }
.nb-repr.equipe { background: #34405e; border: 1px solid rgba(255,255,255,.25); }
.nb-repr[hidden] { display: none; }
.outils .espace { flex: 1; }
.compte { color: var(--doux); font-size: 14px; }
.puce { border: 1px solid var(--trait); border-radius: 20px; padding: 4px 10px 4px 8px; font-size: 14px; cursor: pointer; background: #fff; display: inline-flex; gap: 6px; align-items: center; }
.puce[aria-pressed="false"] { opacity: .45; }
.rond { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.s-Confirmé { --c: var(--confirme); } .s-Option { --c: var(--option); } .s-vide { --c: #8a93a8; } .s-Annulé { --c: var(--annule); }
.rond { background: var(--c); }

/* carte */
.vue-carte { display: flex; flex-direction: column; height: 100%; }
#map { flex: 1; min-height: 300px; }
.leaflet-popup-content { font-size: 15px; margin: 12px 14px; }
.popup h3 { font-size: 17px; margin-bottom: 4px; }
.popup p { margin: 2px 0; }
.legende-hors { padding: 6px 16px; font-size: 14px; color: var(--doux); background: var(--papier); border-top: 1px solid var(--trait); }
.ville-marqueur { background: none; border: 0; }
.ville-marqueur .pt { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.ville-etiquette { background: none; border: 0; }
.ville-etiquette .nom.cachee { visibility: hidden; }
.ville-etiquette .nom { position: absolute; left: 9px; top: -9px; white-space: nowrap; font-size: 12px; font-weight: 600; line-height: 18px; padding: 0 6px; border-radius: 9px;
  background: rgba(255,255,255,.92); color: var(--texte); border-left: 3px solid var(--c); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; }
.ville-etiquette .nom small { color: var(--doux); font-weight: 500; }
.popup-date { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.popup-date:first-of-type { border-top: 0; }

/* liste */
.tableau-conteneur { overflow: auto; }
/* liste : la barre d'outils reste en haut, seul le tableau défile, sa ligne d'en-tête reste épinglée */
.vue-liste { display: flex; flex-direction: column; height: 100%; }
.vue-liste .outils { position: static; flex: none; }
.vue-liste .tableau-conteneur { flex: 1; min-height: 0; }
table.liste { border-collapse: separate; border-spacing: 0; table-layout: fixed; background: var(--papier); font-size: 14px; }
.liste td { overflow: hidden; text-overflow: ellipsis; }
.liste th { position: sticky; top: 0; background: var(--encre-2); color: #fff; text-align: left; padding: 8px 6px; font-weight: 600; cursor: grab; white-space: nowrap; z-index: 3; overflow: hidden; text-overflow: ellipsis; user-select: none; }
.liste th .redim-col { position: absolute; top: 0; right: 0; bottom: 0; width: 9px; cursor: col-resize; }
.liste th .redim-col::after { content: ""; position: absolute; top: 8px; bottom: 8px; right: 3px; width: 2px; background: rgba(255,255,255,.25); border-radius: 1px; }
.liste th .redim-col:hover::after { background: var(--accent); }
.liste th.glisse { opacity: .45; }
.liste th.depot-g { box-shadow: inset 4px 0 0 var(--accent); }
.liste th.depot-d { box-shadow: inset -4px 0 0 var(--accent); }
.liste th.th-actions { cursor: default; }
.liste th[data-tri]::after { content: " ↕"; opacity: .4; }
.liste th.tri-asc::after { content: " ↑"; opacity: 1; } .liste th.tri-desc::after { content: " ↓"; opacity: 1; }
.liste td { border-bottom: 1px solid var(--trait); padding: 2px 4px; vertical-align: middle; }
.liste tr.ligne td:first-child { border-left: 5px solid var(--c); }
.liste tr.semaine td { background: var(--we); color: var(--doux); font-size: 13px; font-weight: 600; padding: 4px 10px; }
.liste tr.ligne:hover td { background: #faf8f3; }
.liste input, .liste select { display: block; margin: 0; height: 30px; line-height: 18px; border: 1px solid transparent; background-color: transparent; padding: 5px 6px; border-radius: 6px; width: 100%; min-width: 0; font-size: 14px; }
/* menus (Statut, Région) : même hauteur et même alignement du texte que les cases de saisie */
.liste select { -webkit-appearance: none; appearance: none; padding-right: 20px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a6f7a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; }
.liste input:hover, .liste select:hover { border-color: var(--trait); }
.liste input:focus, .liste select:focus { border-color: var(--accent); background: #fff; outline: none; }
.liste .lecture { padding: 6px; line-height: 18px; display: block; }
.col-num { width: 54px; } .col-j { width: 46px; } .col-date { width: 128px; } .col-statut { width: 128px; } .col-court { width: 70px; } .col-moyen { width: 150px; } .col-long { width: 220px; }
.liste .ouvrir { white-space: nowrap; }
.enregistre { color: var(--confirme); font-size: 13px; }

/* calendrier */
.cal { padding: 12px 16px 24px; }
.cal-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-tete h2 { font-size: 22px; min-width: 200px; text-transform: capitalize; }
.grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.grille .jsem { font-size: 13px; color: var(--doux); font-weight: 600; padding: 2px 6px; }
.jour { background: var(--papier); border: 1px solid var(--trait); border-radius: 8px; min-height: 104px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.jour.we, .jour.sans-date { background: var(--we); }
.jour.ferie { background: var(--ferie); }
.jour.hors { opacity: .35; }
.jour.aujourdhui { outline: 2px solid var(--accent); }
.jour-tete { display: flex; justify-content: space-between; align-items: center; font-size: 13px; gap: 4px; }
.jour-tete b { font-size: 14px; }
.vac { font-size: 10px; background: var(--vac); color: var(--region); border-radius: 4px; padding: 0 4px; font-weight: 700; }
.ferie-nom { font-size: 11px; color: var(--annule); }
.evt { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, white); border-radius: 4px; padding: 3px 5px; font-size: 13px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt.region { font-style: italic; }
/* ville, puis heure(s) et équipe : on passe à la ligne plutôt que de couper quand la case est étroite */
.evt { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.evt .evt-h { font-variant-numeric: tabular-nums; white-space: nowrap; }
.evt .evt-eq { white-space: nowrap; }
.ajout-jour { border: 0; background: none; color: var(--doux); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; visibility: hidden; }
.jour:hover .ajout-jour { visibility: visible; }
.semaine-liste { display: grid; gap: 8px; }
.semaine-liste .jour { min-height: 0; }

/* fiche */
#voile { position: fixed; inset: 0; background: rgba(15, 20, 35, .35); z-index: 1000; }
.panneau { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--fond); z-index: 1001; overflow: auto; box-shadow: -8px 0 30px rgba(0,0,0,.2); }
.fiche-tete { position: sticky; top: 0; background: var(--encre); color: #fff; padding: 14px 16px 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; z-index: 2; }
/* Onglets de la fiche (26/11/2026) : sous le titre, toujours visibles ; déplaçables à la souris */
.fiche-tete > div:first-child { flex: 1; min-width: 0; }
.fiche-onglets { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px; margin: 4px -16px 0; padding: 0 12px; }
@media (max-width: 640px) { .fiche-onglets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.fiche-onglets::-webkit-scrollbar { display: none; }
.fiche-onglet { flex: none; background: transparent; color: rgba(255,255,255,.75); border: 0; border-radius: 8px 8px 0 0; padding: 8px 12px; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none; position: relative; }
.fiche-onglet:hover { color: #fff; background: rgba(255,255,255,.08); }
.fiche-onglet[aria-selected="true"] { background: var(--fond); color: var(--texte); font-weight: 600; }
.fiche-onglet.glisse { opacity: .5; cursor: grabbing; }
.fiche-onglet.cible-g { box-shadow: inset 3px 0 0 var(--accent); }
.fiche-onglet.cible-d { box-shadow: inset -3px 0 0 var(--accent); }
.fiche-tete h2 { font-size: 22px; }
.fiche-tete .meta { font-size: 13px; opacity: .8; }
.fiche-tete .tete-boutons { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.fiche-tete .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.fiche-corps { padding: 12px 16px 40px; display: grid; gap: 14px; }
.bloc { background: var(--papier); border-radius: var(--r); padding: 14px; box-shadow: var(--ombre); }
.bloc h3 { font-size: 17px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.bloc h3 .cadenas { font-size: 12px; font-family: inherit; font-weight: 500; color: var(--doux); background: var(--we); border-radius: 4px; padding: 1px 6px; }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.champ { display: grid; gap: 3px; font-size: 13px; color: var(--doux); font-weight: 600; }
.champ.large { grid-column: 1 / -1; }
.champ input, .champ select, .champ textarea { padding: 9px 10px; border: 1px solid var(--trait); border-radius: 8px; font-size: 16px; color: var(--texte); font-weight: 400; background: #fff; width: 100%; }
.champ textarea { min-height: 70px; resize: vertical; }
.champ .valeur { font-size: 16px; color: var(--texte); font-weight: 400; white-space: pre-wrap; }
.champ .valeur:empty::before { content: "—"; color: var(--libre); }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.info-partage { font-size: 13px; color: var(--doux); background: var(--we); border-radius: 6px; padding: 6px 10px; margin: -4px 0 10px; }
.carnet { display: flex; gap: 6px; margin-bottom: 10px; }
.carnet input { flex: 1; padding: 8px 10px; border: 1px dashed var(--trait); border-radius: 8px; }
.note { border-left: 3px solid var(--trait); padding: 4px 10px; margin-bottom: 8px; }
.note.flore { border-color: var(--accent); background: var(--accent-doux); border-radius: 0 6px 6px 0; }
.note .qui { font-size: 13px; color: var(--doux); }
.note-ajout { display: grid; gap: 6px; margin-top: 8px; }
.note-ajout textarea { min-height: 60px; padding: 8px; border: 1px solid var(--trait); border-radius: 8px; }
.histo { font-size: 14px; display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--trait); }
.histo .quand { color: var(--doux); font-size: 13px; white-space: nowrap; }
.histo .quoi { flex: 1; }
.histo .details { font-size: 12px; color: var(--doux); }
.histo.annule .quoi { text-decoration: line-through; opacity: .6; }
.actions-fiche { display: flex; gap: 8px; flex-wrap: wrap; }

/* pages simples */
.page { padding: 16px; max-width: 980px; margin: 0 auto; display: grid; gap: 14px; }
.page h2 { font-size: 24px; }
table.simple { border-collapse: collapse; width: 100%; background: var(--papier); font-size: 15px; }
.simple th, .simple td { padding: 8px; border-bottom: 1px solid var(--trait); text-align: left; }
.simple input, .simple select { padding: 6px 8px; border: 1px solid var(--trait); border-radius: 6px; width: 100%; }
.vide { color: var(--doux); padding: 20px; text-align: center; }

/* toasts */
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 2000; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--encre); color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--ombre); font-size: 15px; }
.toast.err { background: var(--annule); }

/* mobile */
@media (max-width: 760px) {
  .entete { padding: 8px 12px; gap: 8px; }
  /* téléphone : on garde seulement les compteurs (conf / opt / équipe), sur une 2e ligne */
  .entete .onglets { order: 10; flex-basis: 100%; justify-content: center; }
  .entete .onglets #choix-page, .entete .onglets .bascule-carte, .entete .onglets .espace { display: none; }
  .marque span { display: none; }
  #saison { flex: 1; }
  #poignee, #cote-carte { display: none !important; }
  .onglets-bas { display: flex; justify-content: space-around; background: var(--papier); border-top: 1px solid var(--trait); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
  .onglets-bas button { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--doux); padding: 6px 4px; min-width: 56px; }
  .onglets-bas button .ico { font-size: 20px; line-height: 1; }
  .onglets-bas button[aria-current="page"] { color: var(--accent); font-weight: 700; }
  .champs { grid-template-columns: 1fr; }
  .grille { gap: 2px; }
  .jour { min-height: 64px; padding: 2px; }
  .evt { font-size: 11px; padding: 2px 3px; }
  .grille .jsem { font-size: 11px; padding: 2px; }
  .outils { padding: 8px 12px; }
  .outils input[type=search] { min-width: 0; max-width: none; flex-basis: 100%; }
  .groupe-recherche { max-width: none; flex-basis: 100%; }
  .groupe-recherche input[type=search] { flex: 1; flex-basis: auto; }
  .cal { padding: 10px 8px 24px; }
}
@media (prefers-reduced-motion: no-preference) { .panneau { animation: glisse .18s ease-out; } @keyframes glisse { from { transform: translateX(30px); opacity: .6; } } }

/* liste comédiens */
.cartes-dates { padding: 8px 16px 24px; display: grid; gap: 8px; max-width: 720px; margin: 0 auto; }
.sem-carte { font-size: 15px; color: var(--doux); margin: 10px 0 2px; font-family: inherit; }
.carte-date { display: grid; gap: 2px; text-align: left; background: var(--papier); border: 0; border-left: 6px solid var(--c); border-radius: 10px; padding: 12px 14px; box-shadow: var(--ombre); cursor: pointer; }
.cd-jour { font-size: 14px; color: var(--doux); }
.cd-jour::first-letter { text-transform: uppercase; }
.cd-ville { font-size: 18px; font-weight: 600; }
.cd-ville em { font-weight: 400; color: var(--option); font-size: 15px; }
.cd-info { font-size: 15px; }

/* fiche : menus et cases de saisie de même hauteur, texte centré verticalement */
.champ input, .champ select { height: 42px; line-height: 22px; }
.champ select { -webkit-appearance: none; appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236a6f7a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }

/* équipe : initiales des comédiens */
.puces-equipe { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.puces-equipe .puce[aria-pressed="true"] { background: var(--encre); color: #fff; border-color: var(--encre); opacity: 1; }
.puces-equipe .puce[aria-pressed="false"] { opacity: 1; }
/* colonne Fiche : jamais tronquée (pas de « … ») */
.liste td.ouvrir { overflow: visible; text-overflow: clip; white-space: nowrap; }

/* carte : ville survolée depuis la liste, nom de région */
.ville-marqueur.survole .pt { transform: scale(1.6); }
.ville-etiquette.survole .nom { background: var(--accent); color: #fff; border-left-color: var(--accent); font-size: 13px; }
.leaflet-tooltip.info-region { font-weight: 600; }

/* menu « ⋯ » d'une ligne : discret tant qu'on ne survole pas la ligne */
.btn.menu-ligne { padding: 2px 8px; font-weight: 700; letter-spacing: 1px; color: var(--doux); border-color: transparent; background: transparent; opacity: .35; }
tr.ligne:hover .btn.menu-ligne, tr.ligne.menu-ouvert .btn.menu-ligne, .btn.menu-ligne:focus-visible { opacity: 1; border-color: var(--trait); background: var(--papier); }
tr.ligne.menu-ouvert td { background: rgba(31, 42, 68, .06); }
.menu-ligne-pop { position: fixed; z-index: 2000; background: var(--papier); border: 1px solid var(--trait); border-radius: 8px; box-shadow: 0 6px 24px rgba(20, 25, 40, .18); padding: 4px; min-width: 240px; display: flex; flex-direction: column; }
.menu-ligne-pop button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 6px; font: inherit; font-size: 15px; cursor: pointer; color: var(--texte); }
.menu-ligne-pop button:hover, .menu-ligne-pop button:focus { background: var(--fond); outline: none; }
.menu-ligne-pop button.danger { color: var(--annule); }
.menu-ligne-pop hr { border: 0; border-top: 1px solid var(--trait); margin: 4px 0; }

/* horaires : ancien texte pas encore réparti en Installation / Représentations */
.liste input.a-preciser::placeholder { color: #b4542d; font-style: italic; opacity: 1; }
.liste input.a-preciser { background: #fdf3ec; }
body.deplace-col, body.deplace-col * { cursor: grabbing !important; user-select: none; }
.liste th[data-col] { touch-action: none; }

/* calendrier : vue Saison (tous les mois d'un coup d'œil) */
.saison-mois { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .saison-mois { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .saison-mois { grid-template-columns: 1fr; } }
.mini-mois { background: var(--papier); border: 1px solid var(--trait); border-radius: 10px; padding: 6px; min-width: 0; }
.mini-mois h3 { font-size: 15px; text-transform: capitalize; margin: 0 0 6px; cursor: pointer; }
.mini-mois h3:hover { color: var(--accent); }
.mini-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-jsem { font-size: 11px; color: var(--doux); text-align: center; }
.mini-jour { min-height: 40px; min-width: 0; border-radius: 4px; background: var(--we); padding: 1px 2px; display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.mini-jour.occupe { background: color-mix(in srgb, var(--c) 22%, white); box-shadow: inset 3px 0 0 var(--c); border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--texte); }
.mini-jour.occupe:hover { outline: 2px solid var(--encre); }
.mini-jour.ferie { background: var(--ferie); }
.mini-jour.hors { background: none; }
.mini-jour.aujourdhui { outline: 2px solid var(--accent); }
.mini-num { font-size: 10px; color: var(--doux); line-height: 1.1; }
.mini-info { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.1; }

/* roue crantée (menu Outils) dans la barre du haut */
.onglets .btn-outils { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; width: 36px; height: 34px; font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.onglets .btn-outils:hover { background: rgba(255,255,255,.12); }
#menu-outils { min-width: 280px; }

/* impression : seulement le contenu de la page (pas la barre du haut, les filtres, la carte ni les boutons) */
@media print {
  .entete, .onglets-bas, #poignee, #cote-carte, .outils, #toasts, .menu-ligne-pop, .ajout-jour, .btn.menu-ligne, .redim-col, #voile { display: none !important; }
  body, #app, .corps, #vue { height: auto !important; overflow: visible !important; background: #fff !important; }
  .tableau-conteneur { overflow: visible !important; }
  .liste input, .liste select { border: 0 !important; background: none !important; appearance: none; -webkit-appearance: none; padding: 0 2px; }
  .cal-tete .btn { display: none; }
  .jour, .mini-jour, .evt, .mini-jour.occupe { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: landscape; margin: 10mm; }
}

/* fenêtre (choix des colonnes à exporter…) */
.fenetre-fond { position: fixed; inset: 0; background: rgba(20, 25, 40, .35); z-index: 3000; display: grid; place-items: center; padding: 16px; }
.fenetre { background: var(--papier); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.25); padding: 18px 20px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.fenetre h3 { margin: 0 0 12px; font-size: 18px; }
.liste-colonnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 14px; margin-bottom: 8px; }
.liste-colonnes label { display: flex; gap: 6px; align-items: center; font-size: 15px; cursor: pointer; }
.fenetre-boutons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.toast-action { margin-left: 8px; background: #fff; color: var(--encre); border: 0; border-radius: 6px; padding: 3px 10px; font-weight: 600; cursor: pointer; }
.simple.droits td:not(:first-child), .simple.droits th { text-align: center; }
.simple.droits td:first-child { white-space: nowrap; }
/* Administrateur : pastille rouge dans le coin des colonnes montrées aux comédiens (ne prend pas la place du nom) */
.liste th.vu-com::before { content: ""; position: absolute; top: 3px; left: 2px; width: 7px; height: 7px; border-radius: 50%; background: #e5484d; }
.point-com { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; }
.bouton-com { display: inline-flex; align-items: center; gap: 6px; }
.bouton-com[aria-pressed="true"] { background: #fdecec; border-color: #e5484d; color: #b3262b; font-weight: 600; }

/* Facture (fiche, bloc Facturation) */
.actions-facture { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#fenetre-facture .fenetre { width: min(640px, 100%); }
#fenetre-facture .champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#fenetre-facture .champ.large { grid-column: 1 / -1; }
@media (max-width: 560px) { #fenetre-facture .champs { grid-template-columns: 1fr; } }
/* Devis successifs (fiche, bloc Facturation ; fenêtre du devis) */
.bloc-devis { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--trait); }
.bloc-devis h4 { margin: 0 0 6px; font-size: 15px; }
.liste-devis { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.liste-devis li { display: flex; flex-direction: column; gap: 2px; }
.liste-devis li.remplace a { color: var(--texte-2, #777); text-decoration: line-through; }
.liste-devis .compte { margin: 0; }
/* Groupes d'une date (26/11/2026) */
.groupes { display: grid; gap: 12px; margin-bottom: 14px; }
.groupe { border: 1px solid var(--trait); border-radius: 10px; padding: 12px; background: var(--fond); }
.groupe-tete { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.groupe-tete .btn { margin-left: auto; }
.groupe h5 { margin: 12px 0 6px; font-size: 14px; }
.gboutons { margin: 6px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.gfin-table { display: grid; gap: 4px; }
.gfin-ligne { display: grid; grid-template-columns: 1.5fr 1.1fr .8fr .6fr 1.3fr 1.2fr 28px; gap: 4px; align-items: center; }
.gfin-ligne.gfin-titres span { font-size: 12px; color: var(--doux); }
.gfin-ligne input, .gfin-ligne select { padding: 6px; border: 1px solid var(--trait); border-radius: 6px; background: #fff; min-width: 0; width: 100%; font-size: 14px; }
.sous-titre { margin: 8px 0 6px; font-size: 14px; color: var(--doux); }
@media (max-width: 640px) { .gfin-ligne { grid-template-columns: 1fr 1fr; } .gfin-ligne.gfin-titres { display: none; } }
tr.sous-groupe td { padding: 3px 8px 3px 28px; font-size: 13px; color: var(--doux); background: var(--fond); cursor: pointer; border-top: 0; }
tr.sous-groupe:hover td { color: var(--texte); }
tr.sous-groupe .sg-fleche { margin-right: 6px; }
tr.sous-groupe .sg-fin { color: var(--texte); }
.champ.case { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.champ.case input { width: auto; height: auto; }
.seance { border-top: 1px solid var(--trait); padding-top: 4px; }
.seance-tete { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; width: 100%; text-align: left; background: none; border: 0; padding: 8px 4px; cursor: pointer; font-size: 15px; border-radius: 8px; color: inherit; }
.seance-tete:hover { background: #f3efe6; }
.seance.ouverte > .seance-tete { background: #ece6d8; }
.complet { color: #b3261e; }
.seance-corps { display: grid; gap: 8px; padding: 4px 0 8px; }
.seance-tete h4 { margin: 0; font-size: 16px; }
.rouge { color: #b3261e; }
/* Alerte financement (26/11/2026) : J-15 orange clair, J-7 orange foncé, tant qu'il manque un devis signé */
.liste tr.ligne.alerte-15 > td { background-color: #ffe4c4; }
.liste tr.ligne.alerte-7 > td { background-color: #ffb36b; }
.info-partage.alerte-15 { background: #ffe4c4; }
.info-partage.alerte-7 { background: #ffb36b; color: #3a1d00; }
/* Récapitulatif des groupes dans la fiche (26/11/2026) : un clic sur une ligne déplie son détail */
.g-recap { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-recap th { text-align: left; font-size: 12px; color: var(--doux); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--trait); }
.g-recap tr.g-resume td { padding: 7px 6px; border-bottom: 1px solid var(--trait); cursor: pointer; vertical-align: top; }
.g-recap tr.g-resume:hover td, .g-recap tr.g-resume:focus td { background: #f3efe6; outline: none; }
.g-recap tr.g-resume.ouvert td { background: #ece6d8; font-weight: 600; border-bottom: 0; }
.g-recap tr.g-detail > td { padding: 0 0 10px; border-bottom: 1px solid var(--trait); }
.g-recap tr.g-detail .groupe { border-top-left-radius: 0; border-top-right-radius: 0; }
.g-chevron { display: inline-block; width: 1em; color: var(--doux); }
.g-info { color: var(--accent); cursor: help; }
@media (max-width: 640px) { .g-recap .g-opt { display: none; } }
.g-tarifs > span { display: block; margin-bottom: 4px; }
.g-tarifs-cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px) { .g-tarifs-cases { grid-template-columns: 1fr 1fr; } }
.g-ind { font-size: 12px; }
.groupe-tete .btn.lien.danger { margin-left: auto; }
.groupe-tete .btn + .btn { margin-left: 0; }
.g-valider { justify-content: flex-end; margin-top: 12px; }
/* Page Réservations (26/11/2026) */
.resa-tete { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.resa-tete select { padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; background: #fff; font-size: 15px; }
.resa-date h3 { display: flex; gap: 10px; align-items: baseline; }
.resa-seance { margin-top: 10px; }
.resa-seance-tete { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 6px 4px; border-top: 1px solid var(--trait); font-size: 15px; }
.resa-info { white-space: pre-line; }
.badge-orga { display: inline-block; background: rgba(255,255,255,.16); border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.champ.case:first-child { background: #f3efe6; border-radius: 8px; padding: 8px 10px; color: var(--texte); }
.champ.case { align-items: flex-start; flex-wrap: nowrap; }
.champ.case input { flex: none; margin-top: 3px; }
.reste { color: var(--doux); }
.resa-seance .seance-tete { border-top: 1px solid var(--trait); border-radius: 0; }
/* Jours organisés par la Compagnie : bouton Fiche sur fond bleu léger (26/11/2026, à la place du symbole) */
.btn.fiche-orga { background: #dbe8fb; border-color: #a9c3ea; color: #1f3a66; }
.btn.fiche-orga:hover { background: #c9dcf8; }
.badge-orga { background: #dbe8fb; color: #1f3a66; }
/* Suivi de Gérard (26/11/2026) */
.rc-page { max-width: none; }
.rc-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.rc-table th { text-align: left; font-size: 12px; color: var(--doux); padding: 4px; border-bottom: 2px solid var(--encre-2); position: sticky; top: 0; background: var(--fond); }
.rc-table td { padding: 2px 4px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.rc-table tr.rc-jour td { border-top: 1px solid #c9c2b2; }
.rc-table tr.rc-option td { color: var(--doux); font-style: italic; }
.rc-table input.rc { width: 100%; min-width: 0; border: 1px solid transparent; background: transparent; padding: 3px 4px; border-radius: 4px; font: inherit; }
.rc-table input.rc:hover { border-color: var(--trait); }
.rc-table input.rc:focus { border-color: var(--accent); background: #fff; outline: none; }
.rc-table input.rc-num { text-align: right; width: 70px; color: #1f3a66; font-weight: 600; }
.rc-table input.rc::placeholder { color: #9aa3b5; font-weight: 400; }
.rc-table td.rc-c { text-align: center; }
.rc-table td.rc-rem { min-width: 220px; }
.rc-table input.rc-texte { width: 100%; }
.rc-notes { padding: 0 4px 3px; }
.rc-table tr.rc-total td { background: #ece6d8; font-weight: 700; color: #1f3a66; text-align: right; padding: 4px 6px; }
.rc-table tr.rc-total td:first-child { text-align: right; font-style: italic; }
.rc-table tr.rc-pass td { background: #d8ecd0; color: #23511a; font-weight: 700; text-align: right; padding: 3px 6px; }
.rc-table tr.rc-pass td:first-child { font-weight: 600; font-style: italic; }
.rc-arrets { margin: 8px 0; line-height: 2.2; }
.rc-arrets input { width: 120px; padding: 4px 6px; border: 1px solid var(--trait); border-radius: 6px; }
.rc-arret { display: inline-flex; gap: 4px; align-items: center; background: #d8ecd0; color: #23511a; border-radius: 6px; padding: 0 6px; }
.rc-table tr.rc-pass.estime td { background: #eef5ea; color: #4d6b45; }
.rc-table tr.rc-pass input.rc-arret-date { font: inherit; font-weight: 600; padding: 1px 4px; border: 1px solid #a8cf9b; border-radius: 4px; background: #fff; color: #23511a; }
.rc-arret-etat { font-weight: 400; font-size: 12px; }

/* Colonne Fact. (26/11/2026) : facture payée en vert */
select.sel-fact[data-v="Facture payée"] { color: #1f7a3a !important; font-weight: 600; background-color: #e3f4e8 !important; }

/* Devis signés et devis d'avant : glisser-déposer (26/11/2026) */
#cadre-depot { position: fixed; inset: 8px; border: 3px dashed var(--accent); border-radius: 14px; background: rgba(255, 255, 255, .25); z-index: 2900; pointer-events: none; display: none; place-items: end center; padding-bottom: 28px; }
#cadre-depot.visible { display: grid; }
#cadre-depot div { background: var(--encre-2); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 17px; font-weight: 600; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
#cadre-depot span { display: block; font-size: 13px; font-weight: 400; opacity: .85; }
.depot-cible { outline: 3px solid var(--accent) !important; outline-offset: 2px; background: #fff7e6 !important; }
.depot-type { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 10px; }
.depot-type label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.depot-cherche { width: 100%; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; font-size: 15px; margin-bottom: 8px; }
.depot-liste { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.depot-titre { margin: 8px 0 2px; font-size: 13px; color: var(--texte-2, #666); font-weight: 600; }
.depot-cand { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; background: #fff; cursor: pointer; }
.depot-cand:hover, .depot-cand:focus { border-color: var(--accent); background: #fff7e6; outline: none; }
.depot-cand .compte { margin: 0; }
.alerte-depot { background: #fff1d6; border: 1px solid #f0c27a; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.g-signe { color: #1f7a3a; font-weight: 600; white-space: nowrap; }

/* Statut d'une réservation (26/11/2026) */
.g-statut { white-space: nowrap; }
.sel-resa { padding: 3px 6px; border: 1px solid var(--trait); border-radius: 6px; background: #fff; font-size: 13px; }
.sel-resa[data-v="Confirmé"] { background: #e3f4e8; color: #1f7a3a; border-color: #9fd3ae; font-weight: 600; }
.sel-resa[data-v="Option"] { background: #fff1d6; color: #8a5a00; border-color: #f0c27a; }
.sel-resa[data-v="Annulé"] { background: #f6e1e1; color: #a12b2b; border-color: #e2a9a9; }
.g-annule td:not(.g-statut) { text-decoration: line-through; color: var(--texte-2, #888); }
.resa-date h3 .btn.lien { font-size: 13px; font-weight: 400; margin-left: 8px; }

/* Notes « Pour qui ? » (26/11/2026) */
.note.non-lue { border-color: var(--accent); background: var(--accent-doux); border-radius: 0 6px 6px 0; }
.note.pour-moi { border-color: #9aa3b5; }
.note-pour-lib { font-style: italic; }
.redacteur .note-pour { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 14px; }
.redacteur .note-pour > span { font-weight: 600; }
.redacteur .note-pour label, .redacteur .note-personnes label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.redacteur .note-personnes { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 8px; border: 1px solid var(--trait); border-radius: 8px; font-size: 14px; }
.redacteur .note-personnes[hidden] { display: none; }
.redacteur [data-note-envoyer] { justify-self: start; }
.notes-onglets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 8px; }
.notes-onglets button { border: 1px solid var(--trait); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; }
.notes-onglets button[aria-selected="true"] { background: var(--encre-2); color: #fff; border-color: var(--encre-2); }
.notes-onglets input { margin-left: auto; padding: 6px 10px; border: 1px solid var(--trait); border-radius: 8px; min-width: 180px; }

/* 26/11/2026 : date d'édition du devis à côté de « Devis » dans la colonne Fact. */
.fact-avec-date { display: flex; align-items: center; gap: 4px; }
.fact-avec-date select { flex: 1 1 auto; min-width: 0; }
.fact-date { flex: none; font-size: 11px; color: #555; white-space: nowrap; }
