/* Accueil : une page, deux mises en page. Téléphone d'abord (référence 390 px), ordi à partir de
   900 px. Le balisage contient les deux : ce qui n'appartient pas à la largeur courante est caché. */

.barre-liens,
.barre .btn,
.vitrine,
.tout-telecharger,
.action-mot,
.pied-accueil .adresse {
  display: none;
}

.panneau :focus-visible,
.slogan :focus-visible,
.encadre-partage :focus-visible,
.pied-accueil :focus-visible {
  outline-color: var(--papier);
}

/* Hero : bande rouge et poing au-dessus du texte. */

.panneau {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-bottom: var(--filet);
  background: var(--rouge);
}

/* Centré par transform : l'animation « rise » joue sur la propriété translate, qui s'y ajoute. */
.poing {
  position: absolute;
  top: 26px;
  left: 50%;
  width: auto;
  max-width: none;
  height: 440px;
  transform: translateX(-50%);
}

.hero-texte {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px max(20px, env(safe-area-inset-right)) 30px max(20px, env(safe-area-inset-left));
}

.surtitre {
  color: var(--rouge);
  font: 800 12px/1.3 var(--font-texte);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* « PARTISAN·ES. » mesure environ 9,3 fois la taille de la police : il tient dans la largeur, marges
   de 20 px comprises, dès 320 px. */
.hero h1 {
  font-size: min(41px, 9.3vw);
  line-height: 1.08;
}

/* Découpe d'une ligne de titre : l'animation « line » la fait monter de dessous. La marge garde
   les accents des capitales dans la découpe. */
.ligne {
  display: block;
  overflow: hidden;
  padding-top: .06em;
  margin-top: -.06em;
}

.ligne > span {
  display: block;
}

.chapo {
  font-size: 18px;
  line-height: 1.45;
}

.hero-boutons {
  display: grid;
  gap: 12px;
}

.hero-boutons .btn {
  font-size: 19px;
}

/* Geste du jour, pour qui suit déjà des comptes : un bloc noir cliquable sous les boutons. */
.geste-du-jour {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: var(--noir);
  color: var(--papier);
  text-decoration: none;
}

.geste-du-jour:focus-visible {
  outline: 3px solid var(--rouge);
  outline-offset: 3px;
}

.geste-titre {
  color: var(--rouge);
  font: 800 12px/1 var(--font-texte);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.geste-compte {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
}

.geste-compte .avatar {
  margin-left: 0;
}

.geste-action {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero .discret {
  color: var(--gris);
  font-style: normal;
  font-size: 15px;
  line-height: 1.4;
}

/* Bandeau slogan */

.slogan {
  padding: 18px max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left));
  background: var(--noir);
  color: var(--papier);
  font: 400 min(22px, 6.6vw)/1.2 var(--font-titre);
  text-transform: uppercase;
}

.slogan .phrase,
.slogan .phrase > span {
  display: block;
}

.slogan .rouge {
  color: var(--rouge);
}

/* Les trois blocs de la consigne */

.bloc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px max(20px, env(safe-area-inset-right)) 26px max(20px, env(safe-area-inset-left));
}

.bloc + .bloc {
  border-top: var(--filet);
}

.bloc h2 {
  font-size: 24px;
  line-height: 1.2;
}

.bloc p {
  font-size: 17px;
  line-height: 1.5;
}

/* Réseaux de la liste, sous « Abonne-toi en quelques clics. ». */
.reseaux-dispo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.reseaux-dispo li {
  padding: 4px 8px;
  border: 1px solid var(--noir);
  font: 800 12px/1.3 var(--font-texte);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.bloc-rouge {
  position: relative;
  background: var(--rouge);
}

.bloc-rouge em {
  display: block;
  color: var(--papier);
  font-style: normal;
}

/* Voile papier qui se retire pendant l'animation « sweep » ; au repos, il ne couvre rien. */
.voile {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--papier) url(img/grain.png);
  clip-path: inset(0 0 0 100%);
  pointer-events: none;
}

/* Le coin Mise au poing : encadré noir, texte rouge, dans le bloc rouge. */
.bloc .coin-blocage {
  margin-top: 4px;
  padding: 14px 16px;
  background: var(--noir);
  color: var(--rouge);
  font-size: 15px;
  line-height: 1.45;
}

.coin-blocage a {
  color: var(--rouge);
  text-underline-offset: 3px;
}

.coin-blocage :focus-visible {
  outline-color: var(--papier);
}

/* Tête de section : titre, phrase et bouton (la liste, « Fais tourner »). */

.section-tete {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-tete h2 {
  font-size: min(2rem, 8.5vw);
}

/* Fais tourner : vignettes en grilles de deux colonnes ; la légende est lue mais cachée à l'œil. */

.fais-tourner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px max(20px, env(safe-area-inset-right)) 30px max(20px, env(safe-area-inset-left));
  border-top: var(--filet);
}

.groupe-visuels h3 {
  margin-bottom: 10px;
  color: var(--rouge);
  font: 800 13px/1.3 var(--font-texte);
  letter-spacing: .12em;
}

