:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e5e7eb;
  --primary:#1d4ed8;
  --role:#0ea5e9;
  --shadow: 0 10px 25px rgba(2,6,23,.08);
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
*{box-sizing:border-box}
body{margin:0;font-family:var(--font);background:var(--bg);color:var(--text)}
a{color:inherit;text-decoration:none}
.container{max-width:1180px;margin:0 auto;padding:18px}
.topbar{
  position:sticky;top:0;z-index:1000;
  background:linear-gradient(180deg,#0b1224,#111b33);
  color:#fff;border-bottom:1px solid rgba(255,255,255,.08);
}

/* Barre contexte flottante (view) */
.ctxbar{
  position: sticky;
  top: 64px; /* juste sous la topbar */
  z-index: 900;
}
.topbar .inner{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.3px}
.brand .dot{width:12px;height:12px;border-radius:999px;background:var(--role);box-shadow:0 0 0 3px rgba(14,165,233,.25)}
.nav{display:flex;gap:10px;flex-wrap:wrap}
.nav a{padding:8px 10px;border-radius:10px;color:rgba(255,255,255,.86)}
.nav a.active{background:rgba(255,255,255,.10)}

/* Menu burger (mobile) */
.burger{display:none;align-items:center;justify-content:center;gap:6px;flex-direction:column;
  width:42px;height:42px;border-radius:12px;border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);cursor:pointer}
.burger span{display:block;width:18px;height:2px;background:rgba(255,255,255,.9);border-radius:2px}

@media (max-width: 860px){
  .burger{display:flex}
  .nav{display:none}
  body.nav-open .nav{
    display:flex;
    position:fixed;
    top:62px; /* sous la topbar */
    left:14px;right:14px;
    flex-direction:column;
    padding:10px;
    background:linear-gradient(180deg,#0b1224,#111b33);
    border:1px solid rgba(255,255,255,.12);
    border-radius:14px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
    z-index:2000;
  }
  body.nav-open .nav a{padding:10px 12px}
}
.userbox{display:flex;align-items:center;gap:10px;color:rgba(255,255,255,.9)}
.pill{padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.12);font-size:12px}
.grid{display:grid;grid-template-columns:1.2fr .9fr;gap:14px}
@media (max-width: 980px){.grid{grid-template-columns:1fr}}

