/* Accueil uniquement : fond bleu glacé, claviers AZERTY, coques ivoire et lavande grisée.
   Géométrie, illustration, boutons orange, header et footer conservés. */
:root body.v2-home {
  --ui-width: 1180px;
  --dm-home-ivory: var(--dm-surface-ivory);
  --dm-home-ivory-line: var(--dm-surface-ivory-border);
  --dm-home-lav: #f2edf8;
  --dm-home-lav-line: #d4c9e2;
  --dm-home-hero-border: var(--dm-home-ivory-line);
  --dm-home-hero-shadow: 0 3px 0 #e7d8c866, 0 12px 26px #3d2c1e14;
  --dm-home-lav-shadow: 0 3px 0 #ddd4e866, 0 12px 26px #2c243814;
  --dm-home-rail: #2457d614;
  background: #e7f1fb;
}

/* Ruban décoratif sous le menu : repère de frappe sans animation */
:root body.v2-home .top-bar {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  border-bottom: 1px solid var(--ui-line);
  box-shadow: 0 10px 28px rgba(12, 43, 92, 0.05);
}
:root body.v2-home .top-bar::after { content: none; }

:root body.v2-home .v2-main {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

:root body.v2-home .v2-wrap {
  max-width: var(--ui-width);
  padding-inline: 0;
  position: relative;
  z-index: 1;
}

:root body.v2-home .dm-block.v2-wrap {
  padding: var(--block-padding);
  margin-top: clamp(16px, 3vw, 28px);
}

/* Hero : carte ivoire, l’illustration approuvée reste inchangée. */
:root body.v2-home .v2-hero {
  padding: 18px 0 0;
  margin: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
:root body.v2-home .v2-hero > .v2-wrap {
  padding-block: clamp(14px, 1.4vw, 20px);
  padding-inline: clamp(18px, 3vw, 32px);
  border-radius: clamp(22px, 3vw, 32px);
  background: var(--dm-home-ivory);
  border: 1px solid var(--dm-home-hero-border);
  box-shadow: var(--dm-home-hero-shadow);
}
:root body.v2-home .v2-hero > .v2-wrap::before { content: none; }
:root body.v2-home .v2-hero > .v2-wrap > * {
  position: relative;
  z-index: 1;
}

:root body.v2-home .v2-hero-top {
  min-height: 0;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  margin-bottom: 0;
  align-items: center;
}
:root body.v2-home .v2-hero-top::before {
  display: none;
}

:root body.v2-home .v2-hero-copy {
  padding: 0;
  align-self: center;
}
:root body.v2-home .v2-hero-copy::before { content: none; display: none; }

:root body.v2-home .v2-hero-title {
  font-size: clamp(2.15rem, 3.8vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.038em;
  margin: 0 0 14px;
  color: var(--ui-ink);
  text-shadow: none;
}
:root body.v2-home .v2-hero-title em {
  font-style: normal;
  color: var(--ui-brand);
}

:root body.v2-home .v2-lead {
  font-size: clamp(15px, 1.05rem + 0.2vw, 17px);
  line-height: 1.68;
  max-width: 46ch;
  margin: 0 0 20px;
  color: var(--ui-muted);
}

:root body.v2-home .v2-hero-cta {
  gap: 12px;
  flex-wrap: wrap;
}

/* Illustration hero : halo bleu doux + léger relief (hérite du masque existant) */
:root body.v2-home .v2-home-art {
  position: relative;
  min-width: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 22px 36px rgba(20, 55, 130, 0.14));
}
:root body.v2-home .v2-home-art::after {
  content: "";
  position: absolute;
  inset: 8% 4% 12%;
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 45%, rgba(36, 87, 214, 0.1), transparent 68%);
  pointer-events: none;
  z-index: -1;
}
:root body.v2-home .v2-home-art--hero {
  position: relative;
  width: 100%;
  aspect-ratio: 2160 / 1076;
  align-self: center;
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(to bottom, transparent, #000 9%, #000 88%, transparent);
  mask-composite: intersect;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(to bottom, transparent, #000 9%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
}

/* Les enveloppes ont exactement le même bord extérieur que hero et daily. */
:root body.v2-home .v2-band {
  position: relative;
  padding: 0;
  margin: clamp(16px, 3vw, 28px) 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
:root body.v2-home .v2-band::before { content: none; }
:root body.v2-home #activites {
  background: var(--dm-home-ivory);
  border: 1px solid var(--dm-home-ivory-line);
  box-shadow: var(--dm-home-lav-shadow);
}
:root body.v2-home #ressources {
  background: var(--dm-home-ivory);
  border: 1px solid var(--dm-home-ivory-line);
  box-shadow: var(--dm-home-lav-shadow);
}
:root body.v2-home #dm-home-activity {
  background: var(--dm-home-ivory);
  border: 1px solid var(--dm-home-ivory-line);
  box-shadow: var(--dm-home-hero-shadow);
}
:root body.v2-home #dm-home-activity > .dm-block-heading {
  margin-bottom: 6px;
  align-items: center;
}
:root body.v2-home #dm-home-activity > .dm-block-heading .dm-icon {
  color: #fff;
  background: #6a4a32;
  border: 0;
}
:root body.v2-home #dm-home-activity .dm-block-subtitle {
  margin-top: 2px;
  font-size: 0.95rem;
  line-height: 1.35;
}
:root body.v2-home #dm-home-activity > .dm-block-body {
  margin-top: 4px;
}
:root body.v2-home .site-footer {
  margin-top: 28px;
  background: #223b56;
  color: #fff;
}

