/* =========================================================
   Provence · feuille de style (mobile-first)
   ========================================================= */

:root {
  /* Palette douce Provence, accent été/chaleur */
  --cream:      #fdf5ea;
  --surface:    #ffffff;
  --ink:        #2f2a25;
  --muted:      #6f665b;
  --line:       #efe4d3;

  --brand:      #f15a29;   /* corail/orange vif, accent principal */
  --brand-d:    #c4431b;   /* corail foncé (texte, liens, survols) */
  --olive:      #7a8450;
  --lavender:   #8a7cb6;
  --lavender-d: #5f4f96;
  --bleu:       #2f97b3;
  --gold:       #d99a2b;
  --sun:        #ffc24d;   /* soleil */
  --sun-deep:   #f5a623;

  --radius:     18px;
  --radius-sm:  12px;
  --shadow:     0 1px 2px rgba(47,42,37,.04), 0 8px 24px rgba(47,42,37,.07);
  --shadow-lg:  0 12px 40px rgba(47,42,37,.13);

  --wrap:       1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 12px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
}

a { color: var(--brand-d); }
img { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 18px; }
.muted { color: var(--muted); }
.br-desk { display: none; }

/* ====================== BOUTONS ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-d); }

.btn-ghost { background: rgba(255,255,255,.7); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }

.btn-airbnb {
  width: 100%;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  margin-top: auto;
}
.btn-airbnb:hover { background: #443d35; }

/* ====================== HERO ====================== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #ffe3b5 0%, #ffeccf 38%, #fdf1e2 70%, var(--cream) 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 44px;
  text-align: center;
}
/* Soleil d'été en haut à droite */
.hero::before {
  content: "";
  position: absolute;
  top: -110px; right: -70px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,201,77,.95) 0%, rgba(255,176,60,.55) 40%, rgba(255,176,60,0) 70%);
  pointer-events: none;
  animation: sunPulse 8s ease-in-out infinite;
}
/* Voile de chaleur en bas à gauche */
.hero::after {
  content: "";
  position: absolute;
  bottom: -120px; left: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138,124,182,.22) 0%, rgba(138,124,182,0) 70%);
  pointer-events: none;
}
.hero > .wrap { position: relative; z-index: 1; }

@keyframes sunPulse {
  0%, 100% { transform: scale(1);    opacity: .85; }
  50%      { transform: scale(1.07); opacity: 1; }
}
.kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--brand-d);
  margin: 0 0 10px;
}
.hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); letter-spacing: -.01em; }
.lede { font-size: 1.05rem; color: var(--muted); margin: 14px auto 22px; max-width: 540px; }
.lede strong { color: var(--ink); }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ====================== BARRE OUTILS ====================== */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253,245,234,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-block: 12px;
}
.toolbar-label { font-size: .85rem; font-weight: 600; color: var(--muted); }

.filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filtre {
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.filtre:hover { border-color: var(--brand); }
.filtre.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tri-bloc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#tri {
  font: inherit;
  font-size: .9rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.compteur { font-size: .85rem; color: var(--muted); }

/* ====================== GRILLE ====================== */
.grille {
  display: grid;
  grid-template-columns: 1fr;       /* mobile : une colonne */
  gap: 22px;
  padding-block: 28px;
}
.vide { text-align: center; color: var(--muted); padding: 40px 0; }

/* ====================== CARTE ====================== */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.media { position: relative; }
.ribbon {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 5;
  background: rgba(47,42,37,.86);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---- Carrousel ---- */
.carousel { position: relative; }
.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
  background: #f0ebe2;
}
.slide-img { width: 100%; height: 100%; object-fit: cover; }

.placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #b6ab9b;
  background: repeating-linear-gradient(45deg, #f1ece3, #f1ece3 12px, #ece5da 12px, #ece5da 24px);
  font-size: .82rem;
  font-weight: 500;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.88);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
}
.card:hover .nav, .nav:focus-visible { opacity: 1; }
.nav:hover { background: #fff; }
.nav-prev { left: 8px; }
.nav-next { right: 8px; }

.dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  cursor: pointer;
  transition: all .15s ease;
}
.dot.is-active { background: #fff; width: 18px; border-radius: 999px; }

/* ---- Corps de carte ---- */
.body { display: flex; flex-direction: column; gap: 14px; padding: 18px; flex: 1; }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-head h3 { font-size: 1.25rem; }
.commune { margin: 4px 0 0; font-size: .88rem; color: var(--muted); }

.note { white-space: nowrap; font-size: .85rem; font-weight: 600; }
.star { color: var(--gold); }

.prix-bloc { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.prix {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--brand-d);
}
.prix-unit { font-family: "Inter", sans-serif; font-size: .8rem; font-weight: 500; color: var(--muted); }
.prix-note { font-size: .78rem; color: var(--muted); font-style: italic; }

/* ---- Tags priorité ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid;
}
.tag em { font-style: normal; font-weight: 500; opacity: .85; }
.tag-plage      { color: var(--bleu);   border-color: color-mix(in srgb, var(--bleu) 35%, white); background: color-mix(in srgb, var(--bleu) 8%, white); }
.tag-patrimoine { color: var(--lavender-d); border-color: color-mix(in srgb, var(--lavender) 42%, white); background: color-mix(in srgb, var(--lavender) 10%, white); }
.tag-nature     { color: var(--olive);  border-color: color-mix(in srgb, var(--olive) 38%, white); background: color-mix(in srgb, var(--olive) 9%, white); }

/* ---- Specs ---- */
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.specs > div { min-width: 0; }
.specs-full { grid-column: 1 / -1; }
.specs dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.specs dd { margin: 2px 0 0; font-size: .9rem; }

/* ---- Activités (repliable) ---- */
.activites { border-top: 1px solid var(--line); padding-top: 12px; }
.activites summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--brand-d);
  list-style: none;
}
.activites summary::-webkit-details-marker { display: none; }
.activites summary::after { content: " ▾"; }
.activites[open] summary::after { content: " ▴"; }
.activites ul { margin: 12px 0 0; padding-left: 18px; font-size: .87rem; color: var(--muted); }
.activites li { margin-bottom: 10px; line-height: 1.5; }
.activites li::marker { color: var(--sun-deep); }
.act-t { color: var(--ink); font-weight: 600; }

