/*
 Theme Name: Revue de la Toile
 Theme URL: https://revuedelatoile.fr
 Description: Thème Mesa adapté pour La Revue de la Toile.
 Author: Revue de la Toile
 Version: 1.2
 */

/* =========================================================
 VARIABLES
 ========================================================= */

:root {

  --rlt-red: #A72222;
  --rlt-red-bright: #CA0505;

  --rlt-black: #000000;
  --rlt-text: #262223;

  --rlt-white: #FFFFFF;
  --rlt-grey: #9C8D8D;

  --rlt-border: #ded6d6;

  --rlt-max-width: 1280px;

  --rlt-transition: 180ms ease;

}

/* =========================================================
 BASE
 ========================================================= */

.rlt-home {
  color: var(--rlt-text);
  background: var(--rlt-white);
  font-family: "Montserrat", Arial, sans-serif;
}

.rlt-container {
  width: min(100% - 3rem, var(--rlt-max-width));
  margin-inline: auto;
}

/* =========================================================
 TYPOGRAPHIE
 ========================================================= */

.rlt-home h1,
.rlt-home h2,
.rlt-home h3,
.rlt-home h4 {
  font-family: "League Spartan", Arial, sans-serif;
  color: var(--rlt-text);
  line-height: 1.05;
  text-wrap: balance;
}

.rlt-home h1 {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.rlt-home h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin: 0;
}

.rlt-home h3 {
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
}

.rlt-home p {
  line-height: 1.65;
}

/* =========================================================
 HEADER
 ========================================================= */

.rlt-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  width: min(100% - 3rem, var(--rlt-max-width));
  margin-inline: auto;
  padding: 1.5rem 0;
}

.rlt-header-logo img.custom-logo {
  max-width: 150px;
  height: auto;
  display: block;
}

/*
 * Liste de navigation horizontale.
 */
#header ul {
display: flex;
flex-wrap: wrap;
gap: 1.25rem 1.5rem;
margin: 0;
padding: 0;
list-style: none;
}

#header ul li {
list-style: none;
margin: 0;
position: relative;
}

#header a {
color: var(--rlt-text);
font-family: "League Spartan", Arial, sans-serif;
font-weight: 700;
font-size: .95rem;
text-decoration: none;
}

#header a:hover {
color: var(--rlt-red);
}

/*
 * Sous-menus : masqués par défaut, déroulés au survol et au focus.
 */
#header ul.menu ul.sub-menu {
display: none;

position: absolute;
top: 100%;
left: 0;
z-index: 999;

min-width: 220px;
flex-direction: column;
gap: 0;

padding: .75rem 0;
margin: 0;

background: #FFFFFF;
border: 1px solid var(--rlt-border);
box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

#header ul li.menu-item-has-children:hover > ul.sub-menu,
#header ul li.menu-item-has-children:focus-within > ul.sub-menu {
display: flex;
flex-direction: column;
gap: 0;
}

#header ul ul li {
display: block;
padding: 0 1.25rem;
}

#header ul ul a {
display: block;
padding: .45rem 0;
font-size: .9rem;
font-weight: 400;
white-space: nowrap;
}

#header li.menu-item-has-children > a::after {
content: " ▾";
font-size: .8em;
opacity: .7;
}

/* =========================================================
 INTRODUCTION + MOTIF DEMI-TEINTE
 ========================================================= */

.rlt-hero-intro {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 10vw, 9rem);
  border-bottom: 1px solid var(--rlt-border);
}

