/* ==========================================================================
   UltraPC – pages magasins par ville (CMS 13 à 17, templates/cms/page.tpl)
   Style repris de la page « Nos magasins » (upc-stores.css). Tout est préfixé
   .upc-ville. Chargé uniquement sur ces pages (hors paquet CCC) : changer le
   paramètre ?v= dans cms/page.tpl après modification.
   ========================================================================== */

.upc-ville {
  --v-navy: #002B49;
  --v-navy-2: #00335a;
  --v-navy-50: #eef4f9;
  --v-navy-100: #d6e4ef;
  --v-orange: #f39200;
  --v-orange-dark: #d98200;
  --v-orange-50: #fff7eb;
  --v-bg: #f1f5f9;
  --v-border: #e2e8f0;
  --v-text: #334155;
  --v-muted: #64748b;
  --v-red: #dc2626;
  --v-radius: 16px;
  margin: 0 0 24px;
  padding: 0 0 24px;
  border: 0;
  border-radius: var(--v-radius);
  background: var(--v-bg);
  color: var(--v-text);
  font-size: 15px;
  line-height: 1.6;
}
.upc-ville *, .upc-ville *::before, .upc-ville *::after { box-sizing: border-box; }
.upc-ville p { margin: 0; }
.upc-ville a { color: var(--v-navy); }

/* ---------- Bandeau ---------- */
.upc-ville-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 32px 22px 38px;
  border-radius: var(--v-radius) var(--v-radius) 0 0;
  background: linear-gradient(180deg, var(--v-navy), var(--v-navy-2));
  color: #fff;
}
.upc-ville-hero::before { /* trame discrète */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .06;
  pointer-events: none;
}
.upc-ville-hero::after { /* liseré aux couleurs du logo */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #e63b2e 0 25%, #f5b800 25% 50%, #3fae49 50% 75%, #1e88e5 75% 100%);
}
.upc-ville-hero > * { position: relative; }
@media (min-width: 768px) { .upc-ville-hero { padding: 40px 32px 46px; } }
@media (min-width: 992px) {
  .upc-ville-hero { grid-template-columns: minmax(0, 1fr) 380px; padding: 48px 40px 52px; gap: 40px; }
  .upc-ville-hero--0 { grid-template-columns: 1fr; }
}

.upc-ville-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: var(--v-orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.upc-ville-eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: var(--v-orange); }

.upc-ville .upc-ville-titre {
  margin: 14px 0 0;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: none;
}
@media (min-width: 768px) { .upc-ville .upc-ville-titre { font-size: 34px; } }

.upc-ville-intro { max-width: 680px; margin-top: 14px; }
.upc-ville-intro p { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.7; }
.upc-ville-intro p + p { margin-top: 10px; }
.upc-ville-intro a { color: #fff; text-decoration: underline; }

.upc-ville-photos { display: grid; gap: 12px; }
.upc-ville-hero--2 .upc-ville-photos { grid-template-columns: 1fr 1fr; }
.upc-ville-photos img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.6);
}
@media (max-width: 991px) {
  .upc-ville-photos { max-width: 520px; }
  .upc-ville-hero--2 .upc-ville-photos img { aspect-ratio: 1 / 1; }
}

/* ---------- Cartes ---------- */
.upc-ville-grille {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: -14px 14px 0;
  position: relative;
}
@media (min-width: 768px) {
  .upc-ville-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -18px 24px 0; gap: 20px; }
}
@media (min-width: 1200px) {
  .upc-ville-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .upc-ville-grille:has(> .upc-ville-carte--magasin) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.upc-ville-carte {
  padding: 22px 22px 20px;
  border: 1px solid var(--v-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px -16px rgba(0,43,73,.35);
}
.upc-ville-carte--rayons { grid-column: 1 / -1; }

/* Intertitre avec pastille d'icône */
.upc-ville .upc-ville-carte h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--v-navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}
.upc-ville-carte h2::before {
  content: "";
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--v-orange-50) no-repeat center / 20px 20px;
}
/* icônes (traits orange) */
.upc-ville-carte--adresse h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
.upc-ville-carte--horaires h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.upc-ville-carte--services h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9'/%3E%3Cpath d='M4 9v11h16V9'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E"); }
.upc-ville-carte--magasin h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9'/%3E%3Cpath d='M4 9v11h16V9'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 20v-6h6v6'/%3E%3C/svg%3E"); }
.upc-ville-carte--rayons h2::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f39200' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }

/* Adresse + téléphone */
.upc-ville-carte--adresse p,
.upc-ville-carte--magasin > p:first-of-type { color: var(--v-text); font-size: 15px; line-height: 1.7; }
.upc-ville-carte a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 16px 9px 14px;
  border-radius: 10px;
  background: var(--v-orange);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, transform .15s;
}
.upc-ville-carte a[href^="tel:"]::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E") no-repeat center / contain;
}
.upc-ville-carte a[href^="tel:"]:hover { background: var(--v-orange-dark); transform: translateY(-1px); }
.upc-ville-carte a[href^="tel:"]:focus-visible { outline: 3px solid rgba(243,146,0,.45); outline-offset: 2px; }

/* Listes : horaires (jour / heures) et services (coches) */
.upc-ville-carte ul { margin: 0; padding: 0; list-style: none; }
.upc-ville-carte--magasin ul { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.upc-ville-carte--horaires li,
.upc-ville-carte--magasin li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
}
.upc-ville-jour { font-weight: 600; color: var(--v-navy); }
.upc-ville-sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.upc-ville-heure { font-weight: 700; color: var(--v-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.upc-ville-heure:first-letter { text-transform: uppercase; }

.upc-ville-carte--services li {
  position: relative;
  padding: 7px 0 7px 32px;
  color: var(--v-text);
  font-size: 15px;
}
.upc-ville-carte--services li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ecfdf5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") no-repeat center / 13px 13px;
}

/* Rayons : liens en pastilles (les séparateurs « · » du texte sont masqués visuellement) */
.upc-ville-carte--rayons p:has(> a) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0;
  line-height: 0;
}
.upc-ville-carte--rayons p:has(> a) a {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--v-border);
  border-radius: 999px;
  background: #fff;
  color: var(--v-navy) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.upc-ville-carte--rayons p:has(> a) a:hover { border-color: var(--v-navy); background: var(--v-navy); color: #fff !important; }
.upc-ville-carte--rayons p:has(> a) a[href="/magasins"] { border-color: var(--v-orange); background: var(--v-orange); color: #fff !important; }
.upc-ville-carte--rayons p:has(> a) a[href="/magasins"]:hover { background: var(--v-orange-dark); border-color: var(--v-orange-dark); }
.upc-ville-carte--rayons p:not(:has(> a)) {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--v-navy-50);
  color: var(--v-navy);
  font-size: 14px;
  font-weight: 600;
}
.upc-ville-carte--rayons p:not(:has(> a))::before {
  content: "";
  flex: 0 0 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002B49' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h11v9H3z'/%3E%3Cpath d='M14 10h4l3 3v3h-7z'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E") no-repeat center / contain;
}

@media (max-width: 575px) {
  .upc-ville-carte { padding: 18px 16px 16px; }
  .upc-ville-carte a[href^="tel:"] { display: flex; justify-content: center; }
}