@media (max-width: 650px) {
  :root body.v2-home .v2-hero-top {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
  }
  :root body.v2-home .v2-hero-copy {
    padding: 6px 0 8px;
  }
  :root body.v2-home .v2-home-art--hero {
    margin-block: 8px;
  }
  :root body.v2-home .v2-hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root body.v2-home *,
  :root body.v2-home *::before,
  :root body.v2-home *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
}

/* Une seule colonne dans le panneau parent : l'entête reste toujours seule.
   Seul le contenu intérieur passe sur deux colonnes quand la place le permet. */
:root body.v2-home #texte-du-jour {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  background: var(--dm-home-ivory);
  border: 1px solid var(--dm-home-ivory-line);
  box-shadow: var(--dm-home-hero-shadow);
}
:root body.v2-home .dm-daily-content { min-width: 0; }
:root body.v2-home .dm-daily-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: start;
  gap: 14px 18px;
  min-width: 0;
}
:root body.v2-home .dm-daily-card {
  min-width: 0;
  padding: var(--tile-padding);
  border: 1px solid #ead9c6;
  border-radius: var(--ui-radius);
  background: #fff;
  box-shadow: inset 4px 0 #e8955a;
}
:root body.v2-home .dm-daily-card .dm-tile-title { font-size: 21px; }
:root body.v2-home .dm-daily-card .v2-chips { margin: 10px 0 0; }
:root body.v2-home .dm-daily-details { min-width: 0; }
:root body.v2-home .dm-daily-card .v2-btn {
  text-align: center;
  white-space: normal;
  width: 100%;
}
:root body.v2-home .dm-daily-card .dm-tile-description { margin: 10px 0 0; }
:root body.v2-home #texte-du-jour > .dm-block-status-row {
  padding-top: 10px;
  border-top: 1px solid #ead9c6;
}
:root body.v2-home #texte-du-jour .dm-icon {
  color: #fff;
  background: #c8682e;
}
:root body.v2-home #texte-du-jour .dm-block-title a,
:root body.v2-home #texte-du-jour .dm-tile-title a {
  color: #16325a;
}
:root body.v2-home #texte-du-jour .dm-tile-description,
:root body.v2-home #texte-du-jour .dm-block-subtitle {
  color: #5c3f2e;
}
@media (max-width: 650px) {
  :root body.v2-home .dm-daily-card { grid-template-columns: minmax(0, 1fr); }
}

/* Claviers AZERTY décoratifs dans les marges (fond bleu), jamais sur les panneaux. */
:root body.v2-home .dm-home-keyboard-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
:root body.v2-home .dm-home-kb {
  position: absolute;
  background: url("/v2/home-keys.svg?v=20261112visual3") center / contain no-repeat;
  opacity: 0.5;
}
:root body.v2-home .dm-home-kb--1 {
  left: max(-28px, calc(50% - 670px));
  top: 200px;
  width: 210px;
  height: 147px;
  transform: rotate(-10deg);
}
:root body.v2-home .dm-home-kb--2 {
  right: max(-36px, calc(50% - 678px));
  top: 760px;
  width: 168px;
  height: 118px;
  transform: rotate(8deg);
}
:root body.v2-home .dm-home-kb--3 {
  left: max(-52px, calc(50% - 580px));
  top: 1080px;
  width: 150px;
  height: 105px;
  opacity: 0.38;
  transform: rotate(14deg);
}