.forts { font-size: .88rem; margin: 0; background: #faf4ea; border-radius: var(--radius-sm); padding: 12px 14px; }
.forts strong { color: var(--ink); }

/* ====================== COMPARATIF ====================== */
.comparatif { padding: 46px 0; border-top: 1px solid var(--line); }
.comparatif h2, .reco h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.section-sub { color: var(--muted); margin: 8px 0 22px; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 860px; font-size: .87rem; }
thead th {
  position: sticky; top: 0;
  background: #f6efe4;
  text-align: left;
  padding: 12px 14px;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody td, tbody th { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
tbody th {
  font-weight: 600;
  position: sticky; left: 0;
  background: #fff;
  min-width: 170px;
  box-shadow: 1px 0 0 var(--line);
}
tbody tr:nth-child(even) th,
tbody tr:nth-child(even) td { background: #fcf9f4; }
.td-sub { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); margin-top: 2px; }

/* ====================== RECO ====================== */
.reco { padding: 46px 0 56px; background: linear-gradient(180deg, #fbf6ee, #f6efe3); border-top: 1px solid var(--line); }
.reco-grille { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 6px; }
.reco-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.reco-plage      { border-top-color: var(--bleu); }
.reco-patrimoine { border-top-color: var(--lavender); }
.reco-nature     { border-top-color: var(--olive); }
.reco-icone { font-size: 1.8rem; }
.reco-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 2px; font-family: "Inter", sans-serif; font-weight: 600; }
.reco-titre { font-family: "Fraunces", serif; font-size: 1.5rem; font-weight: 600; margin: 0 0 8px; color: var(--ink); }
.reco-card p:last-child { margin-bottom: 0; font-size: .92rem; color: var(--muted); }
.reco-card p strong { color: var(--ink); }

.reco-global {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--ink);
  color: #f6efe3;
  border-radius: var(--radius);
  font-size: 1rem;
}
.reco-global strong { color: #fff; }

.reco-verifs {
  margin-top: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.reco-verifs h3 { font-size: 1.05rem; margin-bottom: 10px; }
.reco-verifs ul { margin: 0; padding-left: 20px; color: var(--muted); }
.reco-verifs li { margin: 7px 0; line-height: 1.5; }
.reco-verifs strong { color: var(--ink); }

/* ====================== IDENTITÉ (overlay) ====================== */
.no-scroll { overflow: hidden; }
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(47, 42, 37, .55);
  backdrop-filter: blur(4px);
}
.overlay[hidden] { display: none; }
.overlay-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.overlay-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.overlay-card p { color: var(--muted); margin: 0 0 18px; }
.prenoms { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.prenom-btn {
  font: inherit;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.prenom-btn:hover { background: #fff; border-color: var(--brand); color: var(--brand-d); transform: translateY(-1px); }

/* ====================== BARRE IDENTITÉ ====================== */
.moi-bar {
  background: var(--brand);
  color: #fff;
}
.moi-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 9px;
  flex-wrap: wrap;
}
.moi-qui { font-size: .95rem; }
.moi-picks { font-size: .9rem; opacity: .92; margin-left: auto; }
.moi-changer {
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.14);
  color: #fff;
  cursor: pointer;
}
.moi-changer:hover { background: rgba(255,255,255,.26); }

/* ====================== BOUTONS DE VOTE (cartes) ====================== */
.vote { display: flex; gap: 8px; margin: 4px 0 2px; }
.vote-btn {
  flex: 1;
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--muted);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.vote-btn .vote-medaille { filter: grayscale(1); opacity: .55; transition: filter .12s ease, opacity .12s ease; }
.vote-btn:hover { border-color: var(--brand); color: var(--brand-d); transform: translateY(-1px); }
.vote-btn.is-actif { color: #fff; border-color: transparent; }
.vote-btn.is-actif .vote-medaille { filter: none; opacity: 1; }
.vote-1.is-actif { background: linear-gradient(135deg, var(--sun-deep), var(--brand)); }
.vote-2.is-actif { background: var(--muted); }
.vote-3.is-actif { background: #b07a46; }

/* ====================== RÉSULTATS ====================== */
.resultats { padding: 46px 0 8px; }
.classement { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.res-ligne {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.res-tete { border-color: color-mix(in srgb, var(--brand) 45%, white); background: color-mix(in srgb, var(--brand) 6%, white); }
.res-rang { font-size: 1.4rem; min-width: 30px; text-align: center; font-weight: 700; color: var(--muted); }
.res-corps { flex: 1; min-width: 0; }
.res-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.res-nom { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.1rem; }
.res-pts { font-weight: 700; color: var(--brand-d); white-space: nowrap; }
.res-jauge { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 7px 0 5px; }
.res-jauge span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun-deep), var(--brand));
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.res-detail { font-size: .82rem; color: var(--muted); }
.votants-bloc { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.votants, .en-attente { margin: 0; font-size: .92rem; color: var(--muted); }
.puce {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: .85rem;
  margin: 2px 2px;
}
.puce-ok { background: color-mix(in srgb, var(--brand) 14%, white); border-color: color-mix(in srgb, var(--brand) 40%, white); color: var(--brand-d); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .res-jauge span { transition: none; }
  .overlay-card { animation: none; }
}

/* ====================== FOOTER ====================== */
.footer { padding: 30px 0 40px; text-align: center; border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; font-size: .88rem; }

/* ====================== ACCESSIBILITÉ ====================== */
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .track { scroll-behavior: auto; }
}

/* ====================== BREAKPOINTS ====================== */

/* Tablette : 2 colonnes */
@media (min-width: 640px) {
  .br-desk { display: inline; }
  .toolbar-inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .grille { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 52px; }
}

/* Desktop : 3 colonnes */
@media (min-width: 1000px) {
  .grille { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .reco-grille { grid-template-columns: repeat(3, 1fr); }
}
