/* Guides Tanger (TimeXi) — feuille de style commune, sans framework. Couleur d’accent surchargée par site. */
:root {
  --ink: #0d2233;
  --ink-2: #3b5262;
  --muted: #6b8090;
  --line: #dbe6ec;
  --bg: #f6fafc;
  --card: #ffffff;
  --accent: #0a7ea4;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3f9;
  --warm: #e8643c;
  --radius: 14px;
  --wrap: 1080px;
  --font: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}
[dir="rtl"] { --font: "IBM Plex Sans Arabic", Tahoma, sans-serif; --display: "IBM Plex Sans Arabic", Tahoma, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* En-tête */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.menu { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 16px; }
.menu a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--accent); }
.langs { display: flex; gap: 8px; font-size: 14px; }
.langs a { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.langs a[aria-current="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* Fil d'Ariane */
.crumbs { font-size: 14px; color: var(--muted); margin: 20px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "›"; margin-inline-end: 6px; }
.crumbs a { color: var(--muted); }

/* Héros */
.hero { padding: 56px 0 40px; }
.hero h1, h1 { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero .lead { font-size: clamp(19px, 2.2vw, 22px); color: var(--ink-2); max-width: 46em; margin: 0 0 24px; }
.updated { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.updated::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Réponse courte en tête de page : ce que les moteurs IA reprennent */
.answer { background: var(--card); border: 1px solid var(--line); border-inline-start: 5px solid var(--accent); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; }
.answer p { margin: 0; }
.answer strong { color: var(--ink); }

.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid var(--accent); font-size: 17px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { color: var(--accent); background: transparent; }
.btn.ghost:hover { background: var(--accent-soft); color: var(--ink); }

/* Sections */
main section { padding: 36px 0; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font-size: 21px; line-height: 1.3; margin: 24px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
.prose { max-width: 46em; }
.muted { color: var(--muted); font-size: 15px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.card a.more { font-weight: 700; text-decoration: none; }
.card a.more::after { content: " →"; }
[dir="rtl"] .card a.more::after { content: " ←"; }

/* Tableaux */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; }
caption { text-align: start; padding: 14px 16px 0; font-weight: 700; }
th, td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--accent-soft); font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }

/* Calculateur */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.calc fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.calc legend, .calc label { font-weight: 700; display: block; margin-bottom: 6px; }
.calc input[type="number"], .calc select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.calc .choices { display: grid; gap: 8px; }
.calc .choices label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; margin: 0; }
.calc .choices input { margin-top: 5px; accent-color: var(--accent); }
.calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.result .big { font-family: var(--display); font-size: clamp(40px, 6vw, 60px); line-height: 1; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.result p { margin: 0 0 8px; color: #c9dae5; }
.result strong { color: #fff; }

/* FAQ */
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
details > p:last-child { padding-bottom: 6px; }

/* Encart pro */
.pro { background: var(--accent-soft); border-radius: var(--radius); padding: 22px; display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.pro p { margin: 0; max-width: 40em; }

/* Pied de page */
.foot { background: var(--ink); color: #b9cbd6; margin-top: 48px; padding: 40px 0 28px; font-size: 15px; }
.foot a { color: #fff; }
.foot .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 24px; }
.foot h2 { font-family: var(--font); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin-bottom: 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 6px; }
.foot .legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 18px; font-size: 13px; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero { padding: 36px 0 24px; }
  .calc { padding: 18px; }
  .calc .row { grid-template-columns: 1fr; }
}
@media print { .top, .foot, .btns, .pro { display: none; } }
