/* =========================================================
   247.quebec — Design « hero » avec image de fond
   Repères et règles typographiques conservés.
   Image : images/BUL_5783.JPG (fond abstrait flou)
   ========================================================= */

/* --- 0. Unité de base -------------------------------------- */
html {
  font-size: 100%;
  box-sizing: border-box;
}

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

/* --- Corps -------------------------------------------------
   RÈGLE : 16 px minimum sur mobile (anti-zoom iOS).
   Texte de base : 16 px → 18 px, en unités relatives. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Verdana, Geneva, "DejaVu Sans", sans-serif;
  font-size: clamp(1rem, 0.25vw + 0.94rem, 1.125rem); /* 16 → 18 px */
  line-height: 1.5; /* RÈGLE : interligne 1,4 à 1,6 */
  color: #ffffff;
  background-color: #16161a; /* repli si l'image ne charge pas */
}

/* --- HERO : image de fond + voile sombre (contraste/accessibilité) --- */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4.5rem) 1.25rem;
  /* Mobile : image 1024 px — JPEG en repli universel */
  background:
    linear-gradient(rgba(18, 18, 24, 0.52), rgba(18, 18, 24, 0.72)),
    url("images/BUL_5783-1024.jpg") center / cover no-repeat;
}

/* WebP (plus léger) : utilisé automatiquement si le navigateur le supporte */
@supports (background-image: image-set("x" 1x)) {
  .hero {
    background-image:
      linear-gradient(rgba(18, 18, 24, 0.52), rgba(18, 18, 24, 0.72)),
      image-set(
        url("images/BUL_5783-1024.webp") type("image/webp"),
        url("images/BUL_5783-1024.jpg") type("image/jpeg")
      );
  }
}

/* Écran large (≥ 800 px) : image 1600 px, plus nette */
@media (min-width: 800px) {
  .hero {
    background:
      linear-gradient(rgba(18, 18, 24, 0.52), rgba(18, 18, 24, 0.72)),
      url("images/BUL_5783-1600.jpg") center / cover no-repeat;
  }

  @supports (background-image: image-set("x" 1x)) {
    .hero {
      background-image:
        linear-gradient(rgba(18, 18, 24, 0.52), rgba(18, 18, 24, 0.72)),
        image-set(
          url("images/BUL_5783-1600.webp") type("image/webp"),
          url("images/BUL_5783-1600.jpg") type("image/jpeg")
        );
    }
  }
}

.wrapper {
  width: 100%;
  max-width: 70ch; /* RÈGLE : longueur de ligne 45–75 caractères */
  margin-inline: auto;
  text-align: center;
}

/* --- Titres (clamp : variation fluide sans saut) ------------ */
h1 {
  font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); /* H1 28 → 40 px */
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.accent {
  color: #9cd36a; /* accent vert clair tiré de l'image */
}

.tagline {
  margin: 0 0 2.75rem;
  color: rgba(255, 255, 255, 0.85);
}

/* --- Carte « verre dépoli » --------------------------------- */
.card {
  max-width: 32rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

h2 {
  font-size: clamp(1.25rem, 1.5vw + 0.8rem, 1.875rem); /* H2 20 → 30 px */
  line-height: 1.3;
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.ip-value {
  font-size: clamp(1.5rem, 2vw + 1rem, 2rem); /* valeur mise en avant */
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: #ffffff;
  word-break: break-all; /* gère les longues adresses IPv6 */
}

.divider {
  width: 4rem;
  height: 2px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(90deg, transparent, #9cd36a, transparent);
}

.location {
  margin: 0;
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

/* --- Détails du visiteur (navigateur / OS / appareil) ------- */
.details {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 0.625rem;
  text-align: left;
}

.details li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.875rem; /* 14 px — plage « petits textes » 12–14 px */
  line-height: 1.4;
}

.details .label {
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.details .value {
  color: #ffffff;
  text-align: right;
}

/* --- Mention de transparence (sous les détails) ------------- */
.note {
  margin: 1.25rem 0 0;
  font-size: 0.75rem; /* 12 px — plage « petits textes » */
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.note a {
  color: #9cd36a;
}

/* --- Petits textes (pied de page) --------------------------- */
footer {
  padding: 1.25rem;
  text-align: center;
  background: rgba(10, 10, 14, 0.85);
  font-size: 0.8125rem; /* RÈGLE : 12–14 px */
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}

footer p {
  max-width: 65ch;
  margin-inline: auto;
}

footer a {
  color: #9cd36a;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: #9cd36a;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* --- Page de lecture (confidentialité / accessibilité) ------ */
.page {
  width: 100%;
  max-width: 70ch;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 4rem) 20px;
  text-align: left;
}

.page .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: #9cd36a;
  text-decoration: none;
  font-size: 0.875rem;
}

.page h2 {
  margin-top: 1.75rem;
}

.page a {
  color: #9cd36a;
}

.page ul {
  padding-left: 1.4rem;
  margin: 0.5rem 0 1rem;
}

.page p,
.page li {
  color: rgba(255, 255, 255, 0.92);
}

/* --- Thème clair (noir sur blanc) pour les pages confidentialité / accessibilité --- */
body.light {
  background-color: #ffffff;
  color: #1a1a1a;
}

body.light .page h1,
body.light .page h2 {
  color: #1a1a1a;
}

body.light .page p,
body.light .page li {
  color: #333333;
}

body.light .page a,
body.light .page .back {
  color: #c2185b;
}

body.light .page-nav {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.875rem;
}
