/* ==========================================================================
   MonORDI IDF — pages d'information publiques
   Direction artistique alignée sur l'application mobile.
   Une seule feuille de style, partagée par les 4 pages.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;800&family=Figtree:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  /* Palette reprise de l'écran de l'application */
  --ink:      #16183A;   /* texte principal */
  --ink-soft: #4A4870;   /* texte secondaire */
  --navy:     #2A327B;   /* couleur d'action principale */
  --red:      #D71302;   /* accent d'identité, repris de l'icône */
  --sky:      #36BCFF;   /* accent froid, éclats décoratifs */
  --paper:    #F3F3F3;   /* fond de page */
  --card:     #FFFFFF;   /* fond des blocs de contenu */
  --hairline: #E2E0E8;

  /* Deux familles seulement : display géométrique, texte courant lisible.
     Pour substituer la police de marque de la Région,
     ne changer que ces deux variables. */
  --font-display: 'Outfit', 'Trebuchet MS', system-ui, sans-serif;
  --font-body:    'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-card: 28px;
  --radius-pill: 999px;
  --measure: 44rem;      /* largeur de lecture confortable */
  --measure-nav: 64rem;  /* largeur propre au menu, plus large que le texte */
  --frieze: 9rem;        /* hauteur de la bande graphique de l'en-tête */
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* ---------- Accessibilité ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- En-tête : bandeau à éclats ---------- */
/* Signature visuelle : les fragments angulaires de l'application,
   confinés au seul bandeau d'en-tête. Le reste de la page reste sobre. */

.masthead {
  position: relative;
  overflow: hidden;
  padding: 0 1.5rem 2.25rem;
  background: var(--paper);
}

/* La frise est une bande de hauteur connue, qui masque ce qui dépasse.
   Les éclats sont dimensionnés en pourcentages de cette bande : ils
   s'adaptent à la largeur d'écran sans jamais descendre sur le titre,
   dont le décalage est calculé depuis la même variable. */
.shards {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--frieze);
  overflow: hidden;
  pointer-events: none;
}

.shard { position: absolute; display: block; }

.shard--a { top: -18%; left:  -4%; width: 30%; height:  88%;
            background: var(--sky);  clip-path: polygon(0 0, 100% 24%, 34% 100%); }
.shard--b { top: -10%; left:  16%; width: 26%; height: 100%;
            background: var(--navy); clip-path: polygon(0 0, 100% 0, 100% 62%, 22% 100%); }
.shard--c { top: -12%; right: 15%; width: 20%; height:  66%;
            background: var(--red);  clip-path: polygon(12% 0, 100% 0, 58% 100%); }
.shard--d { top: -30%; right: -6%; width: 26%; height: 110%;
            background: #C9E6F7;     clip-path: circle(50% at 62% 34%); }

.masthead__inner {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: calc(var(--frieze) + 1rem);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.4rem;
}
.wordmark em { color: var(--red); font-style: normal; }

.masthead h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
}

.masthead__alt {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.masthead__lede {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 243, 243, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

/* Le menu n'est pas contraint par la largeur de lecture du contenu :
   il dispose de sa propre largeur, plus généreuse, pour tenir sur une
   seule ligne. S'il ne tient pas, il passe à la ligne — jamais de
   défilement horizontal sur grand écran. */
.nav__inner {
  max-width: var(--measure-nav);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.nav a {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  color: var(--navy);
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--card);
  white-space: nowrap;
  min-height: 2.35rem;
  display: flex;
  align-items: center;
}
.nav a:hover { border-color: var(--red); color: var(--red); }

.nav a[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---------- Corps de page ---------- */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem;
  margin-bottom: 1.25rem;
}

.card > *:first-child { margin-top: 0; }
.card > *:last-child  { margin-bottom: 0; }

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 1.5rem 0 0.4rem;
}

p { margin: 0 0 1rem; }

a { color: var(--navy); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

ul, ol { margin: 0 0 1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.45rem; }

strong { font-weight: 600; }

/* ---------- Articles numérotés ---------- */
/* La numérotation encode une vraie séquence : les articles d'un texte
   réglementaire, cités par leur numéro dans les réclamations. */

.article { border-top: 1px solid var(--hairline); padding-top: 1.5rem; margin-top: 1.75rem; }
.article:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }

.article__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.25rem;
}

.article h2 { margin-top: 0; }

/* ---------- Bandeaux d'état ---------- */

.notice {
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.notice__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.notice--update { background: #E9F6FE; border: 1.5px solid var(--sky); color: #0B4A73; }

.notice a { color: inherit; }

/* ---------- Questions / réponses ---------- */

.qa { border-top: 1px solid var(--hairline); }

.qa details { border-bottom: 1px solid var(--hairline); }

.qa summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
  padding: 1.1rem 2.5rem 1.1rem 0;
  cursor: pointer;
  position: relative;
  list-style: none;
  color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 1.5rem;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2.5px solid var(--red);
  border-bottom: 2.5px solid var(--red);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.qa details[open] summary::after { transform: rotate(-135deg); }

.qa summary:hover { color: var(--red); }

.qa__body { padding: 0 0 1.25rem; color: var(--ink-soft); }
.qa__body > *:last-child { margin-bottom: 0; }
.qa__body strong { color: var(--ink); }

/* ---------- Renvoi vers un autre document ---------- */

.doclink {
  display: block;
  text-decoration: none;
  background: var(--paper);
  border: 1.5px solid var(--hairline);
  border-radius: 18px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.6rem;
}
.doclink:hover { border-color: var(--red); }

.doclink__label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--navy);
  display: block;
}
.doclink:hover .doclink__label { color: var(--red); }
.doclink__hint { display: block; font-size: 0.9375rem; color: var(--ink-soft); }

/* ---------- Bloc de version ---------- */

.version {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--hairline);
  padding-top: 1.1rem;
  margin-top: 1.75rem;
}
.version dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.9rem; margin: 0; }
.version dt { font-weight: 600; color: var(--ink); }
.version dd { margin: 0; }

/* ---------- Pied de page ---------- */

.foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--hairline);
}
.foot p { margin-bottom: 0.5rem; }

/* ---------- Réglages ---------- */

@media (max-width: 60rem) {
  :root { --frieze: 6.5rem; }

  /* En dessous de cette largeur le menu peut passer sur deux ou trois
     lignes : le garder collant mangerait une part trop grande de l'écran.
     Il reste donc simplement en haut de page. */
  .nav { position: static; }
  .nav__inner { justify-content: flex-start; padding: 0.6rem 1rem; gap: 0.4rem; }
  .nav a { font-size: 0.875rem; padding: 0.45rem 0.8rem; }
}

@media (max-width: 30rem) {
  :root { --frieze: 4.75rem; }

  .card { padding: 1.5rem 1.25rem; border-radius: 22px; }
  .masthead { padding: 0 1.25rem 1.75rem; }
  .nav a { font-size: 0.8125rem; padding: 0.4rem 0.7rem; }
  .home__logo { width: 96px; height: 96px; border-radius: 21px; }
}

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

@media print {
  .nav, .shards { display: none; }
  body { background: #fff; }
  .card { padding: 0; }
  .qa details { border: 0; }
  .qa__body { display: block !important; }
}

/* ---------- Page d'accueil ---------- */

.home { text-align: center; padding-top: 3rem; }

.home__logo {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  display: block;
  margin: 0 auto 1.25rem;
}

.home h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}

.home__lede {
  margin: 0 auto 2.5rem;
  max-width: 30rem;
  color: var(--ink-soft);
}

.home .doclink { text-align: left; }
