/* ==========================================================================
   TIMCOD — bloc des agences (bas de toutes les pages : composant « agences-bas »)
   --------------------------------------------------------------------------
   Fond bleu Timcod, accents orange (charte). Police et couleurs : variables --tc-*
   de timcod-guide.css (chargée avant cette feuille).
   Le bloc est hors de <main class="tc-guide"> : toutes ses règles commencent par .tc-ag
   et remettent à zéro marges, listes et titres, pour ne pas dépendre de la feuille du site.
   Animations (entrée des points et des cartes, pulsation, liaisons) : seulement quand
   timcod-agences.js a ajouté .tc-ag--js, et coupées si le visiteur a demandé moins d'animations.
   Thème clair possible : ajouter la classe tc-ag--clair à la section.
   ========================================================================== */

.tc-ag {
  --ag-orange: var(--tc-orange, #ff9600);
  --ag-bg: var(--tc-navy, #000546);
  --ag-fg: #ffffff;
  --ag-muted: #b9bbd2;
  --ag-accent-txt: var(--tc-orange, #ff9600);
  --ag-card: rgba(255, 255, 255, .04);
  --ag-card-actif: rgba(255, 255, 255, .08);
  --ag-line: rgba(255, 255, 255, .14);
  --ag-dot: rgba(255, 255, 255, .24);
  --ag-contour: rgba(255, 255, 255, .30);
  --ag-terre: rgba(255, 255, 255, .025);
  --ag-arc: rgba(0, 255, 255, .55);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 80px 40px;
  background: var(--ag-bg);
  color: var(--ag-fg);
  font: 300 16px/1.5 var(--tc-font, "TC Spartan", "Century Gothic", sans-serif);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.tc-ag--clair {
  --ag-bg: var(--tc-bg-soft, #f7f7fb);
  --ag-fg: var(--tc-navy, #000546);
  --ag-muted: #4c4e66;
  --ag-accent-txt: var(--tc-orange-dark, #ad6418);
  --ag-card: #ffffff;
  --ag-card-actif: #ffffff;
  --ag-line: var(--tc-line, #d3d4dd);
  --ag-dot: rgba(0, 5, 70, .22);
  --ag-contour: rgba(0, 5, 70, .28);
  --ag-terre: rgba(0, 5, 70, .03);
  --ag-arc: rgba(0, 30, 255, .45);
}
.tc-ag *, .tc-ag *::before, .tc-ag *::after { box-sizing: border-box; }
.tc-ag ul, .tc-ag li { margin: 0; padding: 0; list-style: none; }
.tc-ag li::before, .tc-ag li::marker { content: none; }
.tc-ag a { color: inherit; }

.tc-ag__in { position: relative; display: flex; flex-direction: column; gap: 48px; max-width: 1200px; margin: 0 auto; }

/* En-tête du bloc */
.tc-ag__tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 56px; }
.tc-ag__intro { flex: 1 1 520px; max-width: 700px; }
.tc-ag .tc-ag__kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 0; font-size: 15px; font-weight: 400; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase; color: var(--ag-fg); }
.tc-ag .tc-ag__kicker::before { content: ""; flex: none; width: 32px; height: 3px; background: var(--ag-orange); }
.tc-ag .tc-ag__titre { margin: 0 0 16px; padding: 0; font-family: inherit; font-size: clamp(30px, 4.2vw, 46px); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; text-transform: none; color: var(--ag-fg); }
.tc-ag .tc-ag__titre span { color: var(--ag-accent-txt); }
.tc-ag .tc-ag__lead { max-width: 620px; margin: 0; padding: 0; font-size: 18px; line-height: 1.55; color: var(--ag-muted); }
.tc-ag__chiffres { display: flex; }
.tc-ag .tc-ag__chiffre { display: flex; flex-direction: column; padding: 0 32px; border-left: 1px solid var(--ag-line); }
.tc-ag .tc-ag__chiffre:first-child { padding-left: 0; border-left: 0; }
.tc-ag__nb { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--ag-accent-txt); }
.tc-ag__lbl { margin-top: 6px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ag-muted); }

/* Carte et agences */
.tc-ag__corps { display: grid; grid-template-columns: minmax(0, 10fr) minmax(0, 14fr); gap: 48px; align-items: center; }
.tc-ag__carte { width: 100%; max-width: 560px; margin: 0 auto; }
.tc-ag__svg { display: block; width: 100%; height: auto; overflow: visible; }
.tc-ag-terre { fill: var(--ag-terre); stroke: var(--ag-contour); stroke-width: 1; stroke-linejoin: round; }
.tc-ag-points { fill: none; stroke: var(--ag-dot); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 0 8; }
.tc-ag-arcs { fill: none; stroke: var(--ag-arc); stroke-width: 1.5; stroke-dasharray: 3 7; }
.tc-ag-pin { transform-box: fill-box; transform-origin: center; }
.tc-ag-pin__zone { fill: transparent; pointer-events: all; }
.tc-ag-pin__halo { fill: var(--ag-orange); opacity: 0; transition: opacity .35s; }
.tc-ag-pin__pulse { fill: none; stroke: var(--ag-orange); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center; }
.tc-ag-pin__coeur { fill: var(--ag-orange); stroke: var(--ag-bg); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transition: transform .3s; }
.tc-ag-pin__nom { font-family: inherit; font-size: 17px; font-weight: 500; fill: var(--ag-fg); paint-order: stroke; stroke: var(--ag-bg); stroke-width: 5px; stroke-linejoin: round; transition: fill .3s; }
.tc-ag-pin.is-actif .tc-ag-pin__halo { opacity: .2; }
.tc-ag-pin.is-actif .tc-ag-pin__coeur { transform: scale(1.45); }
.tc-ag-pin.is-actif .tc-ag-pin__nom { fill: var(--ag-accent-txt); font-weight: 700; }

.tc-ag__cartes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tc-ag .tc-ag-card { position: relative; container-type: inline-size; padding: 18px 20px 14px; background: var(--ag-card); border: 1px solid var(--ag-line); border-radius: 4px; transition: background .3s, border-color .3s; }
.tc-ag .tc-ag-card::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 3px; border-radius: 4px 4px 0 0; background: var(--ag-orange); transform: scaleX(0); transform-origin: left; transition: transform .4s ease; }
.tc-ag .tc-ag-card.is-actif { background: var(--ag-card-actif); border-color: rgba(255, 150, 0, .6); }
.tc-ag .tc-ag-card.is-actif::before { transform: scaleX(1); }
.tc-ag .tc-ag-card__nom { margin: 0 0 6px; padding: 0; font-family: inherit; font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; text-transform: none; color: var(--ag-fg); }
.tc-ag .tc-ag-card__nom a { color: var(--ag-fg); text-decoration: none; }
.tc-ag .tc-ag-card__nom a::after { content: "\00a0\2192"; display: inline-block; color: var(--ag-orange); transition: transform .25s; }
.tc-ag .tc-ag-card__nom a:hover, .tc-ag .tc-ag-card__nom a:focus-visible { text-decoration: underline; text-decoration-color: var(--ag-orange); text-underline-offset: 3px; }
.tc-ag .tc-ag-card__nom a:hover::after { transform: translateX(4px); }
.tc-ag .tc-ag-card__adr { margin: 0 0 10px; font-size: 15.5px; font-style: normal; line-height: 1.4; color: var(--ag-muted); }
.tc-ag .tc-ag-card__tels { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--ag-line); }

/* Numéros : toute la ligne est le lien d'appel ; libellé à gauche, numéro à droite, sur une seule ligne.
   Carte étroite : « Hotline » seul (« technique » reste lu par les lecteurs d'écran). */
.tc-ag .tc-ag-tel { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 16px; white-space: nowrap; color: var(--ag-fg); text-decoration: none; }
.tc-ag .tc-ag-tel:hover, .tc-ag .tc-ag-tel:focus-visible { color: var(--ag-accent-txt); }
.tc-ag .tc-ag-tel:focus-visible { outline: 2px solid var(--ag-orange); outline-offset: 2px; }
.tc-ag-tel svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ag-orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tc-ag-tel__lbl { flex: none; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ag-muted); }
.tc-ag-tel__num { margin-left: auto; padding-left: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; white-space: nowrap; }
@container (max-width: 330px) {
  .tc-ag-tel__plus { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Tuile « Contacter une agence » */
.tc-ag .tc-ag-cta { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; height: 100%; min-height: 150px; padding: 20px; border-radius: 4px; background: var(--ag-orange); color: var(--tc-navy, #000546); text-decoration: none; transition: background .25s; }
.tc-ag .tc-ag-cta:hover, .tc-ag .tc-ag-cta:focus-visible { background: #ffaa33; color: var(--tc-navy, #000546); }
.tc-ag .tc-ag-cta:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.tc-ag-cta__sur { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.tc-ag-cta__titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.tc-ag-cta__titre svg { flex: none; width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; }
.tc-ag .tc-ag-cta:hover .tc-ag-cta__titre svg { transform: translateX(5px); }

/* Animations (avec JavaScript) : entrée quand le bloc arrive à l'écran, puis pulsation et liaisons en mouvement */
.tc-ag--js:not(.is-visible) .tc-ag-pin,
.tc-ag--js:not(.is-visible) .tc-ag-card,
.tc-ag--js:not(.is-visible) .tc-ag__cta-item { opacity: 0; }
.tc-ag.is-visible .tc-ag-pin { animation: tc-ag-pop .7s cubic-bezier(.2, .9, .25, 1.25) both; animation-delay: calc(var(--i, 0) * 100ms + 150ms); }
.tc-ag.is-visible .tc-ag-card,
.tc-ag.is-visible .tc-ag__cta-item { animation: tc-ag-monte .6s ease both; animation-delay: calc(var(--i, 0) * 70ms + 100ms); }
.tc-ag--js .tc-ag-pin__pulse { opacity: 1; animation: tc-ag-pulse 3.2s ease-out infinite; animation-delay: calc(var(--i, 0) * -450ms); }
.tc-ag--js .tc-ag-arcs { animation: tc-ag-flux 2s linear infinite; }
@keyframes tc-ag-flux { to { stroke-dashoffset: -20; } }
@keyframes tc-ag-pulse { 0% { transform: scale(1); opacity: .95; } 80%, 100% { transform: scale(4.2); opacity: 0; } }
@keyframes tc-ag-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes tc-ag-monte { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 980px) {
  .tc-ag__corps { grid-template-columns: minmax(0, 1fr); }
  .tc-ag__carte { max-width: 480px; }
}
@media (max-width: 640px) {
  .tc-ag { padding: 56px 16px; }
  .tc-ag__in { gap: 32px; }
  .tc-ag__cartes { grid-template-columns: minmax(0, 1fr); }
  .tc-ag__nb { font-size: 48px; }
  .tc-ag .tc-ag__chiffre { padding: 0 22px; }
  .tc-ag .tc-ag__lead { font-size: 17px; }
  .tc-ag-pin__nom { display: none; }
  .tc-ag-pin.is-actif .tc-ag-pin__nom { display: inline; font-size: 26px; }
}
@media (pointer: coarse) { .tc-ag .tc-ag-tel { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  .tc-ag *, .tc-ag *::before, .tc-ag *::after { animation: none !important; transition: none !important; }
  .tc-ag--js .tc-ag-pin, .tc-ag--js .tc-ag-card, .tc-ag--js .tc-ag__cta-item { opacity: 1; }
  .tc-ag-pin__pulse { opacity: 0 !important; }
}
/* Version PDF (impression, « Enregistrer au format PDF », PDF des guides) : le bloc devient la dernière page,
   « Contact » : titre, encadré « Contactez TIMCOD » (QR code + lien cliquable vers la page contact), les 7 agences
   sur deux colonnes avec leurs numéros (liens d'appel cliquables dans le PDF), puis l'adresse de la page d'origine.
   L'encadré et la source n'apparaissent qu'à l'impression. */
.tc-ag-pdf, .tc-ag-pdf__source { display: none; }
@media print {
  .tc-ag { break-before: page; overflow: visible; padding: 0 16px; background: #ffffff; color: var(--tc-navy, #000546);
    --ag-fg: var(--tc-navy, #000546); --ag-muted: #4c4e66; --ag-accent-txt: var(--tc-orange-dark, #ad6418); --ag-line: #d3d4dd; --ag-card: #ffffff; --ag-card-actif: #ffffff; }
  .tc-ag__in { gap: 14px; max-width: none; }
  .tc-ag__tete { display: block; }
  .tc-ag .tc-ag__kicker { margin-bottom: 8px; font-size: 10pt; }
  .tc-ag .tc-ag__titre { margin-bottom: 6px; font-size: 22pt; }
  .tc-ag .tc-ag__lead { max-width: none; font-size: 11pt; }
  .tc-ag__chiffres, .tc-ag__carte, .tc-ag__cta-item { display: none !important; }
  .tc-ag__corps { display: block; }
  .tc-ag__cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tc-ag .tc-ag-card, .tc-ag-pin { opacity: 1 !important; animation: none !important; }
  .tc-ag .tc-ag-card { padding: 9px 12px 6px; border-color: #d3d4dd; break-inside: avoid; container-type: normal; }
  .tc-ag .tc-ag-card::before { content: none; }
  .tc-ag .tc-ag-card.is-actif { border-color: #d3d4dd; }
  .tc-ag .tc-ag-card__nom { margin-bottom: 2px; font-size: 12.5pt; }
  .tc-ag .tc-ag-card__nom a::after { content: none; }
  .tc-ag .tc-ag-card__adr { margin-bottom: 5px; font-size: 9.5pt; }
  .tc-ag .tc-ag-card__tels { gap: 0; padding-top: 4px; }
  .tc-ag .tc-ag-tel { min-height: 0; padding: 2px 0; font-size: 10.5pt; }
  .tc-ag-tel svg { width: 11px; height: 11px; }
  .tc-ag-tel__lbl { font-size: 8pt; }
  .tc-ag-tel__plus { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .tc-ag-pdf { display: flex; align-items: center; gap: 22px; padding: 18px 22px; border-radius: 4px; background: var(--tc-navy, #000546); color: #ffffff; box-shadow: inset 0 4px 0 var(--tc-orange, #ff9600); break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tc-ag-pdf__texte { flex: 1 1 auto; min-width: 0; }
  .tc-ag .tc-ag-pdf__titre { margin: 0 0 6px; font-size: 18pt; font-weight: 700; line-height: 1.15; color: #ffffff; }
  .tc-ag .tc-ag-pdf__desc { margin: 0 0 10px; font-size: 10.5pt; line-height: 1.45; color: #d9daea; }
  .tc-ag .tc-ag-pdf__lien { margin: 0; font-size: 13pt; font-weight: 700; }
  .tc-ag .tc-ag-pdf__lien a { color: var(--tc-orange, #ff9600); text-decoration: underline; text-underline-offset: 3px; }
  .tc-ag-pdf__qr { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; }
  .tc-ag-pdf__qr .tc-qr { display: block; width: 34mm; height: 34mm; padding: 2mm; background: #ffffff; border-radius: 3px; }
  .tc-ag-pdf__qr figcaption { max-width: 38mm; font-size: 8pt; line-height: 1.3; text-align: center; color: #d9daea; }
  .tc-ag .tc-ag-pdf__source { display: block; margin: 4px 0 0; font-size: 8.5pt; line-height: 1.4; color: #4c4e66; overflow-wrap: anywhere; }
  .tc-ag .tc-ag-pdf__source a { color: var(--tc-navy, #000546); }
}

/* Bandeau des agences collant : sa hauteur (--tc-agh-h) s'ajoute à celle de l'en-tête fixe du site (--tm-sticky-offset,
   timcod-guide.css) pour placer la barre des sections des guides juste dessous, et pour les ancres (--tc-offset). */
:root { --tc-agh-h: 60px; --tc-offset: calc(var(--tm-sticky-offset, 0px) + var(--tc-agh-h) + var(--tc-subnav-h, 52px) + 16px); }
@media (max-width: 720px) { :root { --tc-agh-h: 52px; } }
.tc-subnav, .tc-subnav-cadre { top: calc(var(--tm-sticky-offset, 0px) + var(--tc-agh-h)); }
/* Lien « Adresses complètes en bas de page » du bandeau : le bloc s'arrête sous l'en-tête et le bandeau */
.tc-ag { scroll-margin-top: calc(var(--tm-sticky-offset, 0px) + var(--tc-agh-h)); }

/* ==========================================================================
   Bandeau des agences en haut de toutes les pages (composant « agences-haut »)
   --------------------------------------------------------------------------
   Élément <details> : la barre (<summary>) ouvre et ferme le panneau, avec ou sans JavaScript.
   La barre reste collée en haut de l'écran, sous l'en-tête du site, pendant le défilement ; le panneau s'ouvre
   par-dessus la page (il ne la décale pas) et défile lui-même s'il est plus haut que l'écran.
   Avec timcod-agences.js (classe tc-agh--js) : le panneau se déplie en douceur (classe is-ouvert),
   les points de la carte apparaissent un à un, les liaisons se dessinent, les agences s'allument
   l'une après l'autre tant que le panneau est ouvert. Thème clair possible : classe tc-agh--clair.
   ========================================================================== */
.tc-agh {
  --ag-orange: var(--tc-orange, #ff9600);
  --ag-bg: var(--tc-navy, #000546);
  --ag-fg: #ffffff;
  --ag-muted: #b9bbd2;
  --ag-accent-txt: var(--tc-orange, #ff9600);
  --ag-line: rgba(255, 255, 255, .14);
  --ag-survol: rgba(255, 255, 255, .06);
  --ag-dot: rgba(255, 255, 255, .24);
  --ag-contour: rgba(255, 255, 255, .30);
  --ag-terre: rgba(255, 255, 255, .025);
  --ag-mini: rgba(255, 255, 255, .30);
  --ag-arc: rgba(0, 255, 255, .55);
  display: block;
  position: -webkit-sticky;
  position: sticky;
  top: var(--tm-sticky-offset, 0px);
  z-index: 3;
  margin: 0;
  padding: 0;
  background: var(--ag-bg);
  color: var(--ag-fg);
  border: 0;
  font: 300 16px/1.45 var(--tc-font, "TC Spartan", "Century Gothic", sans-serif);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.tc-agh--clair {
  --ag-bg: var(--tc-bg-soft, #f7f7fb);
  --ag-fg: var(--tc-navy, #000546);
  --ag-muted: #4c4e66;
  --ag-accent-txt: var(--tc-orange-dark, #ad6418);
  --ag-line: var(--tc-line, #d3d4dd);
  --ag-survol: #ffffff;
  --ag-dot: rgba(0, 5, 70, .22);
  --ag-contour: rgba(0, 5, 70, .28);
  --ag-terre: rgba(0, 5, 70, .03);
  --ag-mini: rgba(0, 5, 70, .22);
  --ag-arc: rgba(0, 30, 255, .45);
}
.tc-agh *, .tc-agh *::before, .tc-agh *::after { box-sizing: border-box; }
.tc-agh ul, .tc-agh li { margin: 0; padding: 0; list-style: none; }
.tc-agh li::before, .tc-agh li::marker { content: none; }
.tc-agh a { color: inherit; }
.tc-agh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barre (fermée) */
.tc-agh .tc-agh__barre { display: flex; align-items: center; gap: 16px; height: var(--tc-agh-h); margin: 0; padding: 0 max(40px, calc((100% - 1200px) / 2)); border-bottom: 1px solid var(--ag-line); list-style: none; cursor: pointer; color: var(--ag-fg); -webkit-user-select: none; user-select: none; }
.tc-agh .tc-agh__barre::-webkit-details-marker { display: none; }
.tc-agh .tc-agh__barre::marker { content: ""; }
.tc-agh .tc-agh__barre:focus-visible { outline: 2px solid var(--ag-orange); outline-offset: -4px; }
.tc-agh__mini { display: block; flex: none; width: 46px; height: 46px; overflow: visible; }
.tc-agh-mini-terre { fill: var(--ag-mini); }
.tc-agh-mini-pin { fill: var(--ag-orange); }
.tc-agh-mini-pulse { fill: none; stroke: var(--ag-orange); stroke-width: 12; opacity: 0; transform-box: fill-box; transform-origin: center; }
.tc-agh__texte { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; font-size: 17px; line-height: 1.25; }
.tc-agh__texte strong { font-weight: 700; }
.tc-agh__regions { margin-top: 3px; font-size: 14px; letter-spacing: .02em; color: var(--ag-muted); }
.tc-agh__action { display: inline-flex; flex: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 20px; border: 1.5px solid var(--ag-orange); border-radius: 4px; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .25s, color .25s; }
.tc-agh__barre:hover .tc-agh__action, .tc-agh.is-ouvert .tc-agh__action, .tc-agh:not(.tc-agh--js)[open] .tc-agh__action { background: var(--ag-orange); color: var(--tc-navy, #000546); }
.tc-agh__lib--fermer { display: none; }
.tc-agh.is-ouvert .tc-agh__lib--ouvrir, .tc-agh:not(.tc-agh--js)[open] .tc-agh__lib--ouvrir { display: none; }
.tc-agh.is-ouvert .tc-agh__lib--fermer, .tc-agh:not(.tc-agh--js)[open] .tc-agh__lib--fermer { display: inline; }
.tc-agh__chevron { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.tc-agh.is-ouvert .tc-agh__chevron, .tc-agh:not(.tc-agh--js)[open] .tc-agh__chevron { transform: rotate(180deg); }

/* Panneau (ouvert) */
.tc-agh__panneau { position: absolute; top: 100%; left: 0; right: 0; display: grid; grid-template-rows: 1fr; background: var(--ag-bg); box-shadow: 0 18px 32px rgba(0, 5, 70, .28); }
.tc-agh__panneau-in { min-height: 0; overflow: hidden; }
.tc-agh__contenu { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1280px; max-height: calc(100vh - var(--tm-sticky-offset, 0px) - var(--tc-agh-h) - 12px); max-height: calc(100dvh - var(--tm-sticky-offset, 0px) - var(--tc-agh-h) - 12px); margin: 0 auto; padding: 28px 40px 32px; overflow-y: auto; overscroll-behavior: contain; }
.tc-agh--js .tc-agh__panneau { grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.2, .8, .2, 1); }
.tc-agh--js.is-ouvert .tc-agh__panneau { grid-template-rows: 1fr; }
.tc-agh--js:not(.is-ouvert) .tc-agh__panneau { box-shadow: none; }
.tc-agh--js .tc-agh__contenu { opacity: 0; transform: translateY(-12px); transition: opacity .25s, transform .35s; }
.tc-agh--js.is-ouvert .tc-agh__contenu { opacity: 1; transform: none; transition: opacity .45s .12s, transform .6s .12s cubic-bezier(.2, .8, .2, 1); }

.tc-agh__carte { width: 100%; }
.tc-agh__svg { display: block; width: 100%; height: auto; overflow: visible; }
.tc-agh-terre { fill: var(--ag-terre); stroke: var(--ag-contour); stroke-width: 1.4; stroke-linejoin: round; }
.tc-agh-points { fill: none; stroke: var(--ag-dot); stroke-width: 3.8; stroke-linecap: round; stroke-dasharray: 0 8; }
.tc-agh-arcs { fill: none; stroke: var(--ag-arc); stroke-width: 1.8; stroke-dasharray: 4 8; }
.tc-agh-pin { transform-box: fill-box; transform-origin: center; }
.tc-agh-pin__zone { fill: transparent; pointer-events: all; }
.tc-agh-pin__halo { fill: var(--ag-orange); opacity: 0; transition: opacity .35s; }
.tc-agh-pin__pulse { fill: none; stroke: var(--ag-orange); stroke-width: 2.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.tc-agh-pin__coeur { fill: var(--ag-orange); stroke: var(--ag-bg); stroke-width: 3; transform-box: fill-box; transform-origin: center; transition: transform .3s; }
.tc-agh-pin__nom { display: none; font-family: inherit; font-size: 30px; font-weight: 700; fill: var(--ag-accent-txt); paint-order: stroke; stroke: var(--ag-bg); stroke-width: 8px; stroke-linejoin: round; }
.tc-agh-pin.is-actif .tc-agh-pin__halo { opacity: .22; }
.tc-agh-pin.is-actif .tc-agh-pin__coeur { transform: scale(1.5); }
.tc-agh-pin.is-actif .tc-agh-pin__nom { display: inline; }

.tc-agh .tc-agh__liste { border-top: 1px solid var(--ag-line); }
.tc-agh .tc-agh-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px 20px; min-height: 50px; padding: 4px 12px; border-bottom: 1px solid var(--ag-line); transition: background .25s; }
.tc-agh .tc-agh-row.is-actif { background: var(--ag-survol); }
.tc-agh-row__nom { display: flex; align-items: baseline; gap: 10px; min-width: 0; white-space: nowrap; }
.tc-agh .tc-agh-row__nom a { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; color: var(--ag-fg); text-decoration: none; }
.tc-agh .tc-agh-row__nom a::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ag-muted); transition: background .25s, box-shadow .25s; }
.tc-agh .tc-agh-row.is-actif .tc-agh-row__nom a::before { background: var(--ag-orange); box-shadow: 0 0 0 4px rgba(255, 150, 0, .28); }
.tc-agh .tc-agh-row__nom a:hover, .tc-agh .tc-agh-row__nom a:focus-visible { text-decoration: underline; text-decoration-color: var(--ag-orange); text-underline-offset: 3px; }
.tc-agh-row__ville { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; color: var(--ag-muted); }
.tc-agh .tc-agh-tel { display: flex; align-items: center; gap: 8px; min-height: 40px; white-space: nowrap; color: var(--ag-fg); text-decoration: none; }
.tc-agh-tel svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ag-orange); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tc-agh-tel__lbl { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ag-muted); }
.tc-agh-tel__num { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.tc-agh .tc-agh-tel:hover .tc-agh-tel__num, .tc-agh .tc-agh-tel:focus-visible .tc-agh-tel__num { color: var(--ag-accent-txt); }
.tc-agh .tc-agh-tel:focus-visible { outline: 2px solid var(--ag-orange); outline-offset: 2px; }
.tc-agh__liens { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 18px; font-size: 15px; }
.tc-agh .tc-agh__lien-bas { color: var(--ag-fg); text-decoration: underline; text-decoration-color: var(--ag-line); text-underline-offset: 3px; }
.tc-agh .tc-agh__lien-bas:hover { text-decoration-color: var(--ag-orange); }
.tc-agh .tc-agh__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 4px; background: var(--ag-orange); color: var(--tc-navy, #000546); font-weight: 600; text-decoration: none; transition: background .25s; }
.tc-agh .tc-agh__cta:hover, .tc-agh .tc-agh__cta:focus-visible { background: #ffaa33; color: var(--tc-navy, #000546); }
.tc-agh__cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Animations (avec JavaScript) */
.tc-agh--js .tc-agh-mini-pulse { opacity: 1; animation: tc-ag-pulse 3.2s ease-out infinite; }
.tc-agh--js .tc-agh-pin__pulse { opacity: 1; animation: tc-ag-pulse 3.2s ease-out infinite; animation-delay: calc(var(--i, 0) * -450ms); }
.tc-agh--js .tc-agh-arcs { opacity: 0; transition: opacity .4s; animation: tc-agh-flux 2s linear infinite; }
.tc-agh--js.is-ouvert .tc-agh-arcs { opacity: 1; transition: opacity .8s .55s; }
.tc-agh--js.is-ouvert .tc-agh-pin { animation: tc-ag-pop .6s cubic-bezier(.2, .9, .25, 1.25) both; animation-delay: calc(var(--i, 0) * 80ms + 200ms); }
.tc-agh--js.is-ouvert .tc-agh-row { animation: tc-ag-monte .5s ease both; animation-delay: calc(var(--i, 0) * 50ms + 180ms); }
@keyframes tc-agh-flux { to { stroke-dashoffset: -24; } }

@media (max-width: 900px) {
  .tc-agh__contenu { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tc-agh__carte { max-width: 260px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .tc-agh .tc-agh__barre { gap: 12px; padding: 0 16px; }
  .tc-agh__mini { width: 38px; height: 38px; }
  .tc-agh__texte { font-size: 16px; }
  .tc-agh__regions { display: none; }
  .tc-agh__action { justify-content: center; width: 44px; padding: 0; }
  .tc-agh__lib { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tc-agh__contenu { align-items: start; padding: 20px 16px 24px; }
  .tc-agh .tc-agh-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .tc-agh .tc-agh-row.is-actif { background: none; }
  .tc-agh-row__nom { grid-column: 1 / -1; }
  .tc-agh .tc-agh-tel { flex-wrap: wrap; align-content: center; gap: 2px 6px; min-height: 54px; padding: 7px 10px; border: 1px solid var(--ag-line); border-radius: 4px; }
  .tc-agh-tel__num { flex-basis: 100%; font-size: 15.5px; }
  .tc-agh__liens { flex-direction: column; align-items: stretch; }
  .tc-agh .tc-agh__cta { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-agh *, .tc-agh *::before, .tc-agh *::after { animation: none !important; transition: none !important; }
  .tc-agh-mini-pulse, .tc-agh-pin__pulse { opacity: 0 !important; }
}
@media print { .tc-agh { display: none !important; } }

/* Version PDF : encadré « Contactez TIMCOD » en tête de la première page (composant « agences-haut ») */
.tc-pdf-haut { display: none; }
@media print {
  .tc-pdf-haut { display: flex; align-items: center; gap: 18px; margin: 0 16px 14px; padding: 12px 16px; border-radius: 4px; background: var(--tc-navy, #000546); color: #ffffff; box-shadow: inset 0 3px 0 var(--tc-orange, #ff9600); font: 300 10pt/1.4 var(--tc-font, "TC Spartan", sans-serif); break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tc-pdf-haut__texte { flex: 1 1 auto; min-width: 0; }
  .tc-pdf-haut .tc-pdf-haut__titre { margin: 0 0 4px; font-size: 14pt; font-weight: 700; line-height: 1.2; color: #ffffff; }
  .tc-pdf-haut .tc-pdf-haut__desc { margin: 0 0 6px; color: #d9daea; }
  .tc-pdf-haut .tc-pdf-haut__lien { margin: 0; font-size: 11.5pt; font-weight: 700; }
  .tc-pdf-haut .tc-pdf-haut__lien a { color: var(--tc-orange, #ff9600); text-decoration: underline; text-underline-offset: 3px; }
  .tc-pdf-haut__qr { flex: none; display: block; }
  .tc-pdf-haut__qr .tc-qr { display: block; width: 27mm; height: 27mm; padding: 1.5mm; background: #ffffff; border-radius: 3px; }
}

/* PDF générés (_outils/pdf/generer-pdf.js, classe tc-pdf-genere sur <html>) : le QR code est en bas de chaque page,
   dans le pied de page du PDF, et aussi tout en haut de la première page (encadré « Contactez TIMCOD ») ;
   il n'est pas répété dans l'encadré de la dernière page. */
@media print {
  .tc-pdf-genere .tc-ag-pdf__qr { display: none !important; }
}
