/* ==========================================================================
   themes/editorial-type.css — Thème « Éditorial » (Typographie radicale)
   --------------------------------------------------------------------------
   Esthétique inspirée de l'édition suisse et du scan visuel en F :
     - Fond papier ivoire chaud (#FAF8F5), encre sombre (#141413)
     - Filets horizontaux fins (1px solid #141413), zéro ombre portée
     - Police serif éditoriale contrastée (Instrument Serif) à très grande
       échelle clamp() pour les titres, associée à Inter pour le corps
     - Mise en page suisse en 2 colonnes sur desktop (catégorie/titre figé
       à gauche, contenu détaillé à droite)
     - Vert émeraude utilisé avec parcimonie uniquement sur les états actifs
       et les appels à l'action
   ========================================================================== */

@layer themes {

  [data-theme="editorial-type"] {
    --color-bg: #faf8f5;
    --color-bg-translucent: rgb(250 248 245 / 92%);
    --color-surface: #faf8f5;
    --color-surface-alt: #f2eee7;
    --color-line: #141413;
    --color-line-strong: #141413;

    --color-ink: #141413;
    --color-ink-soft: #353431;
    --color-ink-faint: #57554f;
    --color-ink-inverse: #faf8f5;

    --color-accent: #03996f;
    --color-accent-dark: #027f5c;
    --color-accent-wash: transparent;
    --color-accent-border: #141413;
    --color-focus: #027f5c;

    --font-editorial: "Instrument Serif", Georgia, "Times New Roman", serif;

    --radius-sm: 0px;
    --radius-md: 0px;
    --shadow-sm: none;
    --shadow-md: none;
    --transition-fast: 140ms ease;
    --transition-base: 200ms ease;
  }

  [data-theme="editorial-type"] .site-header {
    background-color: var(--color-bg-translucent);
    border-block-end: 1px solid #141413;
  }

  [data-theme="editorial-type"] .site-header__logo .logo-bars {
    color: #141413;
  }

  [data-theme="editorial-type"] .site-nav__link {
    font-family: var(--font-sans);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--color-ink-faint);
  }

  [data-theme="editorial-type"] .site-nav__link[aria-current="true"] {
    color: var(--color-accent-dark);
    border-block-end-color: var(--color-accent-dark);
  }

  /* ------------------------------------------------------------------------
     MASTHEAD ÉDITORIAL — grande échelle typographique
     ------------------------------------------------------------------------ */
  [data-theme="editorial-type"] .masthead {
    border-block-end: 1px solid #141413;
    padding-block: var(--space-3xl) var(--space-2xl);
  }

  [data-theme="editorial-type"] .eyebrow {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-ink-faint);
  }

  [data-theme="editorial-type"] .eyebrow::before {
    content: none;
  }

  [data-theme="editorial-type"] .page-title {
    font-family: var(--font-editorial);
    font-weight: 400;
    font-size: clamp(3rem, 2rem + 4.8vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: #141413;
    margin-block-end: var(--space-md);
  }

  [data-theme="editorial-type"] .page-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
    color: var(--color-ink-soft);
    max-inline-size: 52ch;
  }

  [data-theme="editorial-type"] .contact-list {
    font-family: var(--font-sans);
    color: var(--color-ink-soft);
  }

  [data-theme="editorial-type"] .contact-list a {
    color: #141413;
    text-decoration: underline;
    text-decoration-color: rgb(20 20 19 / 35%);
  }

  [data-theme="editorial-type"] .contact-list a:hover {
    color: var(--color-accent-dark);
    text-decoration-color: var(--color-accent-dark);
  }

  [data-theme="editorial-type"] .contact-list__icon {
    stroke: #141413;
  }

  /* ------------------------------------------------------------------------
     GRILLE SUISSE EN 2 COLONNES (Desktop)
     Colonne gauche : titre / catégorie figé en sticky
     Colonne droite : contenu détaillé
     ------------------------------------------------------------------------ */
  [data-theme="editorial-type"] .intro,
  [data-theme="editorial-type"] .section {
    display: grid;
    grid-template-columns: minmax(12.5rem, 16.5rem) minmax(0, 1fr);
    column-gap: var(--space-2xl);
    align-items: start;
    border-block-start: 1px solid #141413;
    padding-block: var(--space-2xl);
  }

  [data-theme="editorial-type"] .intro {
    border-block-start: 0;
  }

  [data-theme="editorial-type"] .intro > *,
  [data-theme="editorial-type"] .section > * {
    grid-column: 2;
  }

  [data-theme="editorial-type"] .intro__heading,
  [data-theme="editorial-type"] .section-title {
    grid-column: 1;
    grid-row: 1 / span 12;
    position: sticky;
    inset-block-start: calc(var(--header-height) + var(--space-lg));
    font-family: var(--font-editorial);
    font-weight: 400;
    font-size: clamp(2rem, 1.5rem + 1.8vw, 2.85rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: #141413;
    margin: 0;
  }

  [data-theme="editorial-type"] .section-title::before {
    content: none;
  }

  /* ------------------------------------------------------------------------
     CONTENU ÉDITORIAL — zéro ombre, filets fins 1px
     ------------------------------------------------------------------------ */
  [data-theme="editorial-type"] .intro__text--highlight {
    border-inline-start: 2px solid #141413;
    color: #141413;
  }

  [data-theme="editorial-type"] .entry {
    border-inline-start: 0;
    padding-inline-start: 0;
    padding-block: 0 var(--space-lg);
    margin-block-end: var(--space-lg);
    border-block-end: 1px solid rgb(20 20 19 / 20%);
  }

  [data-theme="editorial-type"] .entry:last-child {
    border-block-end: 0;
    margin-block-end: 0;
    padding-block-end: 0;
  }

  [data-theme="editorial-type"] .entry::before {
    content: none;
  }

  [data-theme="editorial-type"] .entry__date {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-ink-faint);
  }

  [data-theme="editorial-type"] .entry__role,
  [data-theme="editorial-type"] .project__title,
  [data-theme="editorial-type"] .card__title,
  [data-theme="editorial-type"] .education__degree {
    font-family: var(--font-editorial);
    font-weight: 400;
    font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.65rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #141413;
  }

  [data-theme="editorial-type"] .course {
    background: transparent;
    border: 0;
    border-block-start: 1px solid rgb(20 20 19 / 16%);
    padding: var(--space-sm) 0;
    margin: 0;
  }

  [data-theme="editorial-type"] .course__name {
    font-family: var(--font-sans);
    font-weight: 600;
    color: #141413;
  }

  [data-theme="editorial-type"] .course__name::before {
    content: none;
  }

  [data-theme="editorial-type"] .project {
    background: transparent;
    border: 0;
    border-block-end: 1px solid rgb(20 20 19 / 20%);
    padding: 0 0 var(--space-lg);
    margin-block-end: var(--space-lg);
  }

  [data-theme="editorial-type"] .project:last-child {
    border-block-end: 0;
    margin-block-end: 0;
    padding-block-end: 0;
  }

  [data-theme="editorial-type"] .badge {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-ink-faint);
    background: transparent;
    border: 1px solid rgb(20 20 19 / 28%);
  }

  [data-theme="editorial-type"] .project__stack li {
    background: transparent;
    border: 1px solid rgb(20 20 19 / 22%);
    color: var(--color-ink-soft);
  }

  [data-theme="editorial-type"] .card {
    background: transparent;
    border: 0;
    border-block-start: 1px solid #141413;
    padding: var(--space-md) 0 0;
    box-shadow: none;
  }

  [data-theme="editorial-type"] .card:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--color-accent-dark);
  }

  [data-theme="editorial-type"] .card__icon {
    stroke: #141413;
  }

  [data-theme="editorial-type"] .marker-list li::before {
    content: "—";
    color: var(--color-ink-faint);
  }

  [data-theme="editorial-type"] .education {
    border-inline-start: 0;
    border-block-start: 1px solid #141413;
    padding: var(--space-md) 0 0;
  }

  [data-theme="editorial-type"] .contact-block {
    background: transparent;
    border: 1px solid #141413;
    padding: var(--space-xl);
  }

  /* Accent vert émeraude réservé aux appels à l'action */
  [data-theme="editorial-type"] .button--primary {
    background-color: var(--color-accent-dark);
    color: #faf8f5;
  }

  [data-theme="editorial-type"] .button--primary:hover {
    background-color: #141413;
    color: #faf8f5;
  }

  [data-theme="editorial-type"] .button--secondary {
    background-color: transparent;
    border-color: #141413;
    color: #141413;
  }

  [data-theme="editorial-type"] .button--secondary:hover {
    border-color: var(--color-accent-dark);
    color: var(--color-accent-dark);
  }

  [data-theme="editorial-type"] .to-top {
    background-color: #faf8f5;
    border-color: #141413;
    color: #141413;
    box-shadow: none;
  }

  [data-theme="editorial-type"] .site-footer {
    border-block-start: 1px solid #141413;
  }

  /* ------------------------------------------------------------------------
     MOBILE — retour propre en une seule colonne
     ------------------------------------------------------------------------ */
  @media (width <= 46rem) {
    [data-theme="editorial-type"] .intro,
    [data-theme="editorial-type"] .section {
      display: block;
    }

    [data-theme="editorial-type"] .intro__heading,
    [data-theme="editorial-type"] .section-title {
      position: static;
      margin-block-end: var(--space-lg);
    }
  }

  /* Révélation sobre ≤ 260ms */
  [data-js="true"][data-theme="editorial-type"] [data-reveal] {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 240ms ease-out, transform 240ms ease-out;
  }

  [data-js="true"][data-theme="editorial-type"] [data-reveal][data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
  }

  @media (prefers-reduced-motion: reduce) {
    [data-js="true"][data-theme="editorial-type"] [data-reveal] {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }
}
