/* ===========================================================================
   cpv-chrome.css — CHROME PARTAGÉ des vues publiques CustomPublicViews.
   Chargé AVANT le custom.css de chaque client (par les pages RDV + V-Ticket).
   Tout est piloté par variables → chaque client ne déclare dans son custom.css que :
     --cpv-brand, --cpv-brand-dark, --cpv-brand-nav-hover, --cpv-brand-rgb (« r, g, b »),
     --cpv-text, --cpv-font, son @font-face/@import éventuel, et son bloc .cpv-banner.
   Scopé .cpv-* (sans dépendance Bootstrap) — n'entre pas en collision avec le widget RDV
   (izia-*) ni le Bootstrap 5 des pages V-Ticket.
   =========================================================================== */

.cpv-body {
  margin: 0;
  font-family: var(--cpv-font, "Helvetica Neue", Helvetica, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.42857143;
  color: var(--cpv-text, #333);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.cpv-body a { color: var(--cpv-brand); text-decoration: none; }
.cpv-body a:hover, .cpv-body a:focus { color: var(--cpv-brand-dark); text-decoration: underline; }

/* ── Bandeau : défauts « logo centré » ; l'apparence (image/logo/dimensions) est par client. ── */
.cpv-banner__pad { padding-top: 80px; }
.cpv-banner__logo { display: block; margin: 0 auto; overflow: hidden; background-size: contain; }

/* ── Navbar (page RDV) ──────────────────────────────────────────────────────── */
.cpv-navbar { background: var(--cpv-brand); min-height: 50px; }
.cpv-navbar__inner { max-width: 1170px; margin: 0 auto; padding: 0 15px; display: flex; align-items: center; flex-wrap: wrap; }
.cpv-navbar__logo { max-height: 46px; width: auto; margin: 2px 14px 2px 0; display: block; }
.cpv-navbar__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.cpv-navbar__menu li { margin: 0; }
.cpv-navbar__menu a { display: block; padding: 15px; color: #fff; font-size: 19px; line-height: 20px; text-decoration: none; }
.cpv-navbar__menu a:hover, .cpv-navbar__menu a:focus { background: var(--cpv-brand-nav-hover); color: #fff; text-decoration: none; }
.cpv-navbar__menu a img { max-width: 24px; vertical-align: -5px; margin-right: 6px; }
.cpv-navbar__icon { margin-right: 6px; vertical-align: -2px; }
.cpv-navbar__check, .cpv-navbar__toggle { display: none; }
@media (max-width: 767px) {
  .cpv-navbar__toggle { display: flex; flex-direction: column; justify-content: center; gap: 4px; margin-left: auto; padding: 10px; cursor: pointer; border: 1px solid rgba(255, 255, 255, .4); border-radius: 4px; }
  .cpv-navbar__toggle span { display: block; width: 22px; height: 2px; background: #fff; }
  .cpv-navbar__menu { flex-basis: 100%; flex-direction: column; display: none; }
  .cpv-navbar__check:checked ~ .cpv-navbar__menu { display: flex; }
  .cpv-navbar__menu a { padding: 12px 8px; border-top: 1px solid var(--cpv-brand-nav-hover); }
}

/* ── Jumbotron + animation fade-in (réplique .jumbotron > div) ───────────────── */
.cpv-jumbotron { flex: 1 0 auto; padding: 30px 0; }
.cpv-jumbotron__inner { max-width: 1170px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; animation: cpvTabFadeIn 1s ease 1s forwards; opacity: 0; }
@keyframes cpvTabFadeIn { 0%,20% { opacity: 0; } 40% { opacity: .3; } 60% { opacity: .5; } 80% { opacity: .7; } 100% { opacity: 1; } }

/* ── Encarts d'intro + alertes ──────────────────────────────────────────────── */
.cpv-intro { margin-bottom: 20px; }
.cpv-alert { padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.cpv-alert--info { color: #31708f; background: #d9edf7; border: 1px solid #bce8f1; }
.cpv-alert--warning { color: #8a6d3b; background: #fcf8e3; border: 1px solid #faebcc; }
.cpv-alert__title { font-weight: 700; text-align: center; margin: 0 0 10px; }
.cpv-alert ul { margin: 10px 0 0; padding-left: 25px; line-height: 1.6; }
.cpv-alert u { display: inline-block; margin-top: 6px; }
.cpv-error { background: #fff; border: 1px solid #ebccd1; border-radius: 4px; padding: 28px; text-align: center; color: #a94442; }

/* ── Pied de page ───────────────────────────────────────────────────────────── */
.cpv-footer { flex-shrink: 0; text-align: center; padding: 18px; color: #6c7a82; font-size: .85rem; background: #fff; }
.cpv-foot { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.cpv-foot__brand { font-weight: 700; color: var(--cpv-brand); }
.cpv-foot__links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cpv-foot__links a { color: var(--cpv-brand); text-decoration: none; }
.cpv-foot__links a:hover { text-decoration: underline; }
.cpv-foot__legal { font-size: .78rem; color: #8a99a1; }

/* ── Loader « pulse » (réplique .spinner-box, fade-out 2 s) ─────────────────── */
.cpv-spinner-box { width: 300px; height: 100px; display: flex; justify-content: center; align-items: center; background-color: #ffffff6d; border-radius: 15px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 1; pointer-events: none; z-index: 2000; animation: cpvLoaderFadeOut 2s forwards; }
.cpv-pulse { width: 120px; display: flex; justify-content: space-between; align-items: center; }
.cpv-pulse span { width: 20px; height: 20px; border-radius: 50%; background: var(--cpv-brand); }
.cpv-pulse span:nth-child(1) { animation: cpvPulse .4s ease 0s infinite alternate; }
.cpv-pulse span:nth-child(2) { animation: cpvPulse .4s ease .2s infinite alternate; }
.cpv-pulse span:nth-child(3) { animation: cpvPulse .4s ease .4s infinite alternate; }
@keyframes cpvPulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.75); } }
@keyframes cpvLoaderFadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ── Theming du widget RDV (izmbInscriptionAvancee) ─────────────────────────── */
.cpv-body .izia-root {
  --izia-primary: var(--cpv-brand);
  --izia-primary-contrast: #fff;
  --izia-text: var(--cpv-text);
  --izia-muted: #8a8f93;
  --izia-font: var(--cpv-font);
  --izia-radius: 8px;
  --izia-danger: #d10303;
}

/* ── Theming des pages V-Ticket (Bootstrap 5) ───────────────────────────────── */
.cpv-body.izmb-vticket-body {
  --bs-primary: var(--cpv-brand);
  --bs-primary-rgb: var(--cpv-brand-rgb);
  --bs-link-color: var(--cpv-brand);
  --bs-link-color-rgb: var(--cpv-brand-rgb);
  --bs-link-hover-color: var(--cpv-brand-dark);
  --bs-body-font-family: var(--cpv-font);
  --bs-border-radius: 8px;
}
.cpv-body .btn-primary {
  --bs-btn-bg: var(--cpv-brand); --bs-btn-border-color: var(--cpv-brand);
  --bs-btn-hover-bg: var(--cpv-brand-dark); --bs-btn-hover-border-color: var(--cpv-brand-dark);
  --bs-btn-active-bg: var(--cpv-brand-dark); --bs-btn-active-border-color: var(--cpv-brand-dark);
  --bs-btn-disabled-bg: var(--cpv-brand); --bs-btn-disabled-border-color: var(--cpv-brand);
}
.cpv-body .btn-outline-primary {
  --bs-btn-color: var(--cpv-brand); --bs-btn-border-color: var(--cpv-brand);
  --bs-btn-hover-bg: var(--cpv-brand); --bs-btn-hover-border-color: var(--cpv-brand);
  --bs-btn-active-bg: var(--cpv-brand); --bs-btn-active-border-color: var(--cpv-brand);
}
.cpv-body .text-primary { color: var(--cpv-brand) !important; }
.cpv-body .card { border-top: 4px solid var(--cpv-brand); }
.cpv-body .form-control:focus, .cpv-body .form-select:focus {
  border-color: var(--cpv-brand);
  box-shadow: 0 0 0 .25rem rgba(var(--cpv-brand-rgb), .25);
}

/* ── Aide contextuelle V-Ticket (popover « instructions » — port CustomCTP.js) ── */
.cpv-vt-help { color: var(--cpv-brand); cursor: pointer; margin-left: 4px; }
.cpv-vt-pop { margin-top: 6px; padding: 8px 10px; font-size: .85rem; background: #fff; border: 1px solid var(--cpv-brand); border-radius: 8px; }
.cpv-vt-pop ul { margin: 6px 0 0; padding-left: 18px; }
