/*
 * Candidat de navigation ClariDroits — site web public uniquement.
 * Bandeau global persistant, décisions par grandes cartes, contenu conservé.
 * VALIDE_HUMAINEMENT: NON
 */

:root {
  --cdx-nav-height: 76px;
  --cdx-nav-clearance: 96px;
  --cdx-card-ink: #071f4a;
  --cdx-card-blue: #1769c2;
  --cdx-card-border: #b9cee3;
  --cdx-card-focus: #ffbf47;
  --cdx-card-shadow: 0 14px 34px rgba(7, 31, 74, .12);
}

html:has(body.cdx-nav-system-candidate) {
  scroll-padding-top: var(--cdx-nav-clearance);
}

body.cdx-nav-system-candidate {
  padding-block-start: var(--cdx-nav-height);
  background: #fff;
  color: var(--cdx-card-ink);
}

.cdx-nav-system-candidate .nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 1000;
  width: 100%;
  min-height: var(--cdx-nav-height);
  padding-block: 8px;
  box-shadow: 0 4px 18px rgba(7, 31, 74, .16);
}

body.cdx-nav-system-candidate .nav .brand img[src] {
  width: 240px;
  max-height: 64px;
}

.cdx-nav-system-candidate main,
.cdx-nav-system-candidate main [id],
.cdx-nav-system-candidate main [tabindex="-1"] {
  scroll-margin-top: var(--cdx-nav-clearance);
}

.cdx-nav-system-candidate .nav a,
.cdx-nav-system-candidate .nav button,
.cdx-nav-system-candidate .cdx-choice-card,
.cdx-nav-system-candidate .kb-family summary,
.cdx-nav-system-candidate .kb-family-links a {
  text-transform: none;
}

/* Cartes de décision communes */
.cdx-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 38px);
  margin-block: 26px 44px;
}