/* Permet à certaines cartes de prendre toute la largeur d'une grille (2 colonnes) */
.span-2{grid-column:1 / -1}
.card{
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.card .hd{padding:14px 14px 10px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:10px}
.card .hd .hd-left{display:flex;align-items:center;gap:10px;min-width:0}
.card .hd .hd-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.card .hd h2{margin:0;font-size:14px;letter-spacing:.2px}
.card .bd{padding:14px}
.kpi{display:flex;gap:10px;flex-wrap:wrap}
.kpi .item{min-width:150px;padding:10px 12px;border-radius:12px;border:1px dashed var(--border);background:#fbfdff}
small, .muted{color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;border-radius:12px;border:1px solid var(--border);background:#fff;cursor:pointer}
.btn.small{padding:6px 10px;border-radius:10px;font-size:12px}
.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}
.btn.danger{background:#ef4444;border-color:#ef4444;color:#fff}
.hd-left{display:flex;align-items:center;gap:8px;min-width:0}
.hd-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}

/* Modal (simple) */
#emailModal{position:fixed;inset:0;z-index:9999}
#emailModal .modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.35);backdrop-filter:blur(2px)}
#emailModal .modal{position:relative;max-width:760px;margin:7vh auto;background:var(--card);border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}
#emailModal .modal-hd{padding:14px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:10px}
#emailModal .modal-bd{padding:14px}
@media (max-width: 780px){
  #emailModal .modal{width:calc(100% - 24px);margin:4vh auto}
}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px;border-bottom:1px solid var(--border);text-align:left;font-size:14px}
.badge{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;border:1px solid var(--border);font-size:12px;background:#fff}
.badge.ok{border-color:#86efac;background:#ecfdf5}
.badge.warn{border-color:#fde68a;background:#fffbeb}
.badge.danger{border-color:#fecaca;background:#fef2f2}
.badge-link{cursor:pointer;text-decoration:none;color:inherit}
.badge-link:hover{filter:brightness(.98)}
.form{display:grid;gap:10px}
input,select,textarea{width:100%;padding:10px 12px;border-radius:12px;border:1px solid var(--border);font:inherit;background:#fff}
.row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width: 720px){.row{grid-template-columns:1fr}}
.footer-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;margin-top:10px}
.notice{padding:10px 12px;border-radius:12px;border:1px solid var(--border);background:#fff}
.notice.error{border-color:#fecaca;background:#fef2f2}
.notice.ok{border-color:#86efac;background:#ecfdf5}
.notice.success{border-color:#86efac;background:#ecfdf5}
.notice.warning{border-color:#fde68a;background:#fffbeb}

/* Thèmes par rôle (change --role) */
.role-admin{--role:#a855f7}
.role-direction{--role:#f97316}
.role-prod{--role:#f59e0b}
.role-tech{--role:#22c55e}
.role-regie{--role:#38bdf8}
.role-accueil{--role:#fb7185}
.role-com{--role:#8b5cf6}
.role-compta{--role:#64748b}
/* =========================
   ACCUEIL – Color boost
   ========================= */

/* Variables (facile à retuner) */
:root {
  --c-bg: #f6f8fb;
  --c-card: #ffffff;
  --c-border: #e3e8f0;

  --c-primary: #2563eb;   /* bleu */
  --c-primary-soft: #e8efff;

  --c-ok: #16a34a;        /* vert */
  --c-ok-soft: #e8f7ee;

  --c-warn: #f59e0b;      /* orange */
  --c-warn-soft: #fff4e5;

  --c-danger: #dc2626;    /* rouge */
  --c-danger-soft: #fde8e8;

  --c-muted: #6b7280;
}

/* Fond général */
body {
  background: var(--c-bg);
}

/* Cartes */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}

.card .hd {
  border-bottom: 1px solid var(--c-border);
  background: linear-gradient(180deg, #fff, #fafbff);
}

.card .hd h2 {
  font-weight: 700;
}

/* KPI (date / lieu / partage) */
.kpi .item {
  background: linear-gradient(180deg, #fff, #f9fbff);
  border: 1px solid var(--c-border);
  border-radius: 10px;
}

.kpi .item strong {
  font-size: 1.1rem;
}

/* Boutons */
.btn {
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
}

.btn.primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
}

.btn.primary:hover {
  filter: brightness(0.95);
}

.btn:hover {
  transform: translateY(-1px);
}

/* Badges */
.badge {
  border-radius: 999px;
  font-weight: 700;
  padding: 3px 10px;
  font-size: 0.75rem;
}

.badge.ok {
  background: var(--c-ok-soft);
  color: var(--c-ok);
}

.badge.warn {
  background: var(--c-warn-soft);
  color: var(--c-warn);
}

.badge.danger {
  background: var(--c-danger-soft);
  color: var(--c-danger);
}

/* Essentiels */
.essentials {
  background: linear-gradient(180deg, #fff, #fdfefe);
}

.essentials .badge.warn {
  box-shadow: inset 0 0 0 1px rgba(245,158,11,.25);
}

/* Timeline */
.timeline li {
  position: relative;
  padding-left: 14px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
}

/* Contacts */
.contacts li strong {
  color: var(--c-primary);
}

/* Partage externe */
.share-block {
  background: linear-gradient(180deg, #f9fbff, #fff);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* Lien expiré */
.badge.danger {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,.3); }
  70% { box-shadow: 0 0 0 6px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* =========================
   Blocs repliables (pages longues)
   Active uniquement si <body data-collapsible="1">
   ========================= */

body[data-collapsible="1"] .card.collapsible > .hd{cursor:pointer;user-select:none;position:relative;z-index:1}
body[data-collapsible="1"] .card.collapsible .hd .toggle{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;height:28px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  font-size:14px;
  line-height:1;
}
/* Important: cible uniquement le body direct (> .bd) pour éviter les effets de bord sur des .bd internes */
body[data-collapsible="1"] .card.collapsible.is-collapsed > .bd{display:none}

/* Dashboard (cockpit) */
.list{display:flex;flex-direction:column;gap:10px}
.list-item{border:1px solid var(--border);border-radius:14px;padding:10px;background:#fff}
body[data-collapsible="1"] .card.collapsible.is-collapsed > .hd{border-bottom:none}


/* Impression */
@media print {
  body {
    background: #fff;
  }
  .btn, nav, header {
    display: none !important;
  }
}



/* -------------------------------------------------
   Modern UI refresh (cards, gradients, inputs, cbx)
   ------------------------------------------------- */

:root{
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --shadow-md: 0 2px 6px rgba(15,23,42,.08), 0 16px 40px rgba(15,23,42,.08);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.65);

  --ring: 0 0 0 4px rgba(59,130,246,.18);

  --grad-empty: linear-gradient(180deg, rgba(239,68,68,.10), rgba(255,255,255,0) 55%);
  --grad-partial: linear-gradient(180deg, rgba(245,158,11,.12), rgba(255,255,255,0) 55%);
  --grad-ok: linear-gradient(180deg, rgba(59,130,246,.10), rgba(255,255,255,0) 55%);

  --chip-bg: rgba(15,23,42,.06);
}

html,body{background:
  radial-gradient(900px 380px at 15% -10%, rgba(59,130,246,.10), transparent 60%),
  radial-gradient(900px 420px at 85% -10%, rgba(245,158,11,.08), transparent 60%),
  var(--bg);
}

@media (prefers-reduced-motion: reduce){
  *{transition:none !important; scroll-behavior:auto !important;}
}

/* Cards */
.card{
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(8px);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15,23,42,.10);
}
.card .head{
  border-bottom: 1px solid rgba(15,23,42,.06);
}

/* State gradients (manual) */
.card[data-state="empty"]{ background-image: var(--grad-empty); }
.card[data-state="partial"]{ background-image: var(--grad-partial); }
.card[data-state="ok"]{ background-image: var(--grad-ok); }

/* State gradients (auto by badges, for modern browsers) */
@supports(selector(:has(*))){
  .card:has(.badge.danger){ background-image: var(--grad-empty); }
  .card:has(.badge.warn){ background-image: var(--grad-partial); }
  .card:has(.badge.ok){ background-image: var(--grad-ok); }
}

/* Badges / pills */
.badge{
  border-radius: 999px;
  box-shadow: var(--shadow-inset);
  border: 1px solid rgba(15,23,42,.08);
}
.badge.ok{ background: rgba(59,130,246,.10); color:#0f2b61; border-color: rgba(59,130,246,.18); }
.badge.warn{ background: rgba(245,158,11,.14); color:#5a3a00; border-color: rgba(245,158,11,.22); }
.badge.danger{ background: rgba(239,68,68,.12); color:#6a0d0d; border-color: rgba(239,68,68,.22); }

.pill{
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid rgba(15,23,42,.08);
}

/* Inputs */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], textarea, select{
  border-radius: var(--radius-md);
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-inset);
}
input:focus, textarea:focus, select:focus{
  outline: none;
  box-shadow: var(--shadow-inset), var(--ring);
  border-color: rgba(59,130,246,.55);
}

/* Buttons */
.btn, button, input[type="submit"]{
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255,255,255,.55), 0 10px 30px rgba(15,23,42,.10);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover, button:hover, input[type="submit"]:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.btn:active, button:active, input[type="submit"]:active{
  transform: translateY(0px);
  box-shadow: 0 1px 0 rgba(255,255,255,.45), 0 8px 18px rgba(15,23,42,.10);
}

/* Combobox (Annuaire) */
.cbx{
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-sm);
}
.cbx .cbx-input{
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 12px 14px;
  font-size: 14px;
}
.cbx .cbx-input:focus{
  box-shadow: none !important;
}
.cbx:focus-within{
  box-shadow: var(--shadow-sm), var(--ring);
  border-color: rgba(59,130,246,.55);
}
.cbx .cbx-add{
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.04);
  padding: 8px 12px;
}
.cbx .cbx-list{
  margin-top: 8px;
  border-top: 1px solid rgba(15,23,42,.06);
  padding: 6px;
  max-height: 260px;
  overflow: auto;
}
.cbx .cbx-item{
  border-radius: 12px;
  padding: 10px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  border: 1px solid transparent;
}
.cbx .cbx-item:hover{
  background: rgba(59,130,246,.08);
  border-color: rgba(59,130,246,.18);
}
.cbx .cbx-meta{
  opacity:.75;
  font-size: 12px;
}

/* Tables */
table{
  border-radius: var(--radius-lg);
  overflow: hidden;
}
thead th{
  background: rgba(15,23,42,.04);
}
tbody tr:hover{
  background: rgba(59,130,246,.05);
}

/* Slightly nicer separators in dense pages */
hr, .sep, .divider{
  border-color: rgba(15,23,42,.08) !important;
}


/* --- Technique: sous-section écarts (fusion carte) --- */
.subsection{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid rgba(15,23,42,.08);
}
.subhd-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.subhd-row h3{
  font-size:14px;
  margin:0;
  font-weight:700;
  letter-spacing:.2px;
}
.subbd .table{ margin-top:8px; }


/* --- Modern UI: Technique inline helpers --- */
.row-inline{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:6px 0 10px;}
.row-inline .badge{display:inline-flex;align-items:center;gap:8px;margin:0;}
.kvline{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin:4px 0 10px;}
.kvline span{white-space:nowrap;}
/* ensure subsections inside card body feel nested */
.card .bd .subsection{margin-top:14px;padding-top:12px;border-top:1px solid rgba(15,23,42,.08);}

/* --- Contrats: diff (ligne par ligne) --- */
.diff{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:12px;line-height:1.35;border:1px solid rgba(15,23,42,.08);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.55)}
.diff-line{padding:6px 10px;border-top:1px solid rgba(15,23,42,.06);white-space:pre-wrap}
.diff-line:first-child{border-top:none}
.diff-line.add{background:rgba(34,197,94,.12)}
.diff-line.del{background:rgba(239,68,68,.12)}


/* --- Billetterie: sous-cartes --- */
.subcard{background:rgba(255,255,255,.65);border:1px solid rgba(15,23,42,.10);border-radius:12px;padding:12px;}
.subcard .muted{margin:0}

/* --- Billetterie: ticket public --- */
.ticket-wrap{max-width:980px;margin:0 auto;}
.ticket{display:flex;gap:0;background:rgba(255,255,255,.75);border:1px solid rgba(15,23,42,.12);border-radius:18px;overflow:hidden;box-shadow:0 12px 30px rgba(15,23,42,.08)}
.ticket__left{flex:1;min-width:300px;padding:18px 18px 14px 18px;}
.ticket__right{width:320px;max-width:42vw;padding:18px;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;background:rgba(15,23,42,.02)}
.ticket__brand{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.ticket__kicker{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:rgba(15,23,42,.55);font-weight:700;margin-bottom:6px}
.ticket__show{font-size:20px;font-weight:800;line-height:1.15}
.ticket__event{margin-top:6px;color:rgba(15,23,42,.7);font-weight:600}
.ticket__grid{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}
.ticket__field{padding:12px;border:1px solid rgba(15,23,42,.08);border-radius:14px;background:rgba(255,255,255,.65)}
.ticket__label{font-size:12px;color:rgba(15,23,42,.55);font-weight:700;margin-bottom:6px}
.ticket__value{font-size:14px;font-weight:700;color:rgba(15,23,42,.92)}
.ticket__footer{margin-top:14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13px}
.ticket__sep{color:rgba(15,23,42,.35)}

.ticket__qrbox{width:100%;display:flex;flex-direction:column;align-items:center;gap:10px}
.ticket__qrlabel{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:rgba(15,23,42,.55);font-weight:700}
.ticket__qr{width:100%;max-width:280px;border-radius:16px;border:1px solid rgba(15,23,42,.10);background:white;padding:12px}
.ticket__qrhint{font-size:13px;color:rgba(15,23,42,.6);text-align:center}

.ticket__tear{width:28px;position:relative;background:transparent}
.ticket__tear:before{content:"";position:absolute;top:0;bottom:0;left:50%;transform:translateX(-50%);width:2px;background:repeating-linear-gradient(to bottom, rgba(15,23,42,.25), rgba(15,23,42,.25) 6px, transparent 6px, transparent 12px);opacity:.5}
.ticket__tear:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;background:radial-gradient(circle at 0 16px, transparent 15px, rgba(15,23,42,.10) 16px, transparent 17px) 0 0/100% 32px,
                  radial-gradient(circle at 100% 16px, transparent 15px, rgba(15,23,42,.10) 16px, transparent 17px) 0 0/100% 32px;opacity:.65}

.ticket-org{margin-top:12px;padding:12px 14px;border:1px solid rgba(15,23,42,.10);border-radius:14px;background:rgba(255,255,255,.65)}

@media (max-width: 740px){
  .ticket{flex-direction:column}
  .ticket__right{width:auto;max-width:none}
  .ticket__tear{height:22px;width:auto}
  .ticket__tear:before{left:0;right:0;top:50%;bottom:auto;height:2px;width:auto;transform:none;background:repeating-linear-gradient(to right, rgba(15,23,42,.25), rgba(15,23,42,.25) 6px, transparent 6px, transparent 12px)}
  .ticket__tear:after{display:none}
  .ticket__grid{grid-template-columns:1fr}
}

@media print{
  body{background:white !important}
  .ticket{box-shadow:none}
  .topbar,.nav,.menu,.burger,.footer{display:none !important}
}

/* -----------------------------
   Ticketing public (catalogue)
------------------------------ */
.tix-body{background:#ededed}
.tix-header{background:#ffffff;box-shadow:0 6px 22px rgba(0,0,0,.08);position:sticky;top:0;z-index:50}
.tix-header__inner{max-width:1200px;margin:0 auto;padding:16px 18px;display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.tix-brand a{font-weight:900;text-decoration:none;color:#111827;font-size:24px;letter-spacing:-.02em}
.tix-nav{display:flex;gap:14px;flex-wrap:wrap}
.tix-nav a{color:#111827;text-decoration:none;font-weight:700;font-size:13px;opacity:.85}
.tix-nav a:hover{opacity:1}
.tix-nav a.is-active{opacity:1;text-decoration:underline}
.tix-main{padding:22px 0}
.tix-container{max-width:1200px;margin:0 auto;padding:0 18px}
.tix-affiche__title{font-size:44px;font-weight:900;letter-spacing:-.03em;margin:10px 0 18px}
.tix-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:22px}
.tix-card{background:#fff;border:1px solid rgba(0,0,0,.08);box-shadow:0 10px 30px rgba(0,0,0,.12);border-radius:6px;overflow:hidden;display:flex;flex-direction:column;min-height:520px}
.tix-thumb{display:block;background:#f3f4f6}
.tix-thumb img{width:100%;height:260px;object-fit:cover;display:block}
.tix-thumb__ph{height:260px}
.tix-card__body{padding:16px 16px 18px;display:flex;flex-direction:column;gap:10px;flex:1}
.tix-kicker{font-size:13px;color:#111827;opacity:.8;font-weight:700}
.tix-title{font-size:28px;line-height:1.05;font-weight:950;letter-spacing:-.02em;text-transform:uppercase;margin-top:2px}
.tix-btn{margin-top:auto;display:block;text-align:center;background:#c1121f;color:#fff;font-weight:900;letter-spacing:.06em;text-decoration:none;padding:14px 12px;border-radius:10px;text-transform:uppercase}
.tix-btn:hover{filter:brightness(0.96)}
.tix-when{font-size:13px;font-weight:800;letter-spacing:.02em;text-transform:uppercase;text-align:center;margin-top:8px}
.tix-where{font-size:13px;color:#111827;opacity:.75;text-align:center}
.tix-empty{padding:18px;border:1px dashed rgba(0,0,0,.18);background:#fff;border-radius:12px;color:#6b7280}

.tix-page{background:#fff;border:1px solid rgba(0,0,0,.08);box-shadow:0 10px 30px rgba(0,0,0,.12);border-radius:14px;padding:18px}
.tix-page h1{margin-top:0}
.tix-form{display:grid;gap:10px;max-width:520px}
.tix-form input{padding:10px 12px;border:1px solid rgba(0,0,0,.18);border-radius:10px}
.muted{color:#6b7280}
@media (max-width:640px){
  .tix-affiche__title{font-size:34px}
  .tix-thumb img,.tix-thumb__ph{height:220px}
  .tix-card{min-height:480px}
}


/* --- Tickets (public) : menu burger mobile --- */
.tix-burger{display:none;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid rgba(17,24,39,.18);border-radius:12px;background:#fff;cursor:pointer}
.tix-burger:hover{border-color:rgba(17,24,39,.32)}
.tix-burger__lines{position:relative;display:block;width:18px;height:2px;background:#111827;border-radius:2px}
.tix-burger__lines::before,.tix-burger__lines::after{content:"";position:absolute;left:0;right:0;height:2px;background:#111827;border-radius:2px}
.tix-burger__lines::before{top:-6px}
.tix-burger__lines::after{top:6px}

@media (max-width: 820px){
  .tix-burger{display:inline-flex}
  .tix-header__inner{gap:12px}
  .tix-nav{display:none;width:100%;flex-direction:column;gap:0;margin-top:10px;padding-top:10px;border-top:1px solid rgba(17,24,39,.08)}
  .tix-nav.is-open{display:flex}
  .tix-nav a{padding:10px 0}
  .tix-nav a + a{border-top:1px solid rgba(17,24,39,.06)}
}


/* =========================
   Dashboard – Season selector
   ========================= */
.dash-season-form{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.dash-season-form .badge{white-space:nowrap}
.dash-season-select{width:auto !important;min-width:220px;max-width:320px;height:34px;padding:6px 12px}
@media (max-width: 720px){.dash-season-select{min-width:160px;max-width:100%}}


/* Modal simple (emails) */
#emailModal{position:fixed;inset:0;z-index:1000}
#emailModal .modal-overlay{position:absolute;inset:0;background:rgba(0,0,0,.45)}
#emailModal .modal{position:relative;max-width:820px;width:calc(100% - 24px);max-height:calc(100% - 24px);overflow:auto;margin:12px auto;background:#fff;border-radius:18px;box-shadow:0 25px 70px rgba(0,0,0,.35);border:1px solid rgba(0,0,0,.08)}
#emailModal .modal-hd{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px 10px;border-bottom:1px solid var(--border)}
#emailModal .modal-bd{padding:14px}


/* ===== Admin (users / permissions) polish ===== */
.admin-page .card .hd{
  align-items:center;
}
.admin-users-page .table th, .admin-users-page .table td{
  padding:12px 12px;
}
.admin-users-page .table thead th{
  background: rgba(15,23,42,.03);
  color: rgba(15,23,42,.85);
  font-weight: 800;
}
.admin-users-page .table tbody tr:hover td{
  background: rgba(2,6,23,.02);
}
.admin-users-page .table{
  border-radius: 14px;
  overflow: hidden;
}

/* Permission checklist */
.admin-user-edit-page .perm{
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.85);
}
.admin-user-edit-page .perm:hover{
  border-color: rgba(15,23,42,.18);
  background: rgba(255,255,255,.95);
}
.admin-user-edit-page .perm.is-preset{
  opacity: .82;
  background: rgba(15,23,42,.03);
  border-style: dashed;
}
.admin-user-edit-page .perm.is-preset input{
  cursor:not-allowed;
}
.pill.preset{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background: rgba(2,132,199,.12);
  color: rgba(2,132,199,.95);
  border:1px solid rgba(2,132,199,.20);
}


/* ===== Admin user_edit ===== */
.admin-user-edit-page .admin-user-edit-shell .bd{
  display:block;
}
.admin-user-edit-page .admin-user-edit-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.admin-user-edit-page .admin-perms-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0 14px;
}
.admin-user-edit-page .admin-perm-group-card{
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 8px 30px rgba(15,23,42,.05);
}
.admin-user-edit-page .admin-perm-group-card > .bd{
  padding-top:14px;
}
.admin-user-edit-page .perm-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.admin-user-edit-page .perm-item{
  display:grid;
  grid-template-columns:20px 1fr;
  align-items:flex-start;
  gap:12px;
  padding:14px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  background:rgba(255,255,255,.92);
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.admin-user-edit-page .perm-item:hover{
  border-color:rgba(15,23,42,.18);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
  transform:translateY(-1px);
}
.admin-user-edit-page .perm-item input[type="checkbox"]{
  margin-top:2px;
  width:18px;
  height:18px;
}
.admin-user-edit-page .perm-item.is-active{
  border-color:rgba(59,130,246,.22);
  background:rgba(59,130,246,.05);
}
.admin-user-edit-page .perm-item.is-denied{
  background:rgba(239,68,68,.04);
  border-color:rgba(239,68,68,.18);
}
.admin-user-edit-page .perm-item.is-preset:not(.is-denied){
  background:rgba(15,23,42,.03);
}
.admin-user-edit-page .perm-main{
  min-width:0;
}
.admin-user-edit-page .perm-label-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.admin-user-edit-page .perm-label{
  font-weight:800;
  color:#0f172a;
}
.admin-user-edit-page .perm-key{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  background:rgba(15,23,42,.06);
  color:rgba(15,23,42,.72);
}
.admin-user-edit-page .perm-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:10px;
}
.admin-user-edit-page .tag{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid transparent;
}
.admin-user-edit-page .tag.preset{
  background:rgba(2,132,199,.10);
  color:rgba(3,105,161,.95);
  border-color:rgba(2,132,199,.18);
}
.admin-user-edit-page .tag.direct{
  background:rgba(16,185,129,.10);
  color:rgba(4,120,87,.95);
  border-color:rgba(16,185,129,.18);
}
.admin-user-edit-page .tag.denied{
  background:rgba(239,68,68,.10);
  color:rgba(185,28,28,.95);
  border-color:rgba(239,68,68,.18);
}
.admin-user-edit-page .admin-user-edit-help{
  font-size:13px;
  color:rgba(15,23,42,.72);
}
@media (max-width: 920px){
  .admin-user-edit-page .perm-grid{grid-template-columns:1fr;}
}
@media (max-width: 700px){
  .admin-user-edit-page .admin-user-edit-meta{grid-template-columns:1fr;}
  .admin-user-edit-page .perm-label-row{flex-direction:column;}
  .admin-user-edit-page .perm-key{white-space:normal;}
}

/* Accordeon local (Kit com / Technique) */
.card .hd .card-toggle{margin-left:8px;min-width:42px}
.card .hd .card-toggle.is-open{transform:rotate(180deg)}

/* === Apparence "document Word" pour les contrats === */
/* Shell : fournit le fond gris + toolbar collée en haut */
.contract-editor-shell {
  background: #e8e9ec;
  border-radius: 8px;
  overflow: hidden;
}
.contract-editor-shell .contract-toolbar {
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
/* Wrap classique (sans toolbar intégrée) */
.contract-doc-wrap {
  background: #e8e9ec;
  padding: 32px 16px 48px;
  border-radius: 8px;
}
/* Wrap à l'intérieur d'un shell (pas de fond propre, le shell le fournit) */
.contract-editor-shell .contract-doc-wrap {
  background: transparent;
  padding: 28px 16px 48px;
  border-radius: 0;
}
.contract-doc-page {
  background: #fff;
  max-width: 794px; /* largeur A4 @ 96dpi */
  margin: 0 auto;
  padding: 72px 80px;
  box-shadow: 0 4px 24px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.10);
  border-radius: 2px;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 14px;
  line-height: 1.85;
  color: #1a1a1a;
  min-height: 500px;
}
.contract-doc-page textarea {
  display: block;
  width: 100%;
  min-height: 700px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 14px;
  line-height: 1.85;
  color: #1a1a1a;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
.contract-doc-page textarea:focus {
  outline: none;
  box-shadow: none;
}
.contract-doc-page pre {
  white-space: pre-wrap;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 14px;
  line-height: 1.85;
  color: #1a1a1a;
  margin: 0;
  background: transparent;
  border: none;
  padding: 0;
}
@media (max-width: 860px) {
  .contract-doc-page { padding: 40px 28px; }
}
.contract-doc-logo {
  margin-bottom: 28px;
}
.contract-doc-logo img {
  max-height: 80px;
  max-width: 240px;
  display: block;
  object-fit: contain;
}
@media print {
  .contract-doc-logo img { max-height: 70px; }
}

/* === Toolbar mise en forme contrat (style Word/LibreOffice) === */
.contract-doc-wrap {
  /* override: wrap includes toolbar now */
  padding-top: 0;
}
.contract-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  padding: 4px 10px;
  background: #f0f0f0;
  border-bottom: 1px solid #c8c8c8;
  position: sticky;
  top: 0;
  z-index: 20;
  user-select: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.contract-toolbar::-webkit-scrollbar { display: none; }
.contract-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.contract-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  color: #222;
  font-size: 13px;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
  transition: background .07s;
  position: relative;
  flex-shrink: 0;
  line-height: 1;
}
.contract-toolbar button svg {
  display: block;
  fill: #222;
  flex-shrink: 0;
}
.contract-toolbar button:hover {
  background: rgba(0,0,0,.10);
}
.contract-toolbar button:active {
  background: rgba(0,0,0,.17);
}
.contract-toolbar button.is-active {
  background: #d0e4f7;
  color: #1a5fa8;
}
.contract-toolbar button.is-active svg {
  fill: #1a5fa8;
}
/* Tooltip */
.contract-toolbar button[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: #444;
  color: #fff;
  font-size: 11px;
  font-family: system-ui, sans-serif;
  font-weight: 400;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.contract-toolbar-sep {
  width: 1px;
  height: 18px;
  background: #c0c0c0;
  margin: 0 6px;
  flex-shrink: 0;
}
/* Boutons texte formatés (B, I, U, Hx) */
.contract-toolbar .tb-bold   { font-weight: 700; font-size: 14px; }
.contract-toolbar .tb-italic { font-style: italic; font-size: 14px; font-family: Georgia, serif; }
.contract-toolbar .tb-h      { font-family: system-ui, sans-serif; font-weight: 700; letter-spacing: -.02em; }

/* contenteditable contrat */
.contract-doc-page [contenteditable]:focus {
  outline: none;
}
.contract-doc-page [contenteditable] p,
.contract-doc-page [contenteditable] div {
  margin: 0 0 0.85em;
}
.contract-doc-page [contenteditable] h1 { font-size: 1.35em; font-weight: bold; margin: 1.2em 0 .5em; }
.contract-doc-page [contenteditable] h2 { font-size: 1.15em; font-weight: bold; margin: 1em 0 .4em; }
.contract-doc-page [contenteditable] h3 { font-size: 1em;    font-weight: bold; margin: .9em 0 .3em; }
.contract-doc-page [contenteditable] ul { margin: 0 0 .85em 1.4em; padding: 0; }
.contract-doc-page [contenteditable] li { margin-bottom: .3em; }
