/* Japan World — accueil éditorial. Tout est isolé sous .jw-home-shell. */
.jw-home-shell {
  --jw-home-blue: #014471;
  --jw-home-blue-2: #1687c9;
  --jw-home-accent: #15b4ed;
  --jw-home-ink: #1f2933;
  --jw-home-muted: #65717a;
  --jw-home-soft: #f5f8fa;
  --jw-home-soft-blue: #eef7fb;
  --jw-home-line: #dce4e8;
  --jw-home-shadow: 0 12px 28px rgba(1, 68, 113, 0.08);
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
  color: var(--jw-home-ink);
  font-size: 1rem;
  line-height: 1.6;
  box-sizing: border-box;
}

.jw-home-shell *,
.jw-home-shell *::before,
.jw-home-shell *::after {
  box-sizing: border-box;
}

.jw-home-shell h1,
.jw-home-shell h2,
.jw-home-shell h3,
.jw-home-shell p {
  margin-top: 0;
}

.jw-home-shell h1,
.jw-home-shell h2,
.jw-home-shell h3 {
  color: var(--jw-home-blue);
  line-height: 1.2;
  text-wrap: balance;
}

.jw-home-shell h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.jw-home-shell h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 680;
  letter-spacing: -0.02em;
}

.jw-home-shell a {
  color: var(--jw-home-blue-2);
}

.jw-home-shell a:focus-visible,
.jw-home-shell button:focus-visible {
  outline: 3px solid rgba(21, 180, 237, 0.35);
  outline-offset: 3px;
}

.jw-home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.65fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  padding: 0.25rem 0 clamp(2rem, 5vw, 3.25rem);
  border-bottom: 1px solid var(--jw-home-line);
}

.jw-home-kicker {
  margin-bottom: 0.45rem;
  color: var(--jw-home-blue-2);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}

.jw-home-intro__lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--jw-home-muted);
  font-size: clamp(1.02rem, 1.7vw, 1.17rem);
}

.jw-home-intro__note {
  margin-bottom: 0;
  padding: 0.3rem 0 0.3rem 1.05rem;
  color: var(--jw-home-muted);
  border-left: 3px solid var(--jw-home-accent);
  font-size: 0.94rem;
}

.jw-home-section {
  padding: clamp(2.4rem, 6vw, 4.75rem) 0;
  border-bottom: 1px solid var(--jw-home-line);
}

.jw-home-section:last-child {
  border-bottom: 0;
}

.jw-home-section__head {
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: clamp(1.15rem, 3vw, 1.8rem);
}

.jw-home-section__head .jw-home-kicker {
  margin-bottom: 0.35rem;
}

.jw-home-section__link {
  flex: 0 0 auto;
  padding-bottom: 0.15rem;
  color: var(--jw-home-blue-2) !important;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none !important;
  white-space: nowrap;
}

.jw-home-section__link:hover {
  color: var(--jw-home-blue) !important;
  text-decoration: underline !important;
  text-underline-offset: 0.2em;
}

.jw-home-slot:empty::before {
  content: "Les contenus seront bientôt disponibles.";
  display: block;
  padding: 1.25rem;
  color: var(--jw-home-muted);
  background: var(--jw-home-soft);
  border: 1px dashed var(--jw-home-line);
  border-radius: 10px;
  text-align: center;
}

/* Normalisation du gabarit « news » du module universel FLEXIcontent. */
.jw-home-slot .moduletable,
.jw-home-slot .custom,
.jw-home-slot [id^="mod_flexicontent_news"] {
  width: 100%;
  margin: 0;
  padding: 0;
}

.jw-home-slot .mod_flexicontent_standard {
  margin: 0 !important;
  padding: 0 !important;
}

.jw-home-slot .mod_flexicontent_standard::after {
  content: "";
  display: block;
  clear: both;
}

.jw-home-slot .mod_flexicontent_standard_wrapper {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  color: var(--jw-home-ink);
  background: #fff;
  border: 1px solid var(--jw-home-line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(1, 68, 113, 0.045);
  overflow: hidden;
}

.jw-home-slot .image_standard,
.jw-home-slot .image_featured,
.jw-home-slot [class*="image_"] {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: var(--jw-home-soft);
  overflow: hidden;
}

.jw-home-slot .image_standard a,
.jw-home-slot .image_featured a,
.jw-home-slot [class*="image_"] a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.jw-home-slot .image_standard img,
.jw-home-slot .image_featured img,
.jw-home-slot [class*="image_"] img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 auto !important;
  object-fit: contain !important;
}