.rlt-hero-intro::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  right: 0;

  width: min(480px, 40vw);
  height: min(280px, 28vw);

  background-image: radial-gradient(circle, var(--rlt-red-bright) 2.5px, transparent 3px);
  background-size: 13px 13px;

  -webkit-mask-image: linear-gradient(225deg, #000 20%, transparent 75%);
  mask-image: linear-gradient(225deg, #000 20%, transparent 75%);

  opacity: .9;
  pointer-events: none;
}

.rlt-hero-intro::after {
  content: "";
  position: absolute;
  top: 3rem;
  right: 4rem;

  width: min(260px, 22vw);
  height: min(150px, 20vw);

  background-image: radial-gradient(circle, var(--rlt-black) 2.5px, transparent 3px);
  background-size: 13px 13px;

  -webkit-mask-image: radial-gradient(ellipse at top left, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse at top left, #000 15%, transparent 75%);

  opacity: .5;
  pointer-events: none;
}

.rlt-kicker {
  margin: 0 0 1rem;
  color: var(--rlt-red);
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.rlt-hero-intro h1 {
  position: relative;
  max-width: 1050px;
  margin: 0;
}

.rlt-intro {
  max-width: 720px;
  margin: 2rem 0 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

/* =========================================================
 POINTS DÉCORATIFS
 ========================================================= */

.rlt-dots {
  position: absolute;
  bottom: 2.5rem;
  left: .25rem;

  display: flex;
  gap: .55rem;

  pointer-events: none;
}

.rlt-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f06a6a;
}

/* =========================================================
 TITRES DE SECTIONS — BARRE VERTICALE
 ========================================================= */

.rlt-section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.rlt-section-number {
  flex: 0 0 auto;
  color: var(--rlt-red);
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.rlt-section-heading h2 {
  position: relative;
  padding-left: 1.25rem;
}

.rlt-section-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  width: 4px;
  height: 80%;
  background: var(--rlt-red);
}

.rlt-section-heading-light h2 {
  color: #FFFFFF;
}

.rlt-section-heading-light h2::before {
  background: #FFFFFF;
}

.rlt-section-heading-light .rlt-section-number {
  color: #FFFFFF;
}

/* =========================================================
 À LA UNE
 ========================================================= */

.rlt-featured {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.rlt-featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.rlt-featured-article {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--rlt-black);
}

.rlt-featured-image {
  min-height: 420px;
  overflow: hidden;
}

.rlt-featured-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--rlt-transition);
}

.rlt-featured-image a:hover img {
  transform: scale(1.025);
}

.rlt-featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.rlt-featured-content h3 {
  margin: 1.25rem 0;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  color: #FFFFFF;
  overflow-wrap: break-word;
}

.rlt-featured-content h3 a {
  color: inherit;
  text-decoration: none;
}

.rlt-featured-content h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .12em;
}

.rlt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  color: #FFFFFF;
  font-size: .85rem;
}

.rlt-meta time {
  opacity: .85;
}

.rlt-category {
  display: inline-block;
  padding: .45rem .7rem;
  background: var(--rlt-red-bright);
  color: #FFFFFF;
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.rlt-excerpt {
  max-width: 60ch;
  margin: 0 0 2rem;
  color: #FFFFFF;
  opacity: .9;
}

/*
 * Mini-articles de la colonne latérale.
 */
.rlt-mini {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  background: #FFFFFF;
}

.rlt-mini + .rlt-mini {
  margin-top: 1.25rem;
}

.rlt-mini-image {
  width: 90px;
  height: 90px;
  overflow: hidden;
}

.rlt-mini-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.rlt-mini-content {
  padding: .75rem .75rem .75rem 0;
}

.rlt-mini-title {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.rlt-mini-title a {
  color: var(--rlt-text);
  text-decoration: none;
}

.rlt-mini-title a:hover {
  color: var(--rlt-red);
  text-decoration: underline;
}

.rlt-mini .rlt-card-date {
  font-size: .8rem;
}

/* =========================================================
 BOUTONS
 ========================================================= */

.rlt-button,
.rlt-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;

  width: fit-content;

  padding: .85rem 1.25rem;

  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;

  text-decoration: none;

  transition:
  background-color var(--rlt-transition),
  color var(--rlt-transition),
  border-color var(--rlt-transition);
}

.rlt-button {
  background: var(--rlt-red-bright);
  color: #FFFFFF;
}

.rlt-button:hover {
  background: #FFFFFF;
  color: var(--rlt-black);
}

.rlt-outline-button {
  border: 2px solid var(--rlt-red);
  color: var(--rlt-red);
  background: transparent;
}

.rlt-outline-button:hover {
  background: var(--rlt-red);
  color: #FFFFFF;
}

/* =========================================================
 DERNIÈRES PUBLICATIONS
 ========================================================= */

.rlt-latest {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: #f7f4f4;
}

.rlt-latest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.rlt-latest-header .rlt-section-heading {
  margin-bottom: 0;
}

.rlt-post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.rlt-card {
  background: #FFFFFF;
}

.rlt-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.rlt-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--rlt-transition);
}

.rlt-card-image:hover img {
  transform: scale(1.03);
}

.rlt-card-content {
  padding: 1.5rem;
}

