/* ============================================================
   Léo Sermon — À propos
   Direction éditoriale : entrée de page marquée, hiérarchie
   typographique nette, chapitres rythmés (titre en marge / texte),
   détails ton sur ton presque silencieux. Prête à accueillir des
   photographies plus tard sans changement de mise en page.
   ============================================================ */

/* ---------------- Détails partagés ---------------- */

/* Filet fin devant les petits titres (kicker, titres de chapitre) */
.about-kicker::before,
.about-label::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin-bottom: 18px;
  background: currentColor;
  opacity: 0.45;
}

.about-kicker,
.about-label {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------------- Entrée de page ---------------- */

.about-intro {
  position: relative;
  overflow: clip;
  padding: clamp(120px, 15vw, 190px) max(var(--gutter), calc((100% - 1120px) / 2)) clamp(88px, 10vw, 140px);
}

/* Texte à gauche, photo d'atelier à droite, calée sur le grand titre. */
.about-intro-row {
  display: flex;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 52px);
}

.about-intro-col {
  flex: 1 1 0%;
  min-width: 0;
}

.about-intro-media {
  flex: 0 0 33%;
  max-width: 385px;
  min-width: 260px;
  margin-top: 78px;
  /* Même format que sur téléphone. */
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.about-intro-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* Même recadrage que sur téléphone : Léo, sa main et la pièce
     blanche, étagères coupées à gauche. */
  object-position: 82% 35%;
  transform: scale(1.28);
  transform-origin: 72% 40%;
}

/* iPad uniquement : la photo peut être un peu plus présente, sans
   toucher au téléphone (≤720px) ni au grand écran (>1024px). */
@media (min-width: 721px) and (max-width: 1024px) {
  .about-intro-row {
    align-items: center;
  }

  .about-intro-media {
    flex-basis: 40%;
    max-width: 460px;
    min-width: 320px;
    margin-top: 0;
  }
}

.about-lead {
  margin: 34px 0 0;
  max-width: 15em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.16;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: balance;
}

.about-intro-text {
  margin: 44px 0 0;
  max-width: 560px;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* Apparition douce, légèrement décalée */
.about-intro [data-animate]:nth-child(2) { transition-delay: 0.12s; }
.about-intro [data-animate]:nth-child(3) { transition-delay: 0.24s; }

/* ---------------- Chapitres ---------------- */

.about-chapter {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(96px, 11vw, 160px) var(--gutter);
  border-top: 1px solid rgba(36, 28, 20, 0.09);
}

.about-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
}

/* Tant qu'aucune image n'est présente, la colonne média disparaît :
   le titre du chapitre passe en marge, le texte se lit à droite
   (et inversement pour le second chapitre). Dès qu'une image est
   ajoutée dans .about-media, la mise en page à deux colonnes
   texte / photo s'active automatiquement. */
.about-media:empty {
  display: none;
}

.about-row:has(.about-media:empty) {
  grid-template-columns: 1fr;
}

.about-row:has(.about-media:empty) .about-text {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
  column-gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about-row:has(.about-media:empty) .about-label {
  grid-column: 1;
  grid-row: 1 / span 8;
}

.about-row:has(.about-media:empty) .about-text p:not(.about-label) {
  grid-column: 2;
}

.about-row--reverse:has(.about-media:empty) .about-text {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.42fr);
}

.about-row--reverse:has(.about-media:empty) .about-label {
  grid-column: 2;
  text-align: right;
}

.about-row--reverse:has(.about-media:empty) .about-label::before {
  margin-left: auto;
}

.about-row--reverse:has(.about-media:empty) .about-text p:not(.about-label) {
  grid-column: 1;
}

.about-row--reverse .about-text {
  order: 2;
}

.about-row--reverse .about-media {
  order: 1;
}

