/*
Theme Name: Autosur Martinique
Description: Accueil Autosur Martinique avec carte interactive et réservation par centre.
Version: 1.5.5
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: autosur-martinique
*/

:root {
  --red: #d42422;
  --red-dark: #af1e1c;
  --navy: #0f1c2c;
  --text: #08347b;
  --muted: #4c5a69;
  --line: #e0e5eb;
  --paper: #f3f5f8;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid #2271bd; outline-offset: 4px; }
a:focus-visible { border-radius: .2rem; }
.wrap { width: min(100% - 4rem, 76rem); margin-inline: auto; }
.top { background: white; border-top: 4px solid var(--red); }
.top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.55rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { display: block; width: clamp(8rem, 15vw, 12rem); height: auto; }
.brand span { border-left: 1px solid var(--line); padding-left: .7rem; font-weight: 650; }
.nav-link { font-size: .875rem; font-weight: 700; text-underline-offset: .27em; }
.hero { padding-block: clamp(2rem, 5vw, 3.8rem) clamp(1.4rem, 3.5vw, 2.4rem); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.2rem, 5.1vw, 4.5rem); line-height: 1.04; letter-spacing: -.06em; text-wrap: balance; }
h1::before { content: ""; display: block; width: 2.65rem; height: .25rem; margin-bottom: 1rem; background: var(--red); }
.hero p { margin-top: .8rem; color: var(--muted); font-size: clamp(.98rem, 1.5vw, 1.12rem); }
.finder {
  display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); align-items: start;
  gap: 1.25rem; padding-bottom: 2rem;
}
.map {
  position: relative; isolation: isolate; aspect-ratio: 640 / 540;
  border-radius: 1rem;
  background: #4e96bd url("assets/martinique.webp") center / 100% 100% no-repeat;
  color: #092742;
}
.map-title { position: absolute; top: 5%; left: 5%; color: inherit; font-weight: 750; font-size: clamp(.76rem, 1.3vw, .95rem); }
.north { position: absolute; top: 5%; right: 5%; color: inherit; text-align: center; font-size: .75rem; font-weight: 700; }
.north::after { content: ""; display: block; margin: .22rem auto 0; width: .5rem; height: .52rem; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 50% 70%, 0 100%); }
.map-water { position: absolute; font-size: clamp(.68rem, 1vw, .87rem); font-weight: 650; }
.map-water--caribbean { top: 41%; left: 5%; }
.map-water--atlantic { top: 41%; right: 4%; }
.map-credit { position: absolute; right: 4%; bottom: 3%; color: inherit; font-size: .67rem; text-underline-offset: .2em; }
@media (max-width: 36rem) {
  .map-water { display: none; }
}
.map--stylisee {
  background: var(--navy) radial-gradient(ellipse at 53% 45%, #29415a, transparent 75%);
  color: white;
}
.map--stylisee::before, .map--stylisee::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.map--stylisee::before {
  z-index: -2;
  opacity: .28;
  background-image: linear-gradient(#7491ad4d 1px, transparent 1px), linear-gradient(90deg, #7491ad4d 1px, transparent 1px);
  background-size: 9% 11%;
}
.map--stylisee::after {
  z-index: -1;
  background: url("assets/martinique-stylisee.webp") center / 100% 100% no-repeat;
}
.map--stylisee .map-title { color: #e4edf6; }
.map--stylisee .north { color: #cedae6; }
.map--stylisee .map-credit { color: #d7e1eb; }
.pin {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 25px; height: 25px;
  color: white; text-decoration: none; pointer-events: none;
}
.pin-dot, .pin-label { pointer-events: auto; }
.pin-dot {
  width: 14px; height: 14px; border: 2px solid white; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 3px #0f1c2caa;
}
.pin-label {
  position: absolute; top: var(--label-y); display: flex; align-items: center; min-height: 24px; padding: .15rem .42rem; white-space: nowrap;
  border: 1px solid #7892ab80; border-radius: .3rem; background: #0f1c2cf0;
  font-size: clamp(.65rem, 1.05vw, .85rem); font-weight: 700;
}
.pin:hover, .pin:focus-visible, .pin[aria-current="true"] { z-index: 1; }
.pin:hover .pin-label, .pin[aria-current="true"] .pin-label { background: var(--red); border-color: var(--red); }
.pin:focus-visible { outline: 2px solid white; outline-offset: 1px; }
.pin--fort-de-france { --label-y: -1.06rem; }
.pin--fort-de-france .pin-label { right: 100%; }
.pin--schoelcher { --label-y: 78%; }
.pin--schoelcher .pin-label { right: 102%; }
.pin--le-lamentin { --label-y: -1.05rem; }
.pin--le-lamentin .pin-label { left: 100%; }
.pin--ducos { --label-y: 95%; }
.pin--ducos .pin-label { right: 66%; }
.pin--saint-esprit { --label-y: 64%; }
.pin--saint-esprit .pin-label { left: 90%; }
.pin--sainte-marie { --label-y: -.32rem; }
.pin--sainte-marie .pin-label { left: 108%; }

.panel { background: white; border-radius: 1rem; border: 1px solid var(--line); padding: clamp(1rem, 2.55vw, 1.9rem); }
h2 { font-size: clamp(1.4rem, 2.55vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
.panel header p { margin: .5rem 0 1rem; color: var(--muted); font-size: .9rem; }
details { border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
summary {
  display: flex; list-style: none; align-items: center; justify-content: space-between;
  gap: .7rem; min-height: 3.55rem; padding: .45rem .2rem; cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary:hover strong, details[open] summary strong { color: var(--red-dark); }
summary strong, summary small { display: block; }
summary small { color: var(--muted); }
.chevron {
  width: .48rem; height: .48rem; flex: 0 0 .48rem; margin-right: .28rem;
  transform: rotate(45deg); border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
}
details[open] .chevron { transform: rotate(225deg); }
.locations { display: grid; gap: .65rem; padding: 0 0 .8rem; }
.location { background: var(--paper); border-radius: .5rem; padding: .7rem .8rem; font-size: .9rem; }
.location h3 { font-size: .95rem; }
.location p { color: var(--muted); }
.phone { display: inline-block; margin-top: .15rem; font-weight: 650; text-underline-offset: .2em; }
.book {
  display: flex; justify-content: space-between; align-items: center; gap: .55rem;
  width: fit-content; max-width: 100%; min-height: 44px; margin-top: .55rem; padding: .48rem .75rem;
  border-radius: .35rem; background: var(--red); color: white; font-weight: 750; text-decoration: none;
}
.book:hover { background: var(--red-dark); }

@media (max-width: 47rem) {
  .wrap { width: min(100% - 2rem, 38rem); }
  .top-inner { min-height: 3.75rem; }
  .finder { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
}
@media (max-width: 24rem) {
  .nav-link { font-size: .75rem; }
  .brand { gap: .35rem; }
  .brand span { font-size: .82rem; padding-left: .35rem; }
  .map-credit { font-size: .6rem; }
}

.about {
  margin-bottom: 2rem;
  padding: clamp(1.1rem, 4vw, 2.5rem);
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.about h2 {
  max-width: 36ch;
  margin-bottom: 1rem;
}
.about h2::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: .22rem;
  margin-bottom: .75rem;
  background: var(--red);
}
.about p, .about ul { max-width: 78ch; color: var(--muted); }
.about strong { color: var(--text); }
.about p + p { margin-top: .85rem; }
.about ul {
  margin: .65rem 0 1rem;
  padding-left: 1.25rem;
}
.about li { margin-bottom: .25rem; }
.about li::marker { color: var(--red); }
.about .book { margin-top: 1rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 1.25rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #334153;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: clamp(1rem, 2.8vw, 1.8rem) .5rem;
  background: var(--navy);
  color: white;
  text-align: center;
}
.stat dt {
  order: 1;
  font-size: clamp(.7rem, 1.3vw, .9rem);
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.stat dd {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
}
.stat dd::after {
  content: "";
  display: block;
  width: 1.6rem;
  height: .2rem;
  margin: .55rem auto 0;
  background: var(--red);
}
@media (max-width: 40rem) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.site-content { padding-block: 2rem; }
.site-content article, .site-content nav { margin-bottom: 1.5rem; }
.site-content article p, .presentation-content p { margin: .8rem 0; }
.site-content img, .presentation-content img { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 100000; padding: .6rem 1rem; background: white; }
.skip-link:focus { top: 3.2rem; }

.site-nav, .tariff-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem 1rem;
}
.site-nav { justify-content: flex-end; }
.site-nav [aria-current="page"] { color: var(--red-dark); }
.tariff-page { max-width: 60rem; padding-bottom: 2.5rem; }
.tariff-page .hero .book { margin-top: 1.05rem; }
.tariff-nav { gap: .5rem; margin: 0 0 1.25rem; }
.tariff-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: white;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.tariff-nav a:hover { border-color: var(--red); color: var(--red-dark); }
.tariff-section {
  overflow: hidden;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: white;
  scroll-margin-top: 3rem;
}
.tariff-section h2 {
  padding: clamp(.8rem, 3vw, 1.25rem);
  border-left: 4px solid var(--red);
  background: var(--navy);
  color: white;
}
.tariff-section table { width: 100%; border-collapse: collapse; font-size: clamp(.88rem, 1.6vw, 1rem); }
.tariff-section th, .tariff-section td {
  padding: .7rem clamp(.45rem, 2.3vw, 1.15rem);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.tariff-section thead { background: var(--paper); }
.tariff-section tbody tr:last-child > * { border-bottom: 0; }
.tariff-section th[scope="row"] { font-weight: 650; }
.tariff-section tr > :nth-child(n+2) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tariff-section tbody td:last-child { color: var(--red-dark); font-weight: 800; }
.tariff-source { color: var(--muted); font-size: .9rem; }

.control-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
.control-info-card {
  padding: clamp(.9rem, 2.6vw, 1.35rem);
  border-radius: .6rem;
  background: var(--paper);
}
.control-info-card h3 {
  margin-bottom: .45rem;
  color: var(--red-dark);
  font-size: clamp(1.05rem, 2.1vw, 1.25rem);
}
@media (max-width: 47rem) {
  .control-info-grid { grid-template-columns: 1fr; }
}

.news-page { padding-bottom: 2.5rem; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.news-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .65rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: .75rem;
  background: white;
}
.news-meta { color: var(--muted); font-size: .85rem; }
.news-card h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.2; }
.news-summary { margin-bottom: .4rem; color: var(--muted); }
.news-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  margin-top: auto;
  color: var(--red-dark);
  font-weight: 750;
  text-underline-offset: .2em;
}
.news-reservation { margin-top: 1.35rem; }
@media (max-width: 47rem) {
  .news-grid { grid-template-columns: 1fr; }
}
@media (max-width: 24rem) {
  .site-nav { gap: .25rem .6rem; }
}

.center-page { max-width: 60rem; padding-bottom: 2.5rem; }
.center-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: .55rem;
  color: var(--red-dark);
  font-weight: 700;
  text-underline-offset: .2em;
}
.center-page address { margin-top: .75rem; color: var(--muted); font-style: normal; }
.center-booking { border: 1px solid var(--line); border-radius: .75rem; background: white; overflow: hidden; }
.center-booking-header {
  padding: clamp(1rem, 3vw, 1.6rem);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line);
}
.center-booking-header > p { margin-top: .5rem; color: var(--muted); }
.center-fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .55rem;
  margin-top: .8rem;
  font-size: .9rem;
}
.center-fallback a { color: var(--red-dark); font-weight: 700; text-underline-offset: .2em; }
.center-booking iframe { display: block; width: 100%; border: 0; background: white; }

@media (max-width: 36rem) {
  .top-inner { flex-wrap: wrap; gap: .4rem 1rem; padding-block: .55rem; }
  .top-inner .site-nav { justify-content: flex-start; }
}

.home-promo {
  display: block;
  margin-top: clamp(.75rem, 2vw, 1.5rem);
  border-radius: .9rem;
}
.home-promo img { display: block; width: 100%; height: auto; border-radius: inherit; }
.home-promo + .hero { padding-top: clamp(1.6rem, 3vw, 2.6rem); }
