/* ============================================================
   cities.css — Modele "cities" (pages-villes : La Valette, Mdina…)
   Reutilise les variables de style.css si presentes (valeurs de repli).
   Conventions partagees avec rank.css (TOC, prose) et beach.css
   (cartes hotels, FAQ) — autonome : aucune dependance a ces fichiers.
   ============================================================ */

.city {
    --ct-max: var(--max-width, 1120px);
    --ct-text: 760px;
    --ct-accent: var(--button-color, #2563eb);
    --ct-accent-hover: var(--button-color-hover, #1e4fd0);
    --ct-ink: #0f172a;
    --ct-muted: #64748b;
    --ct-line: #e6e8ee;
    --ct-bg-soft: #f6f8fc;
    color: var(--ct-ink);
    font-family: "Roboto", system-ui, sans-serif;
}

.city :where(h1, h2, h3, p, ul, ol, figure) { margin: 0; }

/* ---- Hero ---- */
.city-hero {
    max-width: var(--ct-max);
    margin: 2.5rem auto 0;
    padding: 0 var(--padding-x, 1.25rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.city-hero-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 16px;
}
.city-h1 {
    font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    max-width: 24ch;
}
.city-intro {
    max-width: var(--ct-text);
    font-size: 1.15rem;
    line-height: 1.7;
    color: #334155;
}
.city-intro > * + * { margin-top: 0.9rem; }
.city-intro a { color: var(--ct-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Chips de stats entite */
.city-stats {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
}
.city-stats li {
    padding: 0.4rem 0.85rem;
    background: var(--ct-bg-soft);
    border: 1px solid var(--ct-line);
    border-radius: 999px;
    font-size: 0.88rem;
    color: #334155;
    white-space: nowrap;
}

/* Video hero : poster -> iframe au clic */
.city-video-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}
.city-video-thumb img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; transition: filter .25s ease; }
.city-video-thumb:hover img { filter: brightness(0.72); }
.city-video-thumb:focus-visible { outline: 3px solid var(--ct-accent); outline-offset: 3px; }
.city-play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.city-play-btn svg { width: 64px; height: 45px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.6)); transition: transform .2s; opacity: .92; }
.city-video-thumb:hover .city-play-btn svg { transform: scale(1.1); opacity: 1; }
.city-video-thumb.is-playing { cursor: default; }
.city-video-thumb.is-playing iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Sommaire ---- */
.city-toc {
    max-width: var(--ct-max);
    margin: 2.5rem auto 0;
    padding: 1.25rem 1.5rem;
    background: var(--ct-bg-soft);
    border: 1px solid var(--ct-line);
    border-radius: 14px;
    width: calc(100% - 2 * var(--padding-x, 1.25rem));
}
.city-toc-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ct-muted); margin-bottom: 0.85rem; }
.city-toc-list { list-style: none; padding: 0; display: grid; gap: 0.5rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .city-toc-list { grid-template-columns: 1fr 1fr; } }
.city-toc-list a { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; color: #334155; padding: 0.3rem 0; transition: color .15s ease; }
.city-toc-list a:hover, .city-toc-list a.is-active { color: var(--ct-accent); }
.city-toc-list a.is-active { font-weight: 600; }
.city-toc-num { flex: 0 0 auto; min-width: 1.4rem; font-weight: 700; color: var(--ct-accent); font-variant-numeric: tabular-nums; }

/* ---- Sections ---- */
.city-content {
    max-width: var(--ct-max);
    margin: 1rem auto 4.5rem;
    padding: 0 var(--padding-x, 1.25rem);
}
.city-section { margin-top: 4rem; scroll-margin-top: 90px; }
.city-section:not(:first-child) { padding-top: 3.5rem; border-top: 1px solid var(--ct-line); }
.city-section-title {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
    scroll-margin-top: 90px;
}
.city-section-intro, .city-prose {
    max-width: var(--ct-text);
    font-size: 1.02rem;
    line-height: 1.75;
    color: #334155;
}
.city-section-intro { margin-bottom: 1.5rem; }
.city-prose > * + *, .city-section-intro > * + * { margin-top: 1rem; }
.city-prose h3 { font-size: 1.12rem; line-height: 1.4; color: var(--ct-ink); margin-top: 1.7rem; }
.city-prose ul, .city-prose ol { padding-left: 1.25rem; }
.city-prose li + li { margin-top: 0.4rem; }
.city-prose a, .city-section-intro a, .city-card-blurb a, .city-event-body a, .faq-answer a {
    color: var(--ct-accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.city-prose a:hover { color: var(--ct-accent-hover); }

/* Encart libre (cinema…) */
.city-aside {
    max-width: var(--ct-text);
    margin-top: 1.75rem;
    padding: 1.25rem 1.4rem;
    background: var(--ct-bg-soft);
    border: 1px solid var(--ct-line);
    border-left: 4px solid var(--ct-accent);
    border-radius: 12px;
    font-size: 0.98rem;
    line-height: 1.7;
    color: #334155;
}
.city-aside > * + * { margin-top: 0.75rem; }

/* ---- Cartes (incontournables / alentours) ---- */
.city-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.city-card {
    background: #fff;
    border: 1px solid var(--ct-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s;
}
a.city-card:hover { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.11); }
.city-card-img { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #f0f0f0; }
.city-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
a.city-card:hover .city-card-img img { transform: scale(1.04); }
.city-card-body { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; gap: 0.45rem; }
.city-card-title { font-size: 1.02rem; font-weight: 700; line-height: 1.35; color: var(--ct-ink); }
a.city-card .city-card-title { color: var(--ct-accent); }
.city-card-blurb { font-size: 0.92rem; line-height: 1.6; color: #475569; }

/* ---- Frise chronologique ---- */
.city-timeline {
    list-style: none;
    max-width: var(--ct-text);
    margin-top: 1.75rem;
    padding: 0 0 0 1.1rem;
    border-left: 3px solid var(--ct-accent);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.city-timeline li { position: relative; padding-left: 0.5rem; font-size: 0.97rem; line-height: 1.55; color: #334155; }
.city-timeline li::before {
    content: "";
    position: absolute;
    left: -1.48rem;
    top: 0.42rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--ct-accent);
}
.city-timeline-year { font-weight: 700; color: var(--ct-ink); margin-right: 0.5rem; font-variant-numeric: tabular-nums; }

/* ---- Carte / map ---- */
.city-map { max-width: var(--ct-max); margin: 1.75rem 0; }
.city-map iframe { width: 100%; height: 380px; border: 0; border-radius: 14px; }

/* ---- Bus (cartes au format beaches : badges, durée, prix, planner) ---- */
.city-bus-intro { margin-top: 1.5rem; margin-bottom: 0.85rem; }
.bus-list { display: flex; flex-direction: column; gap: 0.65rem; max-width: var(--ct-text); }
.bus-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    color: #18181b;
}
.bus-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.bus-badge-sep {
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}
.bus-badges[data-transfer="1"] .bus-badge-sep { color: #475569; font-size: 1.25rem; }
.bus-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    color: #fff;
    letter-spacing: -0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}
.bus-body { display: flex; align-items: center; gap: 1rem; }
.bus-info { flex: 1; min-width: 0; }
.bus-route { font-weight: 600; font-size: 0.95rem; color: #18181b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bus-arrow { margin: 0 0.3rem; opacity: 0.45; }
.bus-via { font-size: 0.79rem; color: #71717a; margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bus-meta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.bus-duration { display: flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; color: #71717a; }
.bus-duration svg { width: 14px; height: 14px; flex-shrink: 0; }
.bus-price { font-weight: 700; font-size: 1.05rem; color: #18181b; }
.bus-price-note { font-size: 0.78rem; color: #999; margin: 0.6rem 0 0; font-style: italic; }
.bus-planner-link { display: flex; align-items: center; gap: 0.45rem; margin: 1rem 0 0; font-size: 0.85rem; }
.bus-planner-link svg { width: 15px; height: 15px; flex-shrink: 0; color: #6b7280; }
.bus-planner-link a { color: var(--ct-accent); text-decoration: none; border-bottom: 1px solid rgba(37, 99, 235, 0.3); transition: border-color 0.15s; }
.bus-planner-link a:hover { border-color: var(--ct-accent); }

/* ---- Meteo live ---- */
.city-weather {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.5rem;
    max-width: var(--ct-text);
    margin-bottom: 1.5rem;
    padding: 0.85rem 1.1rem;
    background: var(--ct-bg-soft);
    border: 1px solid var(--ct-line);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #334155;
}
.city-weather-now { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ct-muted); }
.city-weather-trend { font-size: 0.82rem; color: var(--ct-muted); margin-left: 0.25rem; }

/* ---- Evenements ---- */
.city-events { list-style: none; max-width: var(--ct-text); margin-top: 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.city-events li { display: flex; gap: 0.9rem; align-items: baseline; font-size: 0.97rem; line-height: 1.6; color: #334155; }
.city-event-month {
    flex: 0 0 6.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ct-accent);
}

/* ---- Hotels (memes classes que beach.css, styles autonomes) ---- */
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.hotel-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow .2s;
}
.hotel-card:hover { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.11); }
.hotel-img { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f0f0f0; }
.hotel-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hotel-card:hover .hotel-img img { transform: scale(1.04); }
.hotel-body { padding: 1rem 1.15rem 1.1rem; display: flex; flex-direction: column; flex: 1; gap: 0.3rem; }
.hotel-stars { font-size: 0.8rem; color: #f59e0b; letter-spacing: 0.05em; line-height: 1; }
.hotel-stars-empty { color: #e5e7eb; }
.hotel-name { font-size: 1rem; font-weight: 700; color: #1a1a1a; margin: 0; line-height: 1.3; }
.hotel-location { font-size: 0.75rem; color: #999; text-transform: uppercase; letter-spacing: 0.05em; }
.hotel-rating { display: flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; margin-top: 0.15rem; }
.hotel-score { font-weight: 700; color: #1a1a1a; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; padding: 0.1rem 0.4rem; }
.hotel-reviews { color: #777; }
.hotel-footer { margin-top: auto; padding-top: 0.65rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.hotel-price { font-size: 0.8rem; color: #666; }
.hotel-price strong { font-size: 1.05rem; color: #1a1a1a; margin: 0 0.15rem; }
.hotel-price-night { color: #999; }
.hotel-btn {
    padding: 0.45rem 0.95rem;
    background: var(--ct-accent);
    color: #fff;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s;
}
.hotel-card:hover .hotel-btn { background: var(--ct-accent-hover); }

/* ---- Avis ---- */
.city-rating { display: flex; align-items: baseline; gap: 0.45rem; margin-bottom: 1.25rem; }
.city-rating-score { font-size: 2.2rem; font-weight: 800; color: var(--ct-ink); line-height: 1; }
.city-rating-base { color: var(--ct-muted); font-size: 1rem; }
.city-rating-count { margin-left: 0.5rem; font-size: 0.92rem; color: var(--ct-muted); }
.city-pros-cons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: var(--ct-max);
    margin-top: 1.75rem;
}
.city-pros, .city-cons { padding: 1.25rem 1.4rem; border-radius: 14px; border: 1px solid var(--ct-line); font-size: 0.96rem; line-height: 1.65; }
.city-pros { background: #f0fdf4; border-color: #bbf7d0; }
.city-cons { background: #fffbeb; border-color: #fde68a; }
.city-pros h3, .city-cons h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.city-pros ul, .city-cons ul { padding-left: 1.15rem; margin: 0; }
.city-pros li + li, .city-cons li + li { margin-top: 0.45rem; }

/* ---- FAQ (memes classes que beach.css, styles autonomes) ---- */
.faq-list { display: flex; flex-direction: column; gap: 0.65rem; max-width: var(--ct-text); }
.faq-item { border: 1px solid var(--ct-line); border-radius: 12px; background: #fff; overflow: hidden; }
.faq-question {
    cursor: pointer;
    padding: 0.95rem 1.15rem;
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--ct-ink);
    list-style: none;
    position: relative;
    padding-right: 2.4rem;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: "+";
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--ct-accent);
    transition: transform .2s;
}
.faq-item[open] .faq-question::after { content: "–"; }
.faq-answer { padding: 0 1.15rem 1.05rem; font-size: 0.95rem; line-height: 1.7; color: #334155; }
.faq-answer > * + * { margin-top: 0.6rem; }

/* ---- Galerie ---- */
.city-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.city-gallery-item { margin: 0; }
.city-gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    cursor: zoom-in;
    transition: filter 0.2s ease;
}
.city-gallery-item img:hover { filter: brightness(0.92); }

/* ---- Visionneuse plein écran (identique au modèle article) ---- */
.city-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vmin;
}
.city-lightbox[hidden] { display: none; }
.city-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.city-lightbox-close,
.city-lightbox-nav {
    position: fixed;
    border: none;
    background: transparent;
    color: var(--ct-ink, #0f172a);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.city-lightbox-close[hidden],
.city-lightbox-nav[hidden] { display: none; }
.city-lightbox-close {
    top: 0.75rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    font-size: 2.6rem;
    border-radius: 50%;
}
.city-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    font-size: 3rem;
}
.city-lightbox-prev { left: 0.75rem; }
.city-lightbox-next { right: 0.75rem; }
.city-lightbox-close:hover,
.city-lightbox-nav:hover { color: var(--ct-accent); }
.city-lightbox-prev:hover { transform: translateY(-50%) scale(1.12); }
.city-lightbox-next:hover { transform: translateY(-50%) scale(1.12); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
