/* ==========================================================================
   Ismaël Karioui — carnets d'un copywriter
   Direction : épreuve d'imprimeur. Papier crème, texte à l'encre, marges de
   relecture, corrections à l'encre rouge d'éditeur, filets et repères en laiton.
   Le manuscrit n'est plus un carnet de cuir sombre : c'est une copie relue.
   ========================================================================== */

:root {
  /* Couleurs — papier d'épreuve */
  --paper:          #f4efe5;   /* fond, crème chaud */
  --paper-raised:   #ece2d0;   /* cartes, panneaux */
  --paper-sunk:     #e6dcc7;   /* creux, portrait */
  --ink:            #1b1712;   /* texte principal, encre chaude */
  --ink-soft:       #4c4436;   /* texte secondaire */
  --ink-mute:       #8b8069;   /* légendes, méta */
  --brass:          #8a6720;   /* accent lisible sur crème (eyebrows, marques) */
  --brass-bright:   #b6903f;   /* laiton clair — filets, survols, sur fond sombre */
  --sealing-red:    #9a3324;   /* encre rouge de correction */
  --rule:           #d9cfb8;   /* filet fin */
  --rule-strong:    #c3b799;   /* filet appuyé */

  /* Typographie */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "IBM Plex Mono", "SF Mono", ui-monospace, monospace;

  /* Rythme */
  --margin-col: 128px;
  --content-max: 700px;
  --gutter: clamp(24px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--sealing-red);
  color: var(--paper);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brass-bright);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--brass); text-decoration-color: var(--brass); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sealing-red);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
  font-optical-sizing: auto;
}

h1 { font-size: clamp(2.7rem, 6.2vw, 4.4rem); font-weight: 600; line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.lede {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------- */
/* En-tête / navigation                                                    */
/* ---------------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--gutter);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--ink); }
.logo img {
  height: 38px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brass-bright);
}

.nav-toggle { display: none; }

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    position: static;
  }
  .site-nav { gap: 14px; flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------- */
/* Grille manuscrit : marge de relecture + colonne de contenu               */
/* ---------------------------------------------------------------------- */

.manuscript {
  display: grid;
  grid-template-columns: var(--margin-col) minmax(0, 1fr);
  gap: var(--gutter);
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.margin-mark {
  padding-top: 70px;
  padding-right: 20px;
  border-right: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  line-height: 1.5;
  text-align: right;
}
section:first-of-type .margin-mark,
.hero .margin-mark { padding-top: 78px; }

.content-col {
  max-width: var(--content-max);
  padding: 68px 0;
  border-top: 1px solid var(--rule);
}
section:first-of-type .content-col,
.manuscript:first-child .content-col {
  border-top: none;
}

@media (max-width: 800px) {
  .manuscript {
    grid-template-columns: 1fr;
    padding: 0 var(--gutter);
  }
  .margin-mark,
  section:first-of-type .margin-mark,
  .hero .margin-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 0;
    padding-right: 0;
    border-right: none;
    text-align: left;
    margin-bottom: 4px;
  }
  .margin-mark::before {
    content: "";
    width: 20px;
    height: 1px;
    background: var(--brass);
    display: inline-block;
  }
  .content-col { padding: 44px 0; }
}

/* ---------------------------------------------------------------------- */
/* Hero — éditorial, deux colonnes (texte + portrait)                       */
/* ---------------------------------------------------------------------- */

.hero .content-col {
  padding-top: 76px;
  padding-bottom: 76px;
  max-width: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 30%, 340px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.hero-text { max-width: 640px; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}

.hero h1 { margin-bottom: 0.35em; }
.hero h1 em {
  font-style: italic;
  color: var(--sealing-red);
}

.hero .lede { max-width: 34em; }

/* Portrait dans un cadre d'épreuve */
.hero-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-sunk);
  border: 1px solid var(--rule-strong);
  overflow: hidden;
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  filter: grayscale(0.15) contrast(1.02);
}
.hero-portrait .portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--brass);
}
.hero-portrait figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
}

@media (max-width: 860px) {
  .hero-layout { grid-template-columns: 1fr; gap: 36px; }
  .hero-portrait { max-width: 300px; order: -1; }
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------- */
/* Boutons                                                                  */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: var(--brass-bright);
  border-color: var(--brass-bright);
  color: var(--ink);
}

/* ---------------------------------------------------------------------- */
/* Listes de piste / puces                                                  */
/* ---------------------------------------------------------------------- */

.trail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trail-list li {
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
}
.trail-list li:last-child { border-bottom: 1px solid var(--rule); }
.trail-list .mark { color: var(--brass); font-family: var(--font-mono); }

/* ---------------------------------------------------------------------- */
/* Preuve — résultats chiffrés + témoignages (import Todd Brown)             */
/* ---------------------------------------------------------------------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
  margin: 8px 0 40px;
}
.stat {
  background: var(--paper);
  padding: 26px 22px;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat .num em { font-style: italic; color: var(--sealing-red); }
.stat .label {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

@media (max-width: 620px) {
  .stat-row { grid-template-columns: 1fr; }
}

.stat-source {
  margin: -26px 0 40px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.stat-source a { color: var(--ink-soft); }

.testimonial {
  padding: 26px 30px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--brass-bright);
  margin-bottom: 20px;
}
.testimonial blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
}
.testimonial .attribution {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testimonial .attribution strong {
  color: var(--ink);
  font-weight: 500;
}

/* Résultats en attente — mention honnête sous un témoignage */
.pending-results {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--brass);
  display: flex;
  gap: 8px;
}
.pending-results::before { content: "⧗"; }

/* Planche de preuves — captures brutes des retours clients */
.proof-wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
  align-items: start;
}
.proof-shot {
  margin: 0;
  padding: 14px 14px 12px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
}
.proof-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
.proof-shot--stack img + img { margin-top: 8px; }
.proof-shot figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--ink-mute);
}

@media (max-width: 640px) {
  .proof-wall { grid-template-columns: 1fr; }
}

/* Emplacement à remplir — rappel visuel discret */
.placeholder-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--sealing-red);
  border: 1px dashed var(--sealing-red);
  padding: 8px 12px;
  display: inline-block;
  margin-top: 6px;
}

/* ---------------------------------------------------------------------- */
/* Encart d'abonnement Substack                                            */
/* ---------------------------------------------------------------------- */

.substack-embed {
  margin: 22px 0 12px;
}
.substack-embed iframe {
  display: block;
}
.substack-fallback {
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* FAQ                                                                      */
/* ---------------------------------------------------------------------- */

.faq-item {
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.faq-item:first-child { border-top: none; padding-top: 4px; }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item h3 {
  margin-bottom: 8px;
  color: var(--ink);
}
.faq-item p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------- */
/* Cartes (portfolio, liens)                                                */
/* ---------------------------------------------------------------------- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  padding: 28px;
  margin-bottom: 20px;
}
.card h3 { margin-bottom: 10px; }
.card .meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: block;
}

/* Portrait — page À propos */
.portrait-photo {
  width: 200px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 50%;
  border: 1px solid var(--rule-strong);
  background: var(--paper-sunk);
  display: block;
  margin-bottom: 28px;
  filter: grayscale(0.15) contrast(1.02);
}

/* Portrait placeholder (fallback si pas de photo) */
.portrait-placeholder {
  width: 180px;
  height: 180px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-sunk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--brass);
  margin-bottom: 28px;
}

/* ---------------------------------------------------------------------- */
/* Pied de page                                                             */
/* ---------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px var(--gutter) 60px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--brass); }
.footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-mute);
}