.cdx-choice-card {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  justify-items: center;
  gap: 18px;
  min-height: 310px;
  padding: clamp(28px, 4vw, 48px);
  border: 2px solid var(--cdx-card-border);
  border-radius: 30px;
  border-inline-start: 9px solid #1769c2;
  background: linear-gradient(145deg, #ffffff 20%, #eef7ff 100%);
  color: var(--cdx-card-ink);
  box-shadow: var(--cdx-card-shadow);
  text-align: center;
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.cdx-choice-card:nth-child(2) {
  border-color: #a8d2b7;
  border-inline-start-color: #218348;
  background: linear-gradient(145deg, #ffffff 20%, #edf9f1 100%);
}

.cdx-choice-card:nth-child(3) {
  border-color: #e2c185;
  border-inline-start-color: #a85c00;
  background: linear-gradient(145deg, #ffffff 20%, #fff6e6 100%);
}

.cdx-choice-card:hover {
  border-color: var(--cdx-card-blue);
  box-shadow: 0 18px 42px rgba(7, 31, 74, .19);
  transform: translateY(-4px);
}

.cdx-choice-card:active {
  transform: translateY(0) scale(.99);
}

.cdx-choice-card:focus-visible,
.cdx-nav-system-candidate .kb-family summary:focus-visible,
.cdx-nav-system-candidate .kb-family-links a:focus-visible,
.cdx-nav-system-candidate .kb-related a:focus-visible {
  outline: 5px solid var(--cdx-card-focus);
  outline-offset: 5px;
  box-shadow: 0 0 0 3px #071f4a;
}

.cdx-choice-picto {
  display: grid;
  place-items: center;
  inline-size: 112px;
  block-size: 112px;
  border-radius: 34px 34px 46px 20px;
  background: #eaf4ff;
  color: #0d5fb8;
  font-size: 3.7rem;
  line-height: 1;
}

.cdx-choice-card:nth-child(2) .cdx-choice-picto {
  border-radius: 56px;
  background: #edf8ef;
  color: #176c38;
}

.cdx-choice-card:nth-child(3) .cdx-choice-picto {
  border-radius: 20px 46px 34px 34px;
  background: #fff3d8;
  color: #8a5200;
}

.cdx-choice-card strong {
  color: inherit;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.16;
}

.cdx-choice-card small {
  max-width: 25ch;
  color: #40536b;
  font-size: 1.02rem;
  line-height: 1.45;
}

/* Accueil : des cartes chaleureuses, distinctes et immédiatement actionnables. */
.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card {
  border: 2px solid #a9c8e4;
  border-inline-start: 10px solid #1769c2;
  background: linear-gradient(145deg, #ffffff 15%, #eef7ff 100%);
  box-shadow: 0 16px 36px rgba(7, 31, 74, .13);
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card--green {
  border-color: #a8d2b7;
  border-inline-start-color: #218348;
  background: linear-gradient(145deg, #ffffff 15%, #edf9f1 100%);
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card--amber {
  border-color: #e2c185;
  border-inline-start-color: #a85c00;
  background: linear-gradient(145deg, #ffffff 15%, #fff6e6 100%);
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card .cdx-card-icon {
  inline-size: 124px;
  block-size: 124px;
  border-width: 3px;
  box-shadow: 0 12px 26px rgba(7, 31, 74, .11);
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card .cdx-card-icon svg {
  inline-size: 66px;
  block-size: 66px;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card::after,
.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-card::after {
  inline-size: auto;
  block-size: auto;
  border-radius: 0;
  background: transparent;
  color: #075fb8;
  font-size: 2.15rem;
  line-height: 1;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card--green::after { color: #176c38; }
.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card--amber::after { color: #925000; }

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-card {
  border-color: #b6cde2;
  border-inline-start: 8px solid #4f94d0;
  background: linear-gradient(145deg, #ffffff 20%, #f1f8ff 100%);
  box-shadow: 0 14px 32px rgba(7, 31, 74, .11);
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-card:nth-child(2n) {
  border-inline-start-color: #4f9a69;
  background: linear-gradient(145deg, #ffffff 20%, #f1faf4 100%);
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon {
  inline-size: 100px;
  block-size: 100px;
  border-width: 3px;
  background: #e8f4ff;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-card:nth-child(2n) .cdx-action-icon {
  border-color: #a9d6b8;
  background: #e8f7ed;
  color: #176c38;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon svg {
  inline-size: 54px;
  block-size: 54px;
  filter: drop-shadow(0 3px 3px rgba(7, 31, 74, .12));
  stroke-width: 2.45;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon--letter svg {
  inline-size: 62px;
  block-size: 62px;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon--letter .cdx-letter-sheet {
  fill: #ffffff;
  stroke: #075fb8;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon--letter .cdx-letter-envelope {
  fill: #bfe2ff;
  stroke: #075fb8;
}

.cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card:hover,
.cdx-home-redesign.cdx-nav-system-candidate .cdx-action-card:hover {
  box-shadow: 0 20px 42px rgba(7, 31, 74, .18);
  transform: translateY(-4px);
}

/* Base de connaissances : un choix de famille, puis ses destinations. */
.cdx-guides-candidate .kb-family-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.cdx-guides-candidate .kb-family {
  overflow: visible;
  border: 0;
  border-radius: 30px;
  background: transparent;
}

.cdx-guides-candidate .kb-family summary {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 22px;
  min-height: 210px;
  padding: 28px;
  border: 2px solid var(--cdx-card-border);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--cdx-card-shadow);
  list-style: none;
}

.cdx-guides-candidate .kb-family summary::-webkit-details-marker { display: none; }
.cdx-guides-candidate .kb-family summary::marker { content: ""; }

.cdx-guides-candidate .kb-family summary::after {
  content: "+";
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 46px;
  border: 2px solid #1769c2;
  border-radius: 50%;
  color: #1769c2;
  font-size: 1.7rem;
  font-weight: 900;
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
}

.cdx-guides-candidate .kb-family[open] summary::after { content: "−"; }

.cdx-guides-candidate .kb-family summary:hover {
  border-color: var(--cdx-card-blue);
  box-shadow: 0 18px 42px rgba(7, 31, 74, .19);
}

.cdx-guides-candidate .kb-family summary .cdx-family-picto {
  display: grid;
  place-items: center;
  inline-size: 104px;
  block-size: 104px;
  border-radius: 30px 44px 30px 44px;
  background: #eaf4ff;
  color: #075fb8;
  font-size: 3.3rem;
  font-weight: 400;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.cdx-guides-candidate .kb-family:nth-child(2) .cdx-family-picto {
  border-radius: 52px;
  background: #edf8ef;
}

.cdx-guides-candidate .kb-family:nth-child(3) .cdx-family-picto {
  border-radius: 44px 22px 44px 22px;
  background: #fff3dc;
}

.cdx-guides-candidate .kb-family:nth-child(4) .cdx-family-picto {
  border-radius: 22px 48px 22px 48px;
  background: #f3edff;
}

.cdx-guides-candidate .kb-family:nth-child(5) .cdx-family-picto {
  border-radius: 30px 52px 30px 52px;
  background: #eaf7f7;
}

.cdx-guides-candidate .kb-family summary .cdx-family-picto svg {
  inline-size: 66px;
  block-size: 66px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.15;
}

.cdx-guides-candidate .kb-family summary strong {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.2;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

.cdx-guides-candidate .kb-family summary .cdx-family-count {
  color: #52647c;
  font-size: .95rem;
  font-weight: 800;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
}

.cdx-guides-candidate .kb-family-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 0 8px;
}

.cdx-guides-candidate .kb-family-links a {
  min-height: 132px;
  align-content: center;
  padding: 22px;
  border: 2px solid #d5e2ef;
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(7, 31, 74, .08);
}

.cdx-guides-candidate .kb-family-links a:hover {
  border-color: var(--cdx-card-blue);
}

/* Index publics : six décisions visibles, puis ouverture volontaire par lots. */
body.cdx-public-system-final .kb-index-hero {
  padding: clamp(26px, 4vw, 46px);
  border: 2px solid #bed3e7;
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 18%, rgba(87, 215, 255, .18), transparent 18rem),
    linear-gradient(135deg, #ffffff, #eef7ff);
  color: var(--cdx-card-ink);
  box-shadow: 0 16px 38px rgba(7, 31, 74, .10);
}

body.cdx-public-system-final .kb-index-hero :is(h1, h2, p, strong) {
  color: var(--cdx-card-ink);
}

body.cdx-public-system-final .kb-index-hero .eyebrow {
  color: #075fb8;
}

body.cdx-public-system-final .cdx-progressive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-block: 22px 0;
}

body.cdx-public-system-final .cdx-progressive-card {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 20px;
  min-height: 168px;
  padding: 24px;
  border: 2px solid #b6cde2;
  border-inline-start: 8px solid #1769c2;
  border-radius: 26px;
  background: linear-gradient(145deg, #fff 20%, #eef7ff 100%);
  color: var(--cdx-card-ink);
  box-shadow: 0 12px 30px rgba(7, 31, 74, .10);
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

body.cdx-public-system-final .cdx-progressive-card:nth-of-type(2n) {
  border-color: #a8d2b7;
  border-inline-start-color: #218348;
  background: linear-gradient(145deg, #fff 20%, #edf9f1 100%);
}

body.cdx-public-system-final .cdx-progressive-card:nth-of-type(3n) {
  border-color: #e2c185;
  border-inline-start-color: #a85c00;
  background: linear-gradient(145deg, #fff 20%, #fff6e6 100%);
}

body.cdx-public-system-final .cdx-progressive-picto {
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  inline-size: 82px;
  block-size: 82px;
  border: 2px solid #bfd9ef;
  border-radius: 26px 40px 26px 40px;
  background: #e6f3ff;
  color: #075fb8;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
}

body.cdx-public-system-final .cdx-progressive-card:nth-of-type(2n) .cdx-progressive-picto {
  border-color: #b7dbc3;
  border-radius: 50%;
  background: #e5f6eb;
  color: #176c38;
}

body.cdx-public-system-final .cdx-progressive-card:nth-of-type(3n) .cdx-progressive-picto {
  border-color: #ebcf9e;
  border-radius: 20px 42px 20px 42px;
  background: #fff0d6;
  color: #925000;
}

body.cdx-public-system-final .cdx-progressive-card > strong {
  grid-column: 2;
  align-self: end;
  color: var(--cdx-card-ink);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.25;
}

body.cdx-public-system-final .cdx-progressive-card > span:not(.cdx-progressive-picto) {
  display: -webkit-box;
  grid-column: 2;
  align-self: start;
  overflow: hidden;
  color: #40536b;
  font-size: .98rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

body.cdx-public-system-final .cdx-progressive-card:hover {
  border-color: #075fb8;
  box-shadow: 0 18px 38px rgba(7, 31, 74, .17);
  transform: translateY(-3px);
}

body.cdx-public-system-final .cdx-progressive-card:focus-visible,
body.cdx-public-system-final .cdx-progressive-more:focus-visible {
  outline: 5px solid var(--cdx-card-focus);
  outline-offset: 5px;
  box-shadow: 0 0 0 3px #071f4a;
}

body.cdx-public-system-final .cdx-progressive-card[hidden] {
  display: none !important;
}

body.cdx-public-system-final .cdx-progressive-controls {
  display: flex;
  justify-content: center;
  margin-block: 24px 42px;
}

body.cdx-public-system-final .cdx-progressive-more {
  min-height: 56px;
  padding: 14px 24px;
  border: 2px solid #075fb8;
  border-radius: 18px;
  background: #fff;
  color: #075fb8;
  font: inherit;
  font-weight: 900;
  text-transform: none;
  cursor: pointer;
}

body.cdx-public-system-final .cdx-progressive-more:hover {
  background: #eaf4ff;
}

body.cdx-public-system-final .cdx-visually-hidden {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Deuxième niveau : l’ancre choisie devient le seul parcours visible. */
body.cdx-pathway-candidate .cd-grid:has(> .cd-card:target) {
  display: block;
}

body.cdx-pathway-candidate .cd-grid:has(> .cd-card:target) > .cd-card:not(:target) {
  display: none;
}

body.cdx-pathway-candidate .cd-card:target {
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 40px);
  border: 2px solid #bed3e7;
  border-top-width: 7px;
  border-radius: 30px;
  background: linear-gradient(145deg, #fff 20%, #f3f9ff 100%);
}

body.cdx-pathway-candidate .cd-card:target .cdx-human-photo {
  max-width: 420px;
  margin: 0 0 24px;
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 28px;
}

body.cdx-pathway-candidate .cd-card:target .cdx-next-title {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
  color: var(--cdx-card-ink);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.2;
}

body.cdx-pathway-candidate .cdx-next-title {
  display: none;
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn {
  position: relative;
  display: grid;
  place-items: end start;
  min-height: 180px;
  padding: 86px 26px 26px;
  border: 2px solid #b6cde2;
  border-inline-start: 8px solid #1769c2;
  border-radius: 26px;
  background: linear-gradient(145deg, #fff 20%, #eef7ff 100%);
  color: var(--cdx-card-ink);
  box-shadow: 0 12px 30px rgba(7, 31, 74, .10);
  font-size: 1.1rem;
  text-align: start;
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn::before {
  position: absolute;
  inset-block-start: 24px;
  inset-inline-start: 26px;
  display: grid;
  place-items: center;
  inline-size: 58px;
  block-size: 58px;
  border: 2px solid #bfd9ef;
  border-radius: 18px 30px 18px 30px;
  background: #e6f3ff;
  color: #075fb8;
  content: "✉";
  font-size: 1.9rem;
  line-height: 1;
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn:nth-of-type(2) {
  border-color: #a8d2b7;
  border-inline-start-color: #218348;
  background: linear-gradient(145deg, #fff 20%, #edf9f1 100%);
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn:nth-of-type(2)::before {
  border-color: #b7dbc3;
  border-radius: 50%;
  background: #e5f6eb;
  color: #176c38;
  content: "⌕";
}

body.cdx-pathway-candidate #aidant:target .cd-path-actions .cd-btn:first-of-type::before {
  content: "▤";
}

body.cdx-pathway-candidate #aidant:target .cd-path-actions .cd-btn:nth-of-type(2)::before {
  content: "◇";
}

body.cdx-pathway-candidate #professionnel:target .cd-path-actions .cd-btn::before {
  content: "▣";
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn:hover {
  border-color: #075fb8;
  box-shadow: 0 18px 38px rgba(7, 31, 74, .17);
  transform: translateY(-3px);
}

body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn:focus-visible {
  outline: 5px solid var(--cdx-card-focus);
  outline-offset: 5px;
  box-shadow: 0 0 0 3px #071f4a;
}

@media (max-width: 900px) {
  body.cdx-pathway-candidate .cd-card:target .cd-path-actions {
    grid-template-columns: 1fr;
  }

  body.cdx-pathway-candidate .cd-card:target .cd-path-actions .cd-btn {
    min-height: 156px;
  }
}

/* Page d’aide : les trois portes d’entrée sont les seules décisions initiales. */
.cdx-help-candidate .doc-hero {
  max-width: none;
  margin-bottom: 24px;
  padding: clamp(24px, 3vw, 36px);
  border: 2px solid #bed3e7;
  background:
    radial-gradient(circle at 88% 18%, rgba(87, 215, 255, .18), transparent 18rem),
    linear-gradient(135deg, #ffffff, #eef7ff);
  box-shadow: 0 16px 38px rgba(7, 31, 74, .10);
}

.cdx-help-candidate .doc-hero :is(h1, p) {
  color: var(--cdx-card-ink);
}

.cdx-help-candidate .doc-hero .eyebrow {
  color: #075fb8;
}

.cdx-help-candidate .doc-hero p:last-child {
  max-width: 60ch;
  margin-bottom: 0;
}

/* Contenu long : colonne lisible, navigation secondaire distincte du texte. */
.cdx-long-content-candidate .kb-article {
  max-width: 1040px;
  margin-inline: auto;
}

.cdx-guide-entry {
  margin-block: 28px 34px;
  padding-block: 26px;
  border-block: 1px solid #d7e4f0;
}

.cdx-guide-entry > h2 {
  margin: 0;
  color: var(--cdx-card-ink);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.cdx-guide-entry > p {
  margin: 8px 0 20px;
  color: #40536b;
}

.cdx-guide-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cdx-guide-entry-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 148px;
  padding: 22px;
  border: 2px solid var(--cdx-card-border);
  border-radius: 24px;
  background: #fff;
  color: var(--cdx-card-ink);
  box-shadow: 0 10px 28px rgba(7, 31, 74, .09);
  text-decoration: none;
}

.cdx-guide-entry-card:hover {
  border-color: var(--cdx-card-blue);
  box-shadow: 0 16px 34px rgba(7, 31, 74, .16);
}

.cdx-guide-entry-card:focus-visible {
  outline: 5px solid var(--cdx-card-focus);
  outline-offset: 5px;
}

.cdx-guide-entry-picto {
  display: grid;
  place-items: center;
  inline-size: 76px;
  block-size: 76px;
  border-radius: 24px 34px 24px 34px;
  background: #eaf4ff;
  color: #075fb8;
  font-size: 2.35rem;
  font-weight: 900;
}

.cdx-guide-entry-card strong {
  font-size: 1.35rem;
  line-height: 1.2;
}

.cdx-long-content-candidate .kb-section p,
.cdx-long-content-candidate .kb-section li,
.cdx-long-content-candidate .kb-lead {
  max-width: 72ch;
}

.cdx-long-content-candidate .kb-related:not(.kb-related-dense) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cdx-long-content-candidate .kb-related a {
  min-height: 126px;
  align-content: center;
  border-width: 2px;
  border-radius: 22px;
  padding: 22px;
}

/* Bas de page : fonctions légales conservées, liens moins concurrents. */
.cdx-nav-system-candidate > footer {
  gap: 28px;
  padding-block: 34px;
}

.cdx-nav-system-candidate > footer nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 22px;
}

.cdx-nav-system-candidate > footer nav a {
  min-height: 44px;
  align-content: center;
  text-transform: none;
}

@media (max-width: 900px) {
  :root {
    --cdx-nav-height: 66px;
    --cdx-nav-clearance: 84px;
  }

  .cdx-choice-grid,
  .cdx-guides-candidate .kb-family-grid,
  .cdx-long-content-candidate .kb-related:not(.kb-related-dense),
  body.cdx-public-system-final .cdx-progressive-grid {
    grid-template-columns: 1fr;
  }

  .cdx-choice-card {
    min-height: 240px;
  }

  .cdx-guides-candidate .kb-family-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.cdx-nav-system-candidate .nav .brand img[src] {
    width: 160px;
    max-width: 160px;
    max-height: 54px;
  }

  /* Les trois niveaux restent dans le bouton Accessibilité du bandeau. */
  .cdx-nav-system-candidate .cdx-falc-entry {
    display: none;
  }

  /* Sur l’accueil, "Accueil" seul n’aide pas à se repérer. */
  .cdx-home-redesign.cdx-nav-system-candidate .cdx-page-location {
    display: none;
  }

  .cdx-choice-grid {
    gap: 22px;
    margin-block: 20px 34px;
  }

  .cdx-choice-card {
    min-height: 230px;
    gap: 13px;
    padding: 28px 22px;
    border-radius: 26px;
  }

  .cdx-choice-picto {
    inline-size: 92px;
    block-size: 92px;
    font-size: 3rem;
  }

  body.cdx-public-system-final .cdx-progressive-grid {
    gap: 20px;
  }

  body.cdx-public-system-final .cdx-progressive-card {
    grid-template-columns: 76px 1fr;
    min-height: 150px;
    padding: 20px 18px;
    border-radius: 24px;
  }

  body.cdx-public-system-final .cdx-progressive-picto {
    inline-size: 76px;
    block-size: 76px;
    font-size: 2.1rem;
  }

  body.cdx-public-system-final .cdx-progressive-more {
    inline-size: 100%;
  }

  .cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card .cdx-card-icon {
    inline-size: 100px;
    block-size: 100px;
  }

  .cdx-home-redesign.cdx-nav-system-candidate .cdx-start-card .cdx-card-icon svg {
    inline-size: 56px;
    block-size: 56px;
  }

  .cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon {
    inline-size: 82px;
    block-size: 82px;
  }

  .cdx-home-redesign.cdx-nav-system-candidate .cdx-action-icon svg {
    inline-size: 46px;
    block-size: 46px;
  }

  .cdx-guides-candidate .kb-family summary {
    grid-template-columns: 82px 1fr auto;
    gap: 15px;
    min-height: 174px;
    padding: 22px 18px;
    border-radius: 26px;
  }

  .cdx-guides-candidate .kb-family summary .cdx-family-picto {
    inline-size: 82px;
    block-size: 82px;
    font-size: 2.6rem;
  }

  .cdx-guides-candidate .kb-family summary .cdx-family-picto svg {
    inline-size: 54px;
    block-size: 54px;
  }

  .cdx-guides-candidate .kb-family summary .cdx-family-count { position: static; }

  .cdx-nav-system-candidate > footer nav {
    grid-template-columns: 1fr 1fr;
  }

  .cdx-guide-entry-grid {
    grid-template-columns: 1fr;
  }

  .cdx-guide-entry-card {
    min-height: 126px;
  }
}

@media (max-width: 360px) {
  :root {
    --cdx-nav-height: 60px;
    --cdx-nav-clearance: 76px;
  }

  .cdx-nav-system-candidate .nav {
    min-height: 60px;
    padding-inline: 8px;
  }

  body.cdx-nav-system-candidate .nav .brand img[src] {
    width: 140px;
    max-width: 140px;
  }

  .cdx-nav-system-candidate .nav-menu-toggle {
    min-width: 46px;
  }

  body.cdx-public-system-final .cdx-progressive-card {
    grid-template-columns: 68px 1fr;
    gap: 8px 14px;
    min-height: 142px;
    padding: 18px 14px;
  }

  body.cdx-public-system-final .cdx-progressive-picto {
    inline-size: 68px;
    block-size: 68px;
    font-size: 1.9rem;
  }

  .cdx-guides-candidate .kb-family summary {
    grid-template-columns: 70px 1fr 38px;
    gap: 10px;
    min-height: 158px;
    padding: 18px 14px;
  }

  .cdx-guides-candidate .kb-family summary .cdx-family-picto {
    inline-size: 70px;
    block-size: 70px;
    font-size: 2.25rem;
  }

  .cdx-guides-candidate .kb-family summary .cdx-family-picto svg {
    inline-size: 46px;
    block-size: 46px;
  }

  .cdx-guides-candidate .kb-family summary::after {
    inline-size: 38px;
    block-size: 38px;
  }

  .cdx-guides-candidate .kb-family summary .cdx-family-count { position: static; }

  .cdx-nav-system-candidate > footer nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cdx-choice-card,
  .cdx-guides-candidate .kb-family summary {
    scroll-behavior: auto;
    transition: none;
  }
}

@media (forced-colors: active) {
  .cdx-choice-card,
  .cdx-guides-candidate .kb-family summary,
  .cdx-guides-candidate .kb-family-links a {
    border: 2px solid ButtonText;
  }

  .cdx-choice-card:focus-visible,
  .cdx-nav-system-candidate .kb-family summary:focus-visible,
  .cdx-nav-system-candidate .kb-family-links a:focus-visible {
    outline: 4px solid Highlight;
  }
}