.jw-home-slot .content_standard,
.jw-home-slot .content_featured,
.jw-home-slot [class*="content_"] {
  min-width: 0;
  padding: 0.9rem 1rem;
}

.jw-home-slot .fcitem_title,
.jw-home-slot .title_standard,
.jw-home-slot .mod_flexicontent_title,
.jw-home-slot .content_standard h3,
.jw-home-slot .content_standard h4 {
  margin: 0;
  color: var(--jw-home-blue);
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.35;
}

.jw-home-slot .fcitem_title a,
.jw-home-slot .title_standard a,
.jw-home-slot .mod_flexicontent_title a,
.jw-home-slot .content_standard h3 a,
.jw-home-slot .content_standard h4 a {
  color: var(--jw-home-blue) !important;
  text-decoration: none !important;
}

.jw-home-slot .fcitem_title a:hover,
.jw-home-slot .title_standard a:hover,
.jw-home-slot .mod_flexicontent_title a:hover,
.jw-home-slot .content_standard h3 a:hover,
.jw-home-slot .content_standard h4 a:hover {
  color: var(--jw-home-blue-2) !important;
}

.jw-home-slot .date,
.jw-home-slot [class*="date_"],
.jw-home-slot .fcitem_date,
.jw-home-slot .category,
.jw-home-slot [class*="category_"] {
  color: var(--jw-home-muted);
  font-size: 0.76rem;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
}