/* Activités — coque lavande grisée, tuiles blanches, accent abricot sur le test minute. */
:root body.v2-home #activites > .dm-block-heading .dm-icon {
  color: #fff;
  background: #1d4f8f;
  border: 0;
}
:root body.v2-home #activites .dm-tile-grid > .dm-tile:nth-child(1),
:root body.v2-home #activites .dm-tile-grid > .dm-tile:nth-child(2),
:root body.v2-home #activites .dm-tile-grid > .dm-tile:nth-child(3) {
  --card-accent: #1d4f8f;
  --card-surface: var(--dm-surface-subcard);
  --card-edge: #ddd4e6;
}
:root body.v2-home #activites .dm-tile-grid > .dm-tile:nth-child(4) {
  --card-accent: #e8955a;
  --card-surface: #fff8f2;
  --card-edge: #e8c4a4;
}
:root body.v2-home #activites .dm-tile {
  border: 1px solid var(--card-edge);
  border-top: 3px solid var(--card-accent);
  background: var(--card-surface);
  box-shadow: none;
}
:root body.v2-home #activites .dm-tile:hover,
:root body.v2-home #activites .dm-tile:focus-visible {
  border-color: var(--card-accent);
  background: #fff;
  box-shadow: 0 6px 16px #2c243814;
}
:root body.v2-home #activites .dm-tile:nth-child(4):hover,
:root body.v2-home #activites .dm-tile:nth-child(4):focus-visible {
  background: #fffaf6;
}
:root body.v2-home #activites .dm-tile:visited {
  color: var(--ui-ink);
}
:root body.v2-home #activites .dm-tile .dm-icon {
  color: #16325a;
  background: #f7f4fb;
  border: 1px solid var(--card-edge);
}
:root body.v2-home #activites .dm-tile-arrow {
  color: var(--card-accent);
}

/* Pourquoi apprendre — coque blanche, liseré lavande, une seule touche abricot. */
:root body.v2-home #ressources > .dm-block-heading .dm-icon {
  color: #fff;
  background: #1d4f8f;
  border: 0;
}
:root body.v2-home #ressources .dm-tile-grid > .dm-tile:nth-child(1),
:root body.v2-home #ressources .dm-tile-grid > .dm-tile:nth-child(2) {
  --card-accent: #1d4f8f;
  --card-surface: var(--dm-surface-subcard);
  --card-edge: #e6d9c8;
}
:root body.v2-home #ressources .dm-tile-grid > .dm-tile:nth-child(3) {
  --card-accent: #e8955a;
  --card-surface: #fffaf4;
  --card-edge: #e8c4a4;
}
:root body.v2-home #ressources .dm-tile {
  border: 1px solid var(--card-edge);
  border-top: 3px solid var(--card-accent);
  background: var(--card-surface);
  box-shadow: none;
}
:root body.v2-home #ressources .dm-tile:hover,
:root body.v2-home #ressources .dm-tile:focus-visible {
  border-color: var(--card-accent);
  background: #fff;
  box-shadow: 0 6px 16px #3d2c1e12;
}
:root body.v2-home #ressources .dm-tile:nth-child(3):hover,
:root body.v2-home #ressources .dm-tile:nth-child(3):focus-visible {
  background: #fffaf6;
}
:root body.v2-home #ressources .dm-tile:visited {
  color: var(--ui-ink);
}
:root body.v2-home #texte-du-jour .dm-block-title a:visited,
:root body.v2-home #texte-du-jour .dm-tile-title a:visited {
  color: #16325a;
}
:root body.v2-home #ressources .dm-tile .dm-icon {
  color: #16325a;
  background: #fbf8f4;
  border: 1px solid var(--card-edge);
}
:root body.v2-home #ressources .dm-tile-arrow {
  color: var(--card-accent);
}

@media (max-width: 650px) {
  :root body.v2-home .dm-home-kb {
    opacity: 0.4;
  }
  :root body.v2-home .dm-home-kb--1 {
    left: -40px;
    top: 160px;
    width: 140px;
    height: 98px;
  }
  :root body.v2-home .dm-home-kb--2 {
    right: -48px;
    top: 980px;
    width: 120px;
    height: 84px;
  }
  :root body.v2-home .dm-home-kb--3 {
    display: none;
  }
}

/* Recettage : surfaces chaudes partagées, contraste sobre. */

:root body.v2-home #ressources > .dm-block-heading .dm-icon { color: #7a401a; background: #f5d6ab; }
:root body.v2-home #ressources .dm-tile-grid > .dm-tile:nth-child(n) { --card-accent: #b87a45; --card-edge: #e2d1b7; --card-surface: #fffdf8; }
:root body.v2-home #ressources .dm-tile-grid > .dm-tile:nth-child(2) { --card-surface: var(--dm-surface-subcard-alt); }
:root body.v2-home #ressources .dm-tile-grid > .dm-tile:nth-child(3) { --card-surface: var(--dm-surface-subcard-peach); }

:root body.v2-home #activites .dm-tile:nth-child(2) { --card-surface: var(--dm-surface-subcard-alt); }
