/* =========================================================
   ADHC.ch — feuille de style principale
   Refonte 2026 — design suisse moderne, responsive
   ========================================================= */

:root {
  --red: #e30613;
  --red-dark: #b30410;
  --red-soft: #fdecec;
  --ink: #14181d;
  --body: #3a424c;
  --muted: #6b7480;
  --line: #e7eaee;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --bg-dark: #14181d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 29, .06), 0 1px 3px rgba(20, 24, 29, .04);
  --shadow-md: 0 10px 30px -12px rgba(20, 24, 29, .18);
  --container: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: .2s ease;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); text-decoration: underline; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------------- Header / Navigation ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 70px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__cross {
  width: 30px; height: 30px; border-radius: 6px; background: var(--red);
  display: inline-grid; place-items: center; flex: none;
  box-shadow: var(--shadow-sm);
}
.brand__cross svg { width: 17px; height: 17px; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; color: var(--ink); }
.brand__name span { color: var(--red); }
.brand__tag {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); font-weight: 600; margin-top: 1px;
}

.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: var(--transition); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.main-nav ul {
  list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0;
}
.main-nav a {
  display: block; padding: 9px 13px; border-radius: 8px; color: var(--body);
  font-weight: 600; font-size: .96rem; position: relative;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.main-nav a.is-active { color: var(--red); }
.main-nav a.is-active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px;
  height: 2px; background: var(--red); border-radius: 2px;
}
.main-nav a.nav-cta {
  background: var(--red); color: #fff; padding: 9px 18px;
}
.main-nav a.nav-cta:hover { background: var(--red-dark); color: #fff; }
.main-nav a.nav-cta::after { display: none; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #c40410 0%, #e30613 55%, #ff2a1a 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(500px 260px at 0% 120%, rgba(0,0,0,.18), transparent 60%);
}
.hero .container { position: relative; z-index: 1; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.12rem; max-width: 60ch; margin-bottom: 0; }
.hero .swiss-cross-bg {
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%) rotate(8deg);
  width: 320px; height: 320px; opacity: .12; z-index: 0;
}

/* Compact hero for inner pages */
.page-hero {
  background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.page-hero .container { padding-top: 40px; padding-bottom: 40px; }
.page-hero h1 { margin-bottom: .2em; }
.page-hero .lead { color: var(--muted); margin: 0; font-size: 1.05rem; }

.breadcrumb { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li::after { content: "›"; margin-left: 6px; color: var(--line); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--red); }

/* ---------------- Main / layout ---------------- */
main { display: block; }
.section { padding: 56px 0; }
.section--soft { background: var(--bg-soft); }

.prose { font-size: 1.06rem; }
.prose p { margin-bottom: 1.15em; }
.prose ul { padding-left: 0; margin: 0 0 1.2em; list-style: none; }
.prose ul li {
  position: relative; padding: 14px 16px 14px 46px; margin-bottom: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.prose ul li::before {
  content: ""; position: absolute; left: 16px; top: 19px;
  width: 16px; height: 16px; border-radius: 5px; background: var(--red-soft);
  background-image: linear-gradient(135deg, var(--red), var(--red-dark));
}
.prose ul li::after {
  content: ""; position: absolute; left: 20px; top: 23px; width: 8px; height: 8px;
  background:
    linear-gradient(#fff,#fff) center/8px 2.4px no-repeat,
    linear-gradient(#fff,#fff) center/2.4px 8px no-repeat;
}

/* Two-column content grid (homepage) */
.layout-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 36px; align-items: start; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 26px;
}
.card--accent { border-top: 3px solid var(--red); }

/* Actualités timeline */
.news { position: relative; padding-left: 26px; }
.news::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--red), var(--line));
}
.news-item { position: relative; padding: 0 0 22px; }
.news-item:last-child { padding-bottom: 0; }
.news-item::before {
  content: ""; position: absolute; left: -26px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; border: 3px solid var(--red);
}
.news-item time { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; margin-bottom: 2px; }
.news-item p { margin: 0; font-style: italic; color: var(--body); font-size: .98rem; }

/* Sections quick-links grid */
.cantons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.canton-chip {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.canton-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d7dbe0; text-decoration: none; color: var(--ink); }
.canton-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }

/* ---------------- Contact form ---------------- */
.contact-form { display: grid; gap: 16px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.field textarea { min-height: 150px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 13px 28px; border-radius: 10px; border: none;
  background: var(--red); color: #fff; transition: background var(--transition), transform var(--transition);
  justify-self: start;
}
.btn:hover { background: var(--red-dark); transform: translateY(-1px); color: #fff; text-decoration: none; }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--bg-dark); color: rgba(255,255,255,.7); margin-top: 0;
  padding: 48px 0 28px; font-size: .95rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 30px 50px; justify-content: space-between; }
.footer-brand { max-width: 320px; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.6); margin: 12px 0 0; font-size: .9rem; }
.footer-nav h3 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 36px; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: rgba(255,255,255,.72); font-weight: 500; }
.footer-bottom {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
  font-size: .85rem; color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.75); }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 70px 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform .28s ease;
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 18px; }
  .main-nav a { padding: 13px 12px; border-radius: 10px; font-size: 1.05rem; }
  .main-nav a.is-active::after { display: none; }
  .main-nav a.is-active { background: var(--red-soft); }
  .main-nav a.nav-cta { margin-top: 6px; text-align: center; }
  .layout-grid { grid-template-columns: 1fr; gap: 26px; }
  .brand__tag { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .section { padding: 40px 0; }
  .hero .container { padding-top: 48px; padding-bottom: 48px; }
  .footer-nav ul { columns: 1; }
}

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