.jw-home-slot .description_standard,
.jw-home-slot .fcitem_text,
.jw-home-slot .fcitem_introtext {
  margin-top: 0.55rem;
  color: var(--jw-home-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* À lire en ce moment : un sujet principal et trois brèves. */
.jw-home-slot--reading .mod_flexicontent_standard {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 0.85rem;
  align-items: stretch !important;
  overflow: visible !important;
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child {
  grid-row: span 3;
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .image_standard,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .image_featured,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child [class*="image_"] {
  aspect-ratio: 16 / 9;
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .content_standard,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child [class*="content_"] {
  padding: 1.2rem 1.3rem 1.35rem;
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .fcitem_title,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .title_standard,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .content_standard h3,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child .content_standard h4 {
  font-size: clamp(1.2rem, 2.1vw, 1.55rem);
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) {
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 112px;
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) .image_standard,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) .image_featured,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) [class*="image_"] {
  height: 100%;
  min-height: 112px;
}

.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) .description_standard,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) .fcitem_text,
.jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) .fcitem_introtext {
  display: none;
}

/* Onglets du catalogue. */
.jw-home-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.2rem;
  padding: 0.15rem 0 0.45rem;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.jw-home-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  color: var(--jw-home-blue);
  background: #fff;
  border: 1px solid var(--jw-home-line);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.jw-home-tab:hover {
  border-color: var(--jw-home-blue-2);
}

.jw-home-tab[aria-selected="true"] {
  color: #fff;
  background: var(--jw-home-blue);
  border-color: var(--jw-home-blue);
}

.jw-home-panel[hidden] {
  display: none !important;
}

.jw-home-slot--catalog .mod_flexicontent_standard {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch !important;
  overflow: visible !important;
}

.jw-home-slot--catalog .mod_flexicontent_standard_wrapper {
  display: flex !important;
  flex-direction: column;
}

.jw-home-slot--catalog .image_standard,
.jw-home-slot--catalog .image_featured,
.jw-home-slot--catalog [class*="image_"] {
  aspect-ratio: 2 / 3;
}

.jw-home-panel[data-jw-panel="personnalites"] .image_standard,
.jw-home-panel[data-jw-panel="personnalites"] .image_featured,
.jw-home-panel[data-jw-panel="personnalites"] [class*="image_"] {
  aspect-ratio: 4 / 5;
}

.jw-home-panel[data-jw-panel="documentaires"] .image_standard,
.jw-home-panel[data-jw-panel="documentaires"] .image_featured,
.jw-home-panel[data-jw-panel="documentaires"] [class*="image_"] {
  aspect-ratio: 16 / 9;
}

.jw-home-slot--catalog .content_standard,
.jw-home-slot--catalog [class*="content_"] {
  flex: 1 1 auto;
  padding: 0.8rem 0.85rem 0.9rem;
}

.jw-home-slot--catalog .description_standard,
.jw-home-slot--catalog .fcitem_text,
.jw-home-slot--catalog .fcitem_introtext {
  display: none;
}

/* Trois regards sur le Japon. */
.jw-home-slot--japan .mod_flexicontent_standard {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch !important;
  overflow: visible !important;
}

.jw-home-slot--japan .mod_flexicontent_standard_wrapper {
  display: flex !important;
  flex-direction: column;
}

.jw-home-slot--japan .image_standard,
.jw-home-slot--japan .image_featured,
.jw-home-slot--japan [class*="image_"] {
  aspect-ratio: 16 / 9;
}

.jw-home-slot--japan .content_standard,
.jw-home-slot--japan [class*="content_"] {
  flex: 1 1 auto;
}

/* Dernier bilan mensuel. */
.jw-home-slot--monthly .mod_flexicontent_standard {
  display: block !important;
  overflow: visible !important;
}

.jw-home-slot--monthly .mod_flexicontent_standard_wrapper {
  display: grid !important;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  align-items: stretch;
  background: linear-gradient(135deg, #fff 0%, var(--jw-home-soft-blue) 100%);
  box-shadow: var(--jw-home-shadow);
}

.jw-home-slot--monthly .image_standard,
.jw-home-slot--monthly .image_featured,
.jw-home-slot--monthly [class*="image_"] {
  height: 100%;
  min-height: 250px;
  aspect-ratio: 16 / 9;
}

.jw-home-slot--monthly .content_standard,
.jw-home-slot--monthly [class*="content_"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 2.5rem);
}

.jw-home-slot--monthly .fcitem_title,
.jw-home-slot--monthly .title_standard,
.jw-home-slot--monthly .content_standard h3,
.jw-home-slot--monthly .content_standard h4 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

@media (hover: hover) {
  .jw-home-slot .mod_flexicontent_standard_wrapper {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  }

  .jw-home-slot .mod_flexicontent_standard_wrapper:hover {
    border-color: rgba(22, 135, 201, 0.4);
    box-shadow: var(--jw-home-shadow);
    transform: translateY(-2px);
  }
}

@media (max-width: 980px) {
  .jw-home-slot--catalog .mod_flexicontent_standard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .jw-home-slot--reading .mod_flexicontent_standard {
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  }
}

@media (max-width: 760px) {
  .jw-home-shell {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .jw-home-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .jw-home-intro__note {
    max-width: 560px;
  }

  .jw-home-section__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .jw-home-slot--reading .mod_flexicontent_standard {
    grid-template-columns: 1fr;
  }

  .jw-home-slot--reading .mod_flexicontent_standard_wrapper:first-child {
    grid-row: auto;
  }

  .jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .jw-home-slot--japan .mod_flexicontent_standard {
    grid-template-columns: 1fr;
  }

  .jw-home-slot--japan .mod_flexicontent_standard_wrapper {
    display: grid !important;
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
  }

  .jw-home-slot--monthly .mod_flexicontent_standard_wrapper {
    grid-template-columns: 1fr;
  }

  .jw-home-slot--monthly .image_standard,
  .jw-home-slot--monthly .image_featured,
  .jw-home-slot--monthly [class*="image_"] {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .jw-home-section {
    padding: 2.6rem 0;
  }

  .jw-home-section__link {
    white-space: normal;
  }

  .jw-home-slot--catalog .mod_flexicontent_standard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .jw-home-slot--catalog .content_standard,
  .jw-home-slot--catalog [class*="content_"] {
    padding: 0.7rem;
  }

  .jw-home-slot--reading .mod_flexicontent_standard_wrapper:not(:first-child) {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .jw-home-slot--japan .mod_flexicontent_standard_wrapper {
    grid-template-columns: 1fr;
  }
}

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

@media print {
  .jw-home-tabs,
  .jw-home-section__link {
    display: none !important;
  }

  .jw-home-panel[hidden] {
    display: block !important;
  }

  .jw-home-slot .mod_flexicontent_standard_wrapper {
    break-inside: avoid;
    box-shadow: none;
  }
}