.visuels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.visuels-logos .visuel:nth-child(3) {
  grid-column: 1 / -1;
}

.visuel a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: var(--filet);
  background: var(--carte);
  color: var(--noir);
  text-decoration: none;
}

.visuel-image {
  grid-column: 1 / -1;
  display: block;
}

.visuel-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Badge et bloc au centre d'un carré papier. */
.visuels-logos .visuel:nth-child(-n + 2) .visuel-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: var(--papier);
}

.visuels-logos .visuel:nth-child(1) img {
  width: 72%;
}

.visuels-logos .visuel:nth-child(2) img {
  width: 86%;
}

.visuel-texte {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.visuel-action {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 4px 8px;
  background: var(--papier);
  color: var(--rouge);
  font: 400 14px/1.2 var(--font-titre);
  text-transform: uppercase;
}

.grille-carrousels {
  display: grid;
  gap: 16px;
}

.grille-stories {
  display: grid;
  gap: 10px;
}

.encadre-partage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px 20px;
  background: var(--rouge);
}

.encadre-titre {
  font: 400 24px/1.15 var(--font-titre);
  text-transform: uppercase;
}

.encadre-titre span {
  color: var(--papier);
}

/* Pied */

.pied-accueil {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: var(--noir);
  color: var(--papier);
}

.pied-poing {
  flex: none;
  width: 29px;
  height: 60px;
  background: url(img/poing-rouge-180.webp) center / contain no-repeat;
}

.pied-accueil .mot {
  font: 400 28px/1.1 var(--font-titre);
  text-transform: uppercase;
}

.pied-accueil .adresse {
  color: var(--rouge);
  font: 400 22px/1.1 var(--font-titre);
  text-transform: uppercase;
}

.pied-accueil .note {
  color: var(--gris-clair);
  font-size: 14px;
}

.pied-accueil .note a {
  color: inherit;
  text-underline-offset: 3px;
}

/* Ordi (référence 1440 px) */

