/* DTP Cannes Lions v2 — Front CSS */
.dtpcl-root {
  --hl: #0BB9E2;
  --border: #e2e6ea;
  --text: #111;
  --muted: #6b7280;
  --c-gp: #0BB9E2;
  --c-gold: #d4a017;
  --c-silver: #8a9ab0;
  --c-bronze: #b5723a;
  --c-sl: #6b7280;
  --r: 7px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: transparent;
}
.dtpcl-root * { box-sizing: border-box; }
.dtpcl-root .dtpcl-hidden { display: none !important; }
.dtpcl-wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* BANDEAU + CALENDRIER */
.dtpcl-bandeau-wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px 28px; }
.dtpcl-bandeau {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 7px;
  background: #f0fdf4; border: 1px solid rgba(34,197,94,.35);
  font-size: 12px; font-weight: 600;
}
.dtpcl-bandeau.open { border-radius: 7px 7px 0 0; border-bottom-color: transparent; }
.dtpcl-bandeau-upd { color: #22c55e; flex: 1; }
.dtpcl-cal-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 12px 'Inter', sans-serif; color: #111;
  background: none; border: none; cursor: pointer; padding: 0; white-space: nowrap;
}
.dtpcl-cal-toggle:hover { color: #22c55e; }
.dtpcl-cal-chevron { font-size: 11px; transition: transform .2s; display: inline-block; }
.dtpcl-cal-chevron.open { transform: rotate(180deg); }

.dtpcl-cal-dropdown {
  border: 1px solid rgba(34,197,94,.35); border-top: 0;
  border-radius: 0 0 7px 7px; background: #fff; overflow: hidden;
}
.dtpcl-cal-table { border-collapse: collapse; width: 100%; font-size: 13px; margin-bottom: 0; }
.dtpcl-cal-table thead th {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 8px 14px; border-bottom: 1px solid var(--border);
  background: #fafafa; text-align: left;
}
.dtpcl-cal-th-right { text-align: left !important; }
.dtpcl-cal-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.dtpcl-cal-table tbody tr:last-child { border-bottom: 0; }
.dtpcl-cal-table tbody tr:hover { background: #fafbfc; }
.dtpcl-cal-date-col,
.dtpcl-cal-type-col,
.dtpcl-cal-cat { padding: 8px 14px; vertical-align: middle; font-size: 13px; }
.dtpcl-cal-date-long { display: inline !important; }
.dtpcl-cal-date-short { display: none !important; }
.dtpcl-cal-date-col { font-weight: 700; white-space: nowrap; width: 140px; }
.dtpcl-cal-type-col { width: 120px; padding-left: 6px; padding-right: 6px; }
.dtpcl-cal-past .dtpcl-cal-date-col,
.dtpcl-cal-past .dtpcl-cal-cat { color: #b0b8c4; }
.dtpcl-cal-today .dtpcl-cal-date-col { color: var(--hl); }
.dtpcl-cal-upcoming .dtpcl-cal-date-col { color: var(--text); }
.dtpcl-cal-pill {
  display: inline-block; font-size: 10px; font-weight: 700;
  border-radius: 4px; padding: 2px 6px;
}
.dtpcl-cal-done { background: #f4f6f8; color: #9ca3af; }
.dtpcl-cal-live { background: var(--hl); color: #fff; }
.dtpcl-cal-type-sl   { background: #f4f6f9; color: #3e4a5c; }
.dtpcl-cal-type-aw   { background: #fdf8e5; color: #7a5c00; }

/* Ligne totaux */
.dtpcl-table tfoot .dtpcl-tr-total td {
  padding: 10px 8px; border-top: 2px solid var(--border);
  font-weight: 700; font-size: 14px; background: #fafafa;
  text-align: center; vertical-align: middle;
}
.dtpcl-table tfoot .dtpcl-tr-total .dtpcl-td-rk { width: 36px; }
.dtpcl-table tfoot .dtpcl-tr-total .dtpcl-td-ag { text-align: left; padding-left: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.dtpcl-table tfoot .dtpcl-tr-total .dtpcl-td-pts { font-size: 16px; color: var(--text); }

/* Campagne la plus primée */
.dtpcl-top-camp {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r);
  font-size: 13px;
}
.dtpcl-top-camp-label { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dtpcl-top-camp-title { font-weight: 700; }
.dtpcl-top-camp-agency { color: var(--muted); }
.dtpcl-top-camp-pts { margin-left: auto; font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--hl); white-space: nowrap; }

/* Pill calendrier : nowrap */
.dtpcl-cal-pill-nowrap { white-space: nowrap; }
.dtpcl-notif-dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: #22c55e; animation: dtpcl-pulse-green 2s infinite;
}
@keyframes dtpcl-pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* SCOREBOARD */
.dtpcl-scoreboard {
  max-width: 1060px; margin: 0 auto;
  padding: 0 20px 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.dtpcl-scard {
  background: #111; border-radius: var(--r); padding: 10px 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.dtpcl-scard-num {
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 22px; color: #fff; line-height: 1;
}
.dtpcl-scard-lab { font-size: 12px; font-weight: 600; color: var(--hl); line-height: 1.3; }

/* CLASSEMENT */
.dtpcl-block { padding: 0 0 40px; }
.dtpcl-section-title {
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: clamp(18px, 3vw, 24px); letter-spacing: -.01em;
  margin: 0 0 4px; text-align: left;
}
.dtpcl-section-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; text-align: left; }

.dtpcl-points-legend {
  display: flex; flex-wrap: wrap; gap: 3px 8px;
  justify-content: flex-start; margin-bottom: 14px;
  font-size: 13px; color: var(--muted);
}
.dtpcl-pl-sep { color: #d0d5dd; }
.dtpcl-pl-shortlist b { color: var(--c-sl); font-weight: 700; }
.dtpcl-pl-bronze b   { color: var(--c-bronze); font-weight: 700; }
.dtpcl-pl-silver b   { color: var(--c-silver); font-weight: 700; }
.dtpcl-pl-gold b     { color: var(--c-gold); font-weight: 700; }
.dtpcl-pl-gp b       { color: var(--c-gp); font-weight: 700; }

/* TABLE — responsive mobile : on masque les colonnes secondaires */
.dtpcl-table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); background: #fff; }
.dtpcl-table { border-collapse: collapse; width: 100%; min-width: 0; margin: 0; }
.dtpcl-table thead th {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 8px; border-bottom: 1px solid var(--border);
  background: #fff; color: var(--muted); text-align: center; white-space: nowrap;
}
.dtpcl-table .dtpcl-th-rk { width: 36px; }
.dtpcl-table .dtpcl-th-ag { text-align: left; padding-left: 12px; }
.dtpcl-table tbody td {
  padding: 10px 8px; text-align: center; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.dtpcl-table tbody tr:last-child td { border-bottom: 0; }
.dtpcl-table .dtpcl-td-rk { font-size: 14px; width: 36px; text-align: center; }
.dtpcl-table .dtpcl-td-ag { text-align: left; font-weight: 700; font-size: 14px; padding-left: 6px; }
.dtpcl-table .dtpcl-td-pts { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 16px; color: var(--text); }
.dtpcl-table .dtpcl-td-empty { color: #d0d5dd; font-size: 13px; }
.dtpcl-table .dtpcl-td-val { font-weight: 700; }
.dtpcl-table .dtpcl-c-gp     { color: var(--c-gp); }
.dtpcl-table .dtpcl-c-gold   { color: var(--c-gold); }
.dtpcl-table .dtpcl-c-silver { color: var(--c-silver); }
.dtpcl-table .dtpcl-c-bronze { color: var(--c-bronze); }
.dtpcl-table .dtpcl-c-sl     { color: var(--c-sl); }

/* Podium */
.dtpcl-table .dtpcl-row-1 { background: rgba(212,160,23,.06); }
.dtpcl-table .dtpcl-row-2 { background: rgba(138,154,176,.06); }
.dtpcl-table .dtpcl-row-3 { background: rgba(181,114,58,.06); }
.dtpcl-table .dtpcl-row-1 .dtpcl-td-ag { color: var(--c-gold); }
.dtpcl-table .dtpcl-row-2 .dtpcl-td-ag { color: var(--c-silver); }
.dtpcl-table .dtpcl-row-3 .dtpcl-td-ag { color: var(--c-bronze); }
.dtpcl-table tbody tr:hover { filter: brightness(.97); }

/* DETAIL HEADER : on annule toute marge et padding, la barre de recherche suit directement */
/* Couleurs inversées : silver ↔ shortlist */
.dtpcl-root {
  --c-silver: #6b7280;
  --c-sl: #8a9ab0;
}

/* DETAIL HEADER : même marge-bottom que .dtpcl-section-sub (14px) */
.dtpcl-detail-header { padding: 0; margin: 0; }
.dtpcl-detail-header h2.dtpcl-section-title { margin-bottom: 4px; }
.dtpcl-detail-header p.dtpcl-section-sub { margin-bottom: 14px; }

/* CONTROLS : plus de sticky */
.dtpcl-controls { background: #fff; }
.dtpcl-ctrl-inner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 20px; }
.dtpcl-search-wrap { flex: 1 1 200px; min-width: 0; }
.dtpcl-search {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r);
  padding: 8px 12px; font: 14px 'Inter', sans-serif; color: var(--text);
  background: #fafafa;
}
.dtpcl-search:focus { outline: 2px solid var(--hl); outline-offset: 1px; border-color: var(--hl); }
.dtpcl-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.dtpcl-seg-btn {
  font: 600 12px/1 'Inter', sans-serif; border: 0; background: transparent;
  padding: 8px 12px; cursor: pointer; color: var(--muted); white-space: nowrap;
}
.dtpcl-seg-btn[aria-pressed="true"] { background: #000; color: #fff; }
.dtpcl-sort-btn {
  font: 600 12px 'Inter', sans-serif; border: 1px solid var(--border);
  border-radius: var(--r); padding: 8px 12px; background: #fafafa; cursor: pointer; color: var(--text);
}
.dtpcl-sort-btn:hover { border-color: var(--hl); }
.dtpcl-chips-wrap { overflow-x: auto; scrollbar-width: none; }
.dtpcl-chips-wrap::-webkit-scrollbar { display: none; }
.dtpcl-chips { display: flex; gap: 5px; padding: 0 20px 10px; flex-wrap: nowrap; }
.dtpcl-chip {
  white-space: nowrap; border: 1px solid var(--border); border-radius: var(--r);
  padding: 5px 10px; font: 600 12px 'Inter', sans-serif; color: var(--muted);
  background: #fafafa; cursor: pointer;
}
.dtpcl-chip[aria-pressed="true"] { background: #000; color: #fff; border-color: #000; }

/* AGENCY CARDS */
.dtpcl-main { padding: 16px 0 60px; }
.dtpcl-list { display: flex; flex-direction: column; gap: 10px; }
.dtpcl-agency { background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }

/* Header agence : fond clair */
.dtpcl-agency-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: #fafafa;
}
.dtpcl-agency-name {
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 16px; letter-spacing: -.01em; margin: 0; color: var(--text);
}
.dtpcl-tally { display: flex; gap: 4px; flex-wrap: wrap; }
.dtpcl-tally span {
  font: 700 10px 'Inter', sans-serif; border-radius: var(--r);
  padding: 2px 7px; border: 1px solid var(--border); color: var(--muted);
}
.dtpcl-tally span b { margin-left: 2px; }
.dtpcl-tally .dtpcl-tally-grand_prix { color: var(--c-gp);    border-color: rgba(11,185,226,.35); background: #f0fbff; }
.dtpcl-tally .dtpcl-tally-gold       { color: var(--c-gold);  border-color: rgba(212,160,23,.35); background: #fdf8e8; }
.dtpcl-tally .dtpcl-tally-silver     { color: var(--c-silver); border-color: rgba(107,114,128,.35); background: #f4f6f8; }
.dtpcl-tally .dtpcl-tally-bronze     { color: var(--c-bronze); border-color: rgba(181,114,58,.35); background: #fdf3ec; }
.dtpcl-tally .dtpcl-tally-shortlist  { color: var(--c-sl); border-color: rgba(138,154,176,.35); background: #f4f6f9; }
.dtpcl-agency-pts {
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 18px; color: var(--hl); white-space: nowrap; margin-left: auto;
}
.dtpcl-agency-pts span { font-size: 12px; font-weight: 600; color: var(--muted); }

/* CAMPAGNES */
.dtpcl-camps { list-style: none; margin: 0; padding: 0; }
.dtpcl-camp {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 16px; border-top: 1px solid #f0f0f0;
}
.dtpcl-camp-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; align-self: center; margin-top: 0; }
.dtpcl-camp-dot.won { background: var(--hl); margin-bottom: 21px; }
.dtpcl-camp-dot.shortlist { background: #d0d5dd; margin-bottom: 21px; }
.dtpcl-camp-body { flex: 1; min-width: 0; }
.dtpcl-camp-top { margin-bottom: 4px; }
.dtpcl-camp-title { font-weight: 700; font-size: 13px; }
.dtpcl-camp-brand { font-size: 12px; color: var(--muted); margin-left: 6px; }
.dtpcl-camp-pts { font: 600 11px 'Inter', sans-serif; color: var(--muted); white-space: nowrap; padding-top: 2px; flex: none; }

.dtpcl-camp-line { display: flex; align-items: center; gap: 6px; width: 100%; }
.dtpcl-badges { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.dtpcl-badge {
  font: 600 11px 'Inter', sans-serif; border-radius: var(--r);
  padding: 2px 7px; border: 1px solid transparent;
}
.dtpcl-badge-lv { font-weight: 700; }
.dtpcl-lvl-grand_prix { background: #f0fbff; color: #0183a1; border-color: #bde8f5; }
.dtpcl-lvl-grand_prix .dtpcl-badge-lv { color: var(--c-gp); }
.dtpcl-lvl-gold       { background: #fdf8e5; color: #7a5c00; border-color: #edd97a; }
.dtpcl-lvl-gold .dtpcl-badge-lv       { color: var(--c-gold); }
.dtpcl-lvl-silver     { background: #f4f6f8; color: #555e6b; border-color: #d1d5db; }
.dtpcl-lvl-silver .dtpcl-badge-lv     { color: var(--c-silver); }
.dtpcl-lvl-bronze     { background: #fdf2e8; color: #6b3d10; border-color: #e4c09c; }
.dtpcl-lvl-bronze .dtpcl-badge-lv     { color: var(--c-bronze); }
.dtpcl-lvl-shortlist  { background: #f4f6f9; color: #3e4a5c; border-color: rgba(138,154,176,.45); }
.dtpcl-lvl-shortlist .dtpcl-badge-lv { color: var(--c-sl); }

.dtpcl-vbtn {
  flex: none; margin-left: auto;
  font: 600 12px 'Inter', sans-serif;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
  background: none; border: none; padding: 0; cursor: pointer;
  white-space: nowrap; align-self: center;
}
.dtpcl-vbtn:hover { color: var(--hl); }
.dtpcl-video { margin-top: 8px; position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: #000; }
.dtpcl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dtpcl-empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 14px; }

/* ===== RESPONSIVE MOBILE ===== */

/* Pills détail visibles sous le nom d'agence sur mobile */
.dtpcl-mob-pills { display: none; }

@media (max-width: 640px) {
  /* Scoreboard : 2 colonnes */
  .dtpcl-scoreboard { grid-template-columns: repeat(2, 1fr); padding-bottom: 20px; }

  /* Tableau : on masque les colonnes détail, on affiche les pills sous le nom */
  .dtpcl-table .dtpcl-col-hide { display: none; }
  .dtpcl-table thead th { padding: 8px 6px; font-size: 10px; }
  .dtpcl-table tbody td { padding: 9px 6px; font-size: 13px; }
  .dtpcl-table .dtpcl-td-pts { font-size: 14px; }
  .dtpcl-mob-pills {
    display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px;
  }
  .dtpcl-mob-pill {
    font: 600 11px 'Inter', sans-serif; border-radius: 4px;
    padding: 2px 6px; background: #f4f6f8;
  }
  .dtpcl-mob-pill.dtpcl-c-gp     { background: #f0fbff; color: var(--c-gp); }
  .dtpcl-mob-pill.dtpcl-c-gold   { background: #fdf8e5; color: var(--c-gold); }
  .dtpcl-mob-pill.dtpcl-c-silver { background: #f4f6f8; color: var(--c-silver); }
  .dtpcl-mob-pill.dtpcl-c-bronze { background: #fdf2e8; color: var(--c-bronze); }
  .dtpcl-mob-pill.dtpcl-c-sl     { background: #f4f6f9; color: var(--c-sl); }

  /* Controls */
  .dtpcl-ctrl-inner { padding: 8px 12px; gap: 6px; }
  .dtpcl-chips { padding: 0 12px 8px; }

  /* Campagnes */
  .dtpcl-camp { flex-wrap: wrap; }
  .dtpcl-camp-pts { width: 100%; text-align: right; padding-top: 4px; }
  .dtpcl-camp-line { flex-wrap: wrap; }
  .dtpcl-vbtn { margin-left: 0; width: 100%; }

  /* Calendrier mobile : date courte, colonnes ajustées */
  .dtpcl-cal-date-col { width: 48px; font-size: 12px; padding: 8px 8px; }
  .dtpcl-cal-type-col { width: 80px; padding: 8px 4px; }
  .dtpcl-cal-cat { padding: 8px 8px; font-size: 12px; }
  .dtpcl-cal-date-long { display: none !important; }
  .dtpcl-cal-date-short { display: inline !important; }
}
@media (prefers-reduced-motion: reduce) { .dtpcl-notif-dot { animation: none; } }