.rlt-card-category {
  margin: 0 0 .8rem;
  color: var(--rlt-red);
  font-family: "League Spartan", Arial, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rlt-card-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.rlt-card-title a {
  color: var(--rlt-text);
  text-decoration: none;
}

.rlt-card-title a:hover {
  color: var(--rlt-red);
  text-decoration: underline;
}

.rlt-card-date {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  color: var(--rlt-grey);
  font-size: .85rem;
}

.rlt-see-all {
  display: inline-flex;
  align-items: center;
  gap: .5rem;

  color: var(--rlt-red);
  font-family: "League Spartan", Arial, sans-serif;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.rlt-see-all:hover {
  text-decoration: underline;
  text-underline-offset: .15em;
}

/* =========================================================
 EXPLORER
 ========================================================= */

.rlt-explore {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--rlt-red);
}

.rlt-explore-intro {
  max-width: 700px;
  margin-bottom: 3rem;
  color: #FFFFFF;
  font-size: 1.15rem;
}

.rlt-category-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,.65);
}

.rlt-category-list a {
  display: flex;
  align-items: center;
  gap: 1rem;

  padding: 1.2rem 0 1.2rem 2.6rem;
  position: relative;

  border-bottom: 1px solid rgba(255,255,255,.65);

  color: #FFFFFF;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;

  text-decoration: none;

  transition:
  padding-left var(--rlt-transition),
  background-color var(--rlt-transition);
}

.rlt-category-list a:hover {
  padding-left: 3.2rem;
  text-decoration: underline;
}

/*
 * Pastille circulaire devant chaque rubrique.
 */
.rlt-category-list a::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);

  width: 14px;
  height: 14px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

.rlt-category-list a:hover::after {
  background: #FFFFFF;
}

.rlt-arrow {
  display: none;
}

/* =========================================================
 TOPS & DOSSIERS
 ========================================================= */

.rlt-dossiers {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.rlt-dossier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.rlt-dossier {
  position: relative;
  overflow: hidden;
  background: var(--rlt-black);
}

.rlt-dossier a {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;

  color: #FFFFFF;
  text-decoration: none;
}

.rlt-dossier img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .78;
  transition: transform var(--rlt-transition);
}

.rlt-dossier:hover img {
  transform: scale(1.03);
}

.rlt-dossier-overlay {
  position: absolute;
  inset: auto 0 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .6rem;

  padding: 1.5rem;

  background: linear-gradient(
    transparent,
    rgba(0,0,0,.9)
  );
}

.rlt-dossier-label {
  color: #FFFFFF;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rlt-dossier-title {
  color: #FFFFFF;
  font-family: "League Spartan", Arial, sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
}

.rlt-dossier-arrow {
  color: #FFFFFF;
  font-size: 1.5rem;
}

/* =========================================================
 FOOTER
 ========================================================= */

.rlt-footer-brand {
  position: relative;
  overflow: hidden;

  padding: 4rem 1.5rem 3rem;
  margin-top: 3rem;

  background: #000000;
  color: #FFFFFF;
  text-align: center;
}

.rlt-footer-brand::before,
.rlt-footer-brand::after {
  content: "";
  position: absolute;
  bottom: -30px;

  width: 180px;
  height: 120px;

  background: var(--rlt-red);
  opacity: .9;
}

.rlt-footer-brand::before {
  left: -20px;
  clip-path: polygon(0 100%, 0 30%, 45% 55%, 35% 80%, 100% 100%, 0 100%);
}

.rlt-footer-brand::after {
  right: -20px;
  clip-path: polygon(100% 100%, 100% 35%, 65% 50%, 80% 75%, 55% 100%);
}

.rlt-footer-name {
  margin: 0 0 .5rem;

  font-family: "League Spartan", Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rlt-red-bright);
}

.rlt-footer-name a {
  color: inherit;
  text-decoration: none;
}

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

.rlt-footer-invite {
  max-width: 60ch;
  margin: 0 auto 1rem;
  color: #FFFFFF;
  opacity: .9;
  font-size: .95rem;
}

.rlt-footer-invite a {
  color: #FFFFFF;
}

.rlt-social-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1rem;
}

.rlt-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  color: #FFFFFF;
  text-decoration: none;

  transition: color var(--rlt-transition), transform var(--rlt-transition);
}

.rlt-social-links svg {
  width: 22px;
  height: 22px;
}

.rlt-social-links a:hover {
  color: var(--rlt-red-bright);
  transform: translateY(-2px);
}

.rlt-social-links a:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 4px;
}

.rlt-footer-copyright {
  text-align: center;
  margin-top: 2rem;

  color: var(--rlt-text);
  font-size: .85rem;
}

.rlt-footer-copyright a {
  color: var(--rlt-red);
  text-decoration: none;
}

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

/* =========================================================
 ACCESSIBILITÉ
 ========================================================= */

