/* =====================================================================
   Ramy Hamade · pages de contenu (services et carnet)
   Chargée APRÈS site.css : reprend ses variables (:root) et ses classes
   (.marque, .balise, .bouton, .reperage, .pied, .conteneur, .vh).
   Fond clair, cartes blanches, texte courant à 18 px : des pages faites
   pour être lues et trouvées.
   ===================================================================== */

.page-contenu { background: var(--fond-clair); color: var(--texte); }

/* ---------------------------------------------------------------- en-tête */
.entete--pages {
  position: absolute; height: auto; min-height: var(--entete);
  flex-wrap: wrap; row-gap: 10px; padding-top: 14px; padding-bottom: 14px;
}
.entete--pages .marque {
  color: var(--sapin); padding: 9px 18px 9px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--carte) 86%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--carte) 60%, transparent) inset, 0 6px 22px rgba(11, 31, 23, .10);
}
.nav-pages ul {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin: 0; padding: 5px; list-style: none; border-radius: 999px;
  background: color-mix(in srgb, var(--carte) 86%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--carte) 60%, transparent) inset, 0 6px 22px rgba(11, 31, 23, .10);
}
.nav-pages a {
  display: block; padding: 8px 15px; border-radius: 999px;
  font-size: 16px; font-weight: 550; color: var(--sapin); text-decoration: none;
  transition: background-color .2s ease;
}
.nav-pages a:hover { background: var(--fond-clair); }
.nav-pages a[aria-current] { background: var(--fond-clair); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--foret) 35%, transparent); }
.nav-pages .nav-pages__contact { background: var(--sapin); color: var(--brume); }
.nav-pages .nav-pages__contact:hover { background: var(--foret-fonce); }

@media (max-width: 620px) {
  .entete--pages { justify-content: center; padding: 12px 16px; row-gap: 8px; }
  .entete--pages .marque { margin: 0 auto; padding: 7px 16px 7px 12px; }
  .nav-pages { width: 100%; }
  .nav-pages ul { justify-content: space-between; flex-wrap: nowrap; gap: 2px; padding: 4px; }
  .nav-pages a { padding: 8px 11px; font-size: 15.5px; }
}
@media (max-width: 370px) { .nav-pages a { padding: 8px 8px; font-size: 15px; } }

/* ---------------------------------------------------------------- bandeau : le paysage du matin */
.bandeau { position: relative; height: clamp(230px, 24vw, 340px); overflow: hidden; background: var(--matin-ciel-2); }
.bandeau img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.bandeau::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--fond-clair) 70%, transparent) 70%, var(--fond-clair));
}
@media (max-width: 620px) { .bandeau { height: 250px; } .bandeau img { object-position: 22% 80%; } }

/* ---------------------------------------------------------------- la feuille de lecture */
.pages { display: block; padding: 0 0 72px; }
.feuille {
  position: relative; z-index: 2;
  max-width: 820px; margin: -96px auto 0; padding: clamp(26px, 5vw, 58px);
  border-radius: 26px; background: var(--carte); color: var(--texte-doux);
  border: 1px solid var(--trait); box-shadow: var(--ombre-douce);
  overflow-wrap: break-word;
}
.feuille--large { max-width: 1040px; }
@media (max-width: 860px) { .feuille { margin: -64px 16px 0; } }
@media (max-width: 620px) { .feuille { padding: 26px 20px 30px; border-radius: 20px; } }

.feuille h1 {
  margin: 0 0 18px; color: var(--texte);
  font-size: clamp(32px, 4.6vw, 50px); font-weight: 680; line-height: 1.08; letter-spacing: -.03em;
  text-wrap: balance;
}
.feuille h2 {
  margin: 46px 0 14px; color: var(--texte);
  font-size: clamp(24px, 2.6vw, 30px); font-weight: 650; line-height: 1.2; letter-spacing: -.02em;
  text-wrap: balance;
}
.feuille h3 { margin: 26px 0 8px; color: var(--texte); font-size: 20px; font-weight: 640; line-height: 1.3; letter-spacing: -.01em; }
.feuille p, .feuille li { font-size: 18px; line-height: 1.68; }
.feuille p + p { margin-top: 14px; }
.feuille strong { color: var(--texte); font-weight: 620; }
.feuille a:not(.bouton):not(.carte-lien) { color: var(--sapin); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.feuille a:not(.bouton):not(.carte-lien):hover { color: var(--foret); }
.feuille ul, .feuille ol { margin: 14px 0 0; padding-left: 1.3em; }
.feuille li + li { margin-top: 8px; }
.feuille li::marker { color: var(--foret); }
.feuille .reperage { margin-bottom: 18px; color: var(--gres-texte); flex-wrap: nowrap; align-items: flex-start; line-height: 1.5; }
.feuille .reperage .balise { margin-top: 3px; }
@media (max-width: 620px) { .feuille .reperage { font-size: 12.5px; gap: 10px; } .feuille .reperage .balise { margin-top: 2px; } }
.feuille .chapo { max-width: none; margin: 0; font-size: clamp(19px, 1.8vw, 21px); line-height: 1.6; color: var(--texte); }
.feuille blockquote {
  margin: 22px 0 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--gres);
  font-size: 20px; line-height: 1.55; color: var(--texte); font-weight: 450;
}

.feuille .grille + p, .feuille .etiquettes + p, .feuille .methode + p, .feuille ul + p, .feuille ol + p { margin-top: 18px; }