/* Corps du texte */
.about-text p:not(.about-label) {
  margin: 0 0 24px;
  max-width: 600px;
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 300;
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--ink);
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Première phrase du chapitre : plus présente que le texte courant */
.about-text .about-label + p {
  margin-bottom: 34px;
  font-weight: 400;
  font-size: clamp(1.1875rem, 1.7vw, 1.375rem);
  line-height: 1.5;
}

.about-media {
  width: 100%;
}

.about-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Mon travail aujourd'hui — composition plus ouverte, texte centré */
.about-chapter--open .about-text {
  max-width: 640px;
  margin: 0 auto;
}

.about-chapter--open .about-label {
  margin-bottom: 30px;
}

.about-detail-media {
  margin: 64px auto 0;
  max-width: 640px;
}

.about-detail-media:empty {
  display: none;
  margin: 0;
}

.about-detail-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* Apparition douce paragraphe par paragraphe */
.about-text p:nth-child(3)[data-animate] { transition-delay: 0.08s; }
.about-text p:nth-child(4)[data-animate] { transition-delay: 0.14s; }
.about-text p:nth-child(5)[data-animate] { transition-delay: 0.2s; }

/* ---------------- Citation finale ---------------- */

.about-quote {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(130px, 16vw, 230px) var(--gutter) clamp(120px, 14vw, 200px);
  text-align: center;
}

/* Trait organique, ton sur ton, au-dessus de la citation */
.about-quote::before {
  content: "";
  display: block;
  width: 96px;
  height: 18px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 18' fill='none' stroke='%236B5C4A' stroke-width='1' stroke-linecap='round'><path d='M2 11C16 2 28 2 42 9S72 16 94 5'/></svg>") center / contain no-repeat;
  opacity: 0.5;
}

.about-quote p {
  margin: 0 auto;
  max-width: 720px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------------- Tablette / téléphone ---------------- */

@media (max-width: 860px) {
  .about-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Le titre repasse au-dessus du texte, aligné à gauche */
  .about-row:has(.about-media:empty) .about-text,
  .about-row--reverse:has(.about-media:empty) .about-text {
    display: block;
  }

  .about-row--reverse:has(.about-media:empty) .about-label {
    text-align: left;
  }

  .about-row--reverse:has(.about-media:empty) .about-label::before {
    margin-left: 0;
  }

  .about-label {
    margin-bottom: 34px;
  }

  .about-row--reverse .about-text,
  .about-row--reverse .about-media {
    order: initial;
  }
}

@media (max-width: 720px) {
  .page-a-propos {
    --gutter: 30px;
  }

  .about-intro {
    padding-top: 128px;
    padding-bottom: 96px;
  }

  /* Texte d'abord, puis une photo plus petite juste avant "L'influence
     de mon père". */
  .about-intro-row {
    display: block;
  }

  .about-intro-media {
    width: 72%;
    max-width: 300px;
    aspect-ratio: 4 / 3;
    height: auto;
    margin: 44px 0 0;
  }

  .about-intro-media img {
    height: 100%;
    object-fit: cover;
    /* Zoom + décalage pour couper davantage les étagères à gauche. */
    object-position: 82% 35%;
    transform: scale(1.28);
    transform-origin: 72% 40%;
  }

  .about-lead {
    margin-top: 28px;
    font-size: clamp(2rem, 8.6vw, 2.25rem);
    line-height: 1.18;
  }

  .about-intro-text {
    margin-top: 36px;
    font-size: 17px;
    line-height: 1.75;
  }

  .about-chapter {
    padding-top: 84px;
    padding-bottom: 84px;
  }

  .about-text p:not(.about-label) {
    margin-bottom: 22px;
    font-size: 16.5px;
    line-height: 1.78;
  }

  .about-text .about-label + p {
    margin-bottom: 28px;
    font-size: 19px;
    line-height: 1.5;
  }

  .about-quote {
    padding-top: 112px;
    padding-bottom: 104px;
  }

  .about-quote p {
    font-size: clamp(1.5rem, 6.6vw, 1.75rem);
    line-height: 1.5;
  }
}