@media (min-width: 900px) {
  .barre-liens {
    display: flex;
    gap: 32px;
    margin-left: auto;
    font: 800 16px var(--font-texte);
  }

  .barre-liens a {
    color: var(--noir);
    text-decoration: none;
  }

  .barre-liens a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .barre .btn {
    display: flex;
    width: auto;
    margin-left: 28px;
    padding: 13px 20px;
    font-size: 16px;
  }

  .barre .btn.secondaire {
    padding: 10px 17px;
  }

  /* La colonne du texte s'élargit pour le titre ; le panneau prend la deuxième colonne. */
  .hero {
    display: grid;
    grid-template-columns: 7fr 5fr;
    min-height: 640px;
    border-bottom: var(--filet);
  }

  .hero-texte {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
    gap: 26px;
    padding: 64px 56px 56px;
  }

  .surtitre {
    font-size: 15px;
  }

  .hero h1 {
    font-size: clamp(4rem, calc(8.9vw - 16px), 7rem);
    line-height: 1.02;
  }

  .hero h1 .ligne {
    white-space: nowrap;
  }

  .chapo {
    max-width: 640px;
    font-size: 23px;
  }

  .hero-boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero-boutons .btn {
    width: auto;
    padding: 18px 28px;
    font-size: 20px;
  }

  .hero-boutons .btn.secondaire {
    padding: 15px 26px;
  }

  .hero .discret {
    font-size: 16px;
  }

  .geste-du-jour {
    max-width: 560px;
  }

  .panneau {
    grid-column: 2;
    grid-row: 1;
    height: auto;
    border-bottom: 0;
    border-left: var(--filet);
  }

  .poing {
    top: auto;
    bottom: -120px;
    height: 760px;
  }

  /* Les deux phrases se suivent ; une phrase trop longue pour la largeur ne se coupe qu'entre ses
     morceaux (« celles et ceux » reste entier). */
  .slogan {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    padding: 26px 56px;
    font-size: 30px;
    line-height: 1.15;
  }

  .slogan .phrase > span {
    display: inline;
    white-space: nowrap;
  }

  .blocs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: var(--filet);
  }

  .bloc {
    padding: 44px 40px 52px;
  }

  .bloc:first-child {
    padding-left: 56px;
  }

  .bloc:last-child {
    padding-right: 56px;
  }

  .bloc + .bloc {
    border-top: 0;
    border-left: var(--filet);
  }

  .bloc h2 {
    font-size: clamp(1.25rem, 2.1vw, 1.875rem);
    line-height: 1.18;
  }

  .bloc p {
    font-size: 18px;
    line-height: 1.55;
  }

  .bloc .coin-blocage {
    font-size: 16px;
  }

  .section-tete {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 24px;
  }

  .section-tete h2 {
    font-size: clamp(3.5rem, 5.8vw, 5.25rem);
    line-height: 1;
  }

  .section-tete p {
    font-size: 20px;
  }

  .section-tete .btn {
    width: auto;
    margin-left: auto;
    padding: 15px 22px;
    font-size: 17px;
  }

  .section-tete .btn.secondaire {
    padding: 12px 19px;
  }

  /* La vitrine de la liste */

  .vitrine {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 64px 56px;
  }

  .colonnes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    align-items: start;
    gap: 24px;
  }

  .colonne {
    border: var(--filet);
    background: var(--carte);
  }

  .colonne-tete {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    padding: 18px 20px;
    border-bottom: var(--filet);
  }

  .teinte-noir .colonne-tete {
    background: var(--noir);
    color: var(--papier);
  }

  .teinte-rouge .colonne-tete {
    background: var(--rouge);
  }

  .teinte-papier .colonne-tete {
    background: var(--papier);
  }

  .colonne-tete h3 {
    flex: 1 1 12rem;
    font-size: 22px;
    line-height: 1.15;
  }

  .colonne-tete p {
    font: 800 14px var(--font-texte);
  }

  .teinte-noir .colonne-tete :focus-visible {
    outline-color: var(--papier);
  }

  .cartes {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .carte {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--filet-clair);
  }

  .carte-nom {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
  }

  .carte .nom {
    font: 800 19px/1.25 var(--font-texte);
  }

  .precision {
    color: var(--gris);
    font-size: 15px;
  }

  .carte-reseaux {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font: 700 12px/1.5 var(--font-texte);
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .carte-reseaux a {
    color: var(--rouge);
    text-underline-offset: 3px;
  }

  .carte-reseaux a:hover {
    color: var(--noir);
  }

  .suite summary {
    padding: 16px 20px;
    font: 400 15px/1.2 var(--font-titre);
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
    transition: background-color 160ms, color 160ms;
  }

  .suite summary::-webkit-details-marker {
    display: none;
  }

  .suite summary:hover {
    background: var(--noir);
    color: var(--papier);
  }

  .suite[open] summary {
    display: none;
  }

  /* Fais tourner */

  .fais-tourner {
    gap: 32px;
    padding: 64px 56px 72px;
  }

  .tout-telecharger {
    display: flex;
  }

  .groupe-visuels h3 {
    margin-bottom: 14px;
    font-size: 14px;
  }

  .visuels {
    gap: 24px;
  }

  .visuels-logos {
    grid-template-columns: 1fr 1fr 2fr;
  }

  .visuels-logos .visuel:nth-child(3) {
    grid-column: auto;
  }

  /* Les deux carrousels côte à côte, deux slides chacun : quatre colonnes égales. */
  .grille-carrousels {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .visuel a {
    height: 100%;
    transition: transform .15s var(--sortie), box-shadow .15s var(--sortie);
  }

  .visuel-image {
    border-bottom: var(--filet);
  }

  .visuel-texte {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0 12px 16px;
  }

  .visuel-nom {
    font: 800 16px/1.3 var(--font-texte);
  }

  .visuel-detail {
    color: var(--gris);
    font-size: 13px;
    line-height: 1.35;
  }

  .visuel-action {
    position: static;
    align-self: start;
    padding: 12px 16px;
    background: none;
  }

  .action-mot {
    display: inline;
  }

  /* Stories : deux moitiés, les deux stories d'un côté, l'encadré de l'autre. */
  .grille-stories {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .encadre-partage {
    gap: 14px;
    padding: 32px;
  }

  .encadre-titre {
    font-size: 34px;
  }

  .encadre-partage p:not(.encadre-titre) {
    font-size: 17px;
    line-height: 1.5;
  }

  /* Pied : poing et mot à gauche, adresse et note poussées à droite. */
  .pied-accueil {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 6px 24px;
    padding: 48px 56px;
  }

  .pied-poing {
    grid-row: span 2;
    width: 44px;
    height: 90px;
  }

  .pied-accueil .mot {
    grid-row: span 2;
    max-width: 9em;
    font-size: 46px;
  }

  .pied-accueil .adresse {
    display: block;
    align-self: end;
    text-align: right;
  }

  .pied-accueil .note {
    align-self: start;
    font-size: 15px;
    text-align: right;
  }
}

/* Téléphone : le carrousel garde son numéro de slide sous l'image, pour être posté dans l'ordre. */
@media (max-width: 899px) {
  .visuels-carrousel .visuel-image {
    border-bottom: var(--filet);
  }

  .visuels-carrousel .visuel-texte {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    padding: 6px 0 6px 10px;
  }

  .visuels-carrousel .visuel-nom {
    font: 800 14px/1.3 var(--font-texte);
  }

  .visuels-carrousel .visuel-action {
    position: static;
    align-self: center;
    padding: 6px 10px;
    background: none;
  }
}

/* Ordi étroit : « Télécharger » prendrait la moitié de la carte, la flèche seule suffit (comme sur téléphone). */
@media (min-width: 900px) and (max-width: 1199px) {
  .action-mot {
    display: none;
  }
}

/* La carte se soulève au survol d'une souris, pas au toucher. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .visuel a:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 var(--noir);
  }
}