/* fil d'Ariane */
.ariane ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 22px; padding: 0; list-style: none; font-size: 16px; color: var(--texte-doux); }
.ariane li { font-size: 16px; line-height: 1.5; margin: 0; }
.ariane li + li { margin: 0; }
.ariane li + li::before { content: "›"; margin: 0 9px; color: var(--foret); }
.feuille .ariane a { font-weight: 500; }

/* ligne de date et temps de lecture */
.feuille .meta { margin: 0 0 22px; font-size: 16px; color: var(--texte-doux); }
.meta span + span::before { content: "·"; margin: 0 8px; color: var(--foret); }

/* ---------------------------------------------------------------- appel à l'action */
.appel {
  margin: 46px 0 0; padding: clamp(22px, 4vw, 34px);
  border-radius: 20px; background: #FFF8E6;
  border: 1px solid color-mix(in srgb, var(--or-texte) 30%, transparent);
}
.feuille .appel h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: clamp(22px, 2.4vw, 27px); }
.appel p { color: var(--texte-doux); }
.appel .bouton { margin-top: 20px; }
.feuille .appel .bouton { color: var(--brume); }
.appel__ou { margin-top: 12px; font-size: 16px !important; }

/* ---------------------------------------------------------------- grilles de cartes */
.grille { display: grid; gap: 18px; margin: 22px 0 0; padding: 0; list-style: none; }
.grille--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .grille--2 { grid-template-columns: 1fr; } }
.feuille .grille { padding: 0; }
.feuille .grille > li { margin: 0; }

.carte {
  height: 100%; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 22px 20px; border-radius: 18px;
  background: var(--carte); border: 1px solid var(--trait); box-shadow: var(--ombre-douce);
}
.carte--fond { background: var(--fond-clair); box-shadow: none; }
.carte__sur { font-size: 15px !important; font-weight: 600; color: var(--gres-texte); letter-spacing: .01em; line-height: 1.4 !important; }
.feuille .carte h2, .feuille .carte h3 { margin: 0; font-size: 21px; line-height: 1.3; }
.carte p { font-size: 17px !important; line-height: 1.6 !important; margin: 0 !important; }
.carte__gain { font-weight: 620; color: var(--foret) !important; }
.carte-lien { text-decoration: none; color: inherit; transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease, border-color .3s ease; }
.carte-lien:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--foret) 40%, transparent); box-shadow: 0 2px 4px rgba(11, 31, 23, .06), 0 20px 40px rgba(11, 31, 23, .12); }
.carte__suite { margin-top: auto !important; padding-top: 8px; font-weight: 600; color: var(--sapin); }
.carte-lien:hover .carte__suite { text-decoration: underline; text-underline-offset: 3px; }

/* sites réalisés */
.site-galerie { overflow: hidden; padding: 0; gap: 0; }
.site-galerie img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--fond-clair); border-bottom: 1px solid var(--trait); }
.site-galerie__texte { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 14px 18px 16px; }
.feuille .site-galerie h3 { margin: 0; font-size: 19px; }
.site-galerie__texte a { font-size: 16px; }

/* méthode en quatre temps */
.methode { counter-reset: etape; display: grid; gap: 14px; margin: 22px 0 0; padding: 0 !important; list-style: none; }
.methode > li { counter-increment: etape; position: relative; margin: 0 !important; padding: 18px 20px 18px 74px; border-radius: 16px; background: var(--fond-clair); }
.methode > li::before {
  content: counter(etape); position: absolute; left: 20px; top: 18px;
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--sapin); color: var(--bourgeon); font-weight: 650; font-size: 18px;
}
.feuille .methode h3 { margin: 4px 0 4px; font-size: 20px; }
.methode p { margin: 0 !important; }

/* étiquettes d'outils */
.etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0 !important; list-style: none; }
.etiquettes li { margin: 0 !important; padding: 5px 13px; border-radius: 999px; font-size: 16px !important; line-height: 1.5 !important; background: var(--fond-clair); border: 1px solid var(--trait); color: var(--sapin); font-weight: 520; }

/* questions fréquentes */
.faq { margin-top: 10px; }
.faq__item { padding: 4px 0 18px; border-bottom: 1px solid var(--trait); }
.faq__item:last-child { border-bottom: 0; }
.feuille .faq h3 { margin-top: 18px; }

/* encadré d'auteur et mention IA */
.auteur { display: flex; gap: 18px; align-items: center; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--trait); }
.auteur img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.auteur p { font-size: 17px !important; line-height: 1.55 !important; margin: 0 !important; }
.feuille .mention-ia { margin-top: 22px; font-size: 15px; line-height: 1.5; color: var(--texte-doux); font-style: italic; }

/* bas de page : les autres pages */
.suite-pages { max-width: 1040px; margin: 54px auto 0; padding: 0 var(--marge); }
.suite-pages h2 { margin: 0 0 4px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; letter-spacing: -.02em; color: var(--texte); }
.suite-pages .grille { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.suite-pages .carte p { color: var(--texte-doux); }
.suite-pages .carte h3 { margin: 0; font-size: 20px; line-height: 1.3; color: var(--texte); }
@media (max-width: 620px) { .suite-pages { padding: 0 16px; } }

/* pied */
.pied--pages { padding-bottom: 40px; }
.pied__liens a + a { margin-left: 4px; }
.pied__liens { flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .carte-lien, .nav-pages a { transition: none; }
  .carte-lien:hover { transform: none; }
}

.meta span { white-space: nowrap; }
@media (max-width: 620px) {
  .auteur { align-items: flex-start; gap: 14px; }
  .auteur img { width: 56px; height: 56px; }
}
