/* ==========================================================================
   durabilite-suisse.ch — feuille de style unique
   Charte reprise de sejours-alpin.ch (navy #0D2B45 / rouge #D62839)
   ========================================================================== */

/* --- Polices auto-hébergées (aucun appel à Google Fonts : pas de transfert
       de données vers un tiers, cf. politique de confidentialité) --------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/inter-300.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/playfair-display-400.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/playfair-display-600.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/playfair-display-700.woff2') format('woff2'); }

:root {
  --navy: #0D2B45;
  --navy-deep: #081D2F;
  --navy-soft: #1B4066;
  --accent: #D62839;
  --accent-dark: #B4212F;
  --cream: #F7F6F4;
  --ink: #1F2933;
  --muted: #5B6875;
  --line: #E3E6EA;
  --white: #FFFFFF;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 43, 69, .06), 0 12px 32px rgba(13, 43, 69, .07);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-soft); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.narrow { max-width: 820px; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .7rem;
}
.lead { font-size: 1.15rem; color: var(--muted); }

/* Accessibilité : lien d'évitement */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* --- En-tête ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.12rem; }
.brand-sub { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { font-size: .93rem; font-weight: 500; color: var(--navy); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

/* --- Boutons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'Inter', sans-serif; font-size: .95rem; font-weight: 600;
  padding: .72rem 1.3rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: var(--cream); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--cream); color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* --- Héros -------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #fff; padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero .lead { color: rgba(255, 255, 255, .82); max-width: 46rem; font-size: 1.2rem; }
.hero .eyebrow { color: #F2A0A8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.page-head { background: var(--navy); color: #fff; padding: clamp(2.8rem, 6vw, 4.4rem) 0; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: rgba(255, 255, 255, .75); margin: 0; font-size: .95rem; }

/* --- Sections ----------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-cream { background: var(--cream); }
.section-line { border-top: 1px solid var(--line); }

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--accent);
  display: block; margin-bottom: .3rem;
}

/* --- Carte marque ------------------------------------------------------- */
.brand-card {
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
}
.brand-card h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.brand-card .domain { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }

/* --- Tableau d'identité ------------------------------------------------- */
.facts { width: 100%; border-collapse: collapse; font-size: .97rem; }
.facts th, .facts td { text-align: left; padding: .85rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { width: 38%; font-weight: 600; color: var(--navy); }
.facts td { color: var(--muted); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }

/* --- Contenu juridique -------------------------------------------------- */
.legal { max-width: 820px; }
.legal h2 { margin-top: 2.6rem; padding-top: .2rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { margin-top: 1.8rem; font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 700; }
.legal ul, .legal ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.legal li { margin-bottom: .45em; }
.legal .box {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; margin: 0 0 2.4rem;
}
.legal .box h2, .legal .box h3 { margin-top: 0; }
.legal .box p:last-child { margin-bottom: 0; }
.updated { font-size: .88rem; color: var(--muted); }

.toc { background: var(--cream); border-radius: var(--radius); padding: 1.3rem 1.6rem; margin-bottom: 2.6rem; }
.toc p { font-weight: 600; color: var(--navy); margin-bottom: .5rem; font-size: .95rem; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 2rem; font-size: .93rem; }
.toc li { margin-bottom: .25em; break-inside: avoid; }

/* Tableau des cookies */
.table-scroll { overflow-x: auto; margin: 0 0 1.8rem; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { border: 1px solid var(--line); padding: .7rem .8rem; text-align: left; vertical-align: top; }
table.data th { background: var(--cream); color: var(--navy); font-weight: 600; }

/* --- Pied de page ------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .72); padding: 3.2rem 0 2rem; font-size: .93rem; }
.site-footer h4 { font-family: 'Inter', sans-serif; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 .9rem; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .5rem; }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem;
}
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: rgba(255, 255, 255, .78); text-decoration: underline; text-underline-offset: 2px;
}
.linkbtn:hover { color: #fff; }

/* --- Bandeau cookies ---------------------------------------------------- */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  background: #fff; border-top: 3px solid var(--accent);
  box-shadow: 0 -8px 30px rgba(13, 43, 69, .16);
  padding: 1.3rem 0;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner .inner { display: grid; grid-template-columns: 1fr auto; gap: 1.8rem; align-items: center; }
.cookie-banner h2 { font-size: 1.15rem; margin-bottom: .35rem; }
.cookie-banner p { font-size: .92rem; color: var(--muted); margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }

/* --- Fenêtre de préférences -------------------------------------------- */
.cookie-modal {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 29, 47, .6); padding: 1.2rem;
}
.cookie-modal[hidden] { display: none; }
.cookie-modal .panel {
  background: #fff; border-radius: var(--radius); width: min(640px, 100%);
  max-height: min(86vh, 760px); overflow-y: auto; padding: 2rem;
  box-shadow: 0 24px 60px rgba(8, 29, 47, .35);
}
.cookie-modal h2 { font-size: 1.5rem; }
.cookie-modal .intro { font-size: .93rem; color: var(--muted); }
.pref {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: .9rem;
}
.pref-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pref-head strong { font-size: 1rem; color: var(--navy); }
.pref p { font-size: .88rem; color: var(--muted); margin: .5rem 0 0; }
.pref .locked { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* Interrupteur */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider {
  position: absolute; inset: 0; background: #C9CFD6; border-radius: 999px;
  transition: background-color .18s ease; pointer-events: none;
}
.switch .slider::before {
  content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--accent); outline-offset: 2px; }

.modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; margin-top: 1.4rem; }

.consent-state {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.6rem; margin: 0 0 2rem; font-size: .93rem;
}
.consent-state p { margin-bottom: .8rem; }

/* --- Utilitaires d'espacement -------------------------------------------
   Utilisés à la place d'attributs style="" en ligne, que la politique de
   sécurité du contenu (CSP, cf. .htaccess) interdit.
   ------------------------------------------------------------------------ */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: .4rem; }
.mb-lg { margin-bottom: 2rem; }
.mt-lg { margin-top: 2.5rem; }
.mt-xl { margin-top: 2.8rem; }
.actions-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 0; }

/* --- Adaptatif ---------------------------------------------------------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .brand-card { grid-template-columns: 1fr; }
  .cookie-banner .inner { grid-template-columns: 1fr; gap: 1.1rem; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1 1 auto; }
  .toc ol { columns: 1; }
  .site-header .wrap { min-height: 64px; flex-wrap: wrap; gap: .5rem 1rem; padding-block: .6rem; }
  .site-nav { flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .9rem; }
  .brand-sub { display: none; }
  .facts th, .facts td { display: block; width: 100%; }
  .facts th { border-bottom: 0; padding-bottom: 0; }
}

@media print {
  .site-header, .site-footer, .cookie-banner, .cookie-modal { display: none !important; }
  body { font-size: 12pt; color: #000; }
}