.rlt-home a:focus-visible,
.rlt-home button:focus-visible,
.rlt-home input:focus-visible,
#header a:focus-visible {
outline: 4px solid #000000;
outline-offset: 4px;
}

.rlt-featured a:focus-visible {
  outline-color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {

  .rlt-home *,
  .rlt-home *::before,
  .rlt-home *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}

/* =========================================================
 RESPONSIVE
 ========================================================= */

@media (max-width: 1100px) {

  .rlt-post-grid {
    grid-template-columns: repeat(3, 1fr);
  }

}

@media (max-width: 900px) {

  .rlt-featured-layout {
    grid-template-columns: 1fr;
  }

  .rlt-featured-image,
  .rlt-featured-image img {
    min-height: auto;
  }

  .rlt-post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rlt-category-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .rlt-dossier-grid {
    grid-template-columns: 1fr;
  }

  .rlt-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

}

@media (max-width: 600px) {

  .rlt-container {
    width: min(100% - 2rem, var(--rlt-max-width));
  }

  .rlt-dots {
    display: none;
  }

  .rlt-post-grid,
  .rlt-category-list {
    grid-template-columns: 1fr;
  }

  .rlt-featured-content {
    padding: 1.5rem;
  }

  .rlt-category-list a {
    padding-block: 1rem;
  }

  .rlt-latest-header {
    flex-direction: column;
    align-items: flex-start;
  }

}

/* =========================================================
 POLICES LOCALES
 ========================================================= */

@font-face {
  font-family: "League Spartan";
  src: url("assets/fonts/LeagueSpartan-VariableFont_wght.woff2") format("woff2-variations"),
       url("assets/fonts/LeagueSpartan-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/Montserrat-VariableFont_wght.woff2") format("woff2-variations"),
       url("assets/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Police du menu : identique sur toutes les pages */
#header .rlt-header-nav,
#header .rlt-header-nav ul,
#header .rlt-header-nav li,
#header .rlt-header-nav a {
font-family: "League Spartan", Arial, sans-serif;
}

/*
 * Lien social textuel (ex. LinkedIn en texte « in »).
 */
.rlt-social-links a.rlt-social-text {
  font-family: "League Spartan", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
}

/* =========================================================
 SOUS-MENUS PROFONDS (niveaux 3 et plus) : cascade à droite
 ========================================================= */

/*
 * Tous les sous-menus imbriqués au-delà du niveau 2 :
 * cachés par défaut, ancrés au coin supérieur droit de leur parent.
 * Le sélecteur ul.sub-menu ul.sub-menu couvre les niveaux 3, 4, 5…
 */
#header ul.menu ul.sub-menu ul.sub-menu {
  display: none;

  position: absolute;
  top: 0;
  left: 100%;

  min-width: 220px;
  z-index: 1000;

  /* Colle de 1px : compense la bordure pour que le survol ne se
   * "perde" pas dans l'espace entre le parent et le panneau. */
  margin: 0 -1px 0 0;
  padding: 0.5rem 0;

  background: #FFFFFF;
  border: 1px solid var(--rlt-border);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);

  list-style: none;
}

/* Affichage au survol et au focus clavier — spécificité supérieure aux règles génériques */
#header ul.menu ul li.menu-item-has-children:hover > ul.sub-menu,
#header ul.menu ul li.menu-item-has-children:focus-within > ul.sub-menu {
  display: block;
}

/* Surbrillance du lien parent dont le panneau est ouvert */
#header ul.menu ul li.menu-item-has-children:hover > a {
  color: var(--rlt-red);
}

/*
 * Chevron (dessiné en CSS pur, insensible aux variations de police)
 * sur les liens parents de niveau 2 et plus.
 * Le niveau 1 conserve sa flèche " ▾".
 */
#header ul.menu ul li.menu-item-has-children > a::after {
  content: "";

  display: inline-block;
  width: .35em;
  height: .35em;
  margin-left: .45em;

  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-.05em);

  opacity: .65;
}

/* =========================================================
   MASQUER LE TITRE DE PAGE SUR LES PAGES À BLOC HTML
   (chaque page a son propre H1 dans son bloc HTML)
   ========================================================= */

.page-id-1660 .wp-block-post-title,    /* Qui sommes-nous ? */
.page-id-10887 .wp-block-post-title,   /* Contact */
.page-id-11684 .wp-block-post-title,    /* Edito */
.page-id-533 .wp-block-post-title {   /* Nos Partenaires */
    display: none;
}