/* ==========================================================================
   Geoffroy Huet Avocat — feuille de styles
   ========================================================================== */

:root {
  --bg:        #F3EEE6;
  --bg-alt:    #FAF7F1;
  --ink:       #14120F;
  --ink-2:     #24211C;
  --body:      #35302A;
  --body-2:    #4A443C;
  --mute:      #6B6152;
  --mute-2:    #8A8073;
  --mute-3:    #A29888;
  --on-dark:   #F3EEE6;
  --on-dark-2: #C9C0B2;

  --rule:      rgba(20, 18, 15, 0.16);
  --rule-soft: rgba(20, 18, 15, 0.09);
  --rule-mid:  rgba(20, 18, 15, 0.12);

  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans:  Karla, Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, Menlo, Consolas, monospace;

  /* none = pleine largeur : les marges laterales valent exactement --gutter.
     Pour recentrer le contenu sur tres grand ecran, remettre une valeur
     (ex. 1600px ou 1180px). */
  --maxw: none;
  --gutter: 24px;   /* marge laterale, identique sur toutes les tailles d'ecran */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--mute); }

img { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Cible du lien d'évitement */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--on-dark);
  padding: 12px 20px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skip-link:focus { left: 0; color: var(--on-dark); }

/* --------------------------------------------------------------------------
   Conteneur
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Repli : entrée en fondu pour les navigateurs sans View Transitions */
.page { animation: fade .5s ease both; }

.a-rise    { animation: rise .8s ease both; }
.a-rise-1  { animation: rise .9s ease .06s both; }
.a-rise-2  { animation: rise .9s ease .18s both; }
.a-rise-3  { animation: rise .9s ease .26s both; }
.a-rise-4  { animation: rise .9s ease .38s both; }
.a-rise-5  { animation: rise .9s ease .50s both; }

.rule-line {
  height: 1px;
  background: var(--rule);
  transform-origin: left;
  animation: rule 1.1s cubic-bezier(.16, 1, .3, 1) .3s both;
}

/* --------------------------------------------------------------------------
   Transition entre les pages (View Transitions, sans JavaScript)
   Les navigateurs non compatibles ignorent ce bloc et affichent simplement
   le fondu de repli .page ci-dessus.
   -------------------------------------------------------------------------- */

@view-transition { navigation: auto; }

@supports (view-transition-name: none) {
  /* Le fondu de repli ferait doublon avec la transition ci-dessous */
  .page { animation: none; }
}

/* Zones suivies d'une page à l'autre */
main         { view-transition-name: page-content; }
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }

@keyframes vt-leave { to   { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-enter { from { opacity: 0; transform: translateY(12px); } }

::view-transition-old(page-content) {
  animation: vt-leave .22s ease both;
}
::view-transition-new(page-content) {
  animation: vt-enter .40s cubic-bezier(.16, 1, .3, 1) both;
}

/* L'en-tête et le pied de page restent fixes : aucun scintillement */
::view-transition-old(site-header),
::view-transition-new(site-header),
::view-transition-old(site-footer),
::view-transition-new(site-footer) {
  animation: none;
  mix-blend-mode: normal;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* Les pseudo-éléments de transition ne sont pas couverts par * */
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(243, 238, 230, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}

.site-header .container {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.brand span { color: var(--mute-2); }
.brand:hover { color: var(--ink); }

.nav {
  display: flex;
  gap: 34px;
  font-size: 13.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 400;
}
.nav a {
  color: var(--mute-2);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: rgba(20, 18, 15, 0.45);
}
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: rgba(20, 18, 15, 0.45);
}

/* Bouton hamburger — masque au-dessus de 780px */
.nav-toggle {
  display: none;
  align-self: center;
  background: none;
  border: 0;
  padding: 12px;
  margin-right: -12px;
  cursor: pointer;
  color: var(--ink);
  line-height: 0;
}
.nav-toggle-bars {
  display: block;
  position: relative;
  width: 24px;
  height: 13px;
}
.nav-toggle-bars i {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform .38s cubic-bezier(.16, 1, .3, 1), opacity .2s ease;
}
.nav-toggle-bars i:nth-child(1) { top: 0; }
.nav-toggle-bars i:nth-child(2) { top: 6px; }
.nav-toggle-bars i:nth-child(3) { top: 12px; }

/* Etat ouvert : le hamburger devient une croix */
.site-header.is-open .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

main { flex: 1; }

.band-alt {
  background: var(--bg-alt);
  border-top: 1px solid rgba(20, 18, 15, 0.08);
  border-bottom: 1px solid rgba(20, 18, 15, 0.08);
}
.band-dark { background: var(--ink); color: var(--on-dark); }
.band-top  { border-top: 1px solid var(--rule-soft); }

/* Rythme vertical — repris tel quel de la maquette */
.pad-y      { padding-top: 110px; padding-bottom: 110px; }
.pad-hero   { padding-top: 132px; padding-bottom: 104px; }
.pad-cards  { padding-top: 96px;  padding-bottom: 100px; }
.pad-quotes { padding-top: 92px;  padding-bottom: 92px; }
.pad-cta    { padding-top: 104px; padding-bottom: 104px; }
.pad-title  { padding-top: 120px; padding-bottom: 40px; }
.pad-body   { padding-top: 48px;  padding-bottom: 120px; }
.pad-list   { padding-top: 60px;  padding-bottom: 40px; }
.pad-faq    { padding-top: 96px;  padding-bottom: 96px; }
.pad-detail { padding-top: 56px;  padding-bottom: 110px; }

/* --------------------------------------------------------------------------
   Typographie
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 34px;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute-2);
}
.eyebrow--tight { margin-bottom: 30px; }

.label {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--mute-3);
}

.h-display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.h-display span { color: var(--mute); }

.h-page {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.h-lede {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.22;
}

.h-section {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.16;
}

.prose {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
  max-width: 62ch;
}
.prose:last-child { margin-bottom: 0; }
.prose--wide { max-width: 68ch; line-height: 1.78; margin-bottom: 26px; }

.pull {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 22px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   Grilles
   -------------------------------------------------------------------------- */

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 64px;
  align-items: start;
}
.cols--aside {
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
}

.sticky-col { position: sticky; top: 120px; }

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

.btn {
  display: inline-block;
  padding: 15px 34px;
  border: 1px solid rgba(20, 18, 15, 0.35);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background .4s ease, color .4s ease, border-color .4s ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--ink);
  color: var(--on-dark);
  border-color: var(--ink);
}
.btn--lg { padding: 16px 38px; }
.btn--light {
  border-color: rgba(243, 238, 230, 0.45);
  color: var(--on-dark);
}
.btn--light:hover,
.btn--light:focus-visible {
  background: var(--on-dark);
  color: var(--ink);
  border-color: var(--on-dark);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* --------------------------------------------------------------------------
   Cartes (accueil)
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: rgba(20, 18, 15, 0.1);
}
.card {
  background: var(--bg-alt);
  padding: 40px 34px 46px;
  transition: background .45s ease;
}
.card:hover { background: var(--bg); }
.card-num {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--mute-3);
}
.card h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
}
.card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--body-2);
}

/* --------------------------------------------------------------------------
   Bandeau d'appel à l'action
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-end;
  justify-content: space-between;
}
.cta h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
}
.cta h2.is-long { font-size: clamp(30px, 3.8vw, 52px); max-width: 20ch; }
.cta p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--on-dark-2);
  max-width: 52ch;
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.service {
  border-top: 1px solid rgba(20, 18, 15, 0.14);
  padding: 46px 0 52px;
}
.service h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.15;
}
.service-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 48px;
}
.service-items li {
  padding: 13px 0;
  border-bottom: 1px solid rgba(20, 18, 15, 0.08);
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}

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

.faq { border-top: 1px solid var(--rule-mid); }
.faq:last-of-type { border-bottom: 1px solid var(--rule-mid); }

.faq-q {
  width: 100%;
  background: none;
  border: 0;
  padding: 26px 0;
  display: flex;
  gap: 28px;
  align-items: baseline;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.35;
  color: var(--ink);
}
.faq-sign {
  font-family: var(--sans);
  font-size: 20px;
  color: var(--mute-2);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  flex: none;
}
.faq-q[aria-expanded="true"] .faq-sign { transform: rotate(45deg); }

.faq-a {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .55s cubic-bezier(.16, 1, .3, 1), opacity .4s ease;
}
.faq-q[aria-expanded="true"] + .faq-a { max-height: 620px; opacity: 1; }

.faq-a p {
  margin: 0 0 30px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--body-2);
  max-width: 70ch;
}

/* Sans JavaScript : toutes les réponses restent lisibles */
.no-js .faq-a { max-height: none; opacity: 1; }
.no-js .faq-sign { display: none; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 64px;
  align-items: start;
}
.contact-value {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 26px;
  word-break: break-word;
}
.contact-value a { transition: color .3s ease; }
.contact-value a:hover { color: var(--mute); }

.contact-aside {
  border-left: 1px solid rgba(20, 18, 15, 0.14);
  padding-left: 44px;
}
.contact-aside .pull { max-width: 40ch; }
.contact-aside .note {
  margin: 0 0 36px;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--body-2);
  max-width: 46ch;
}

.address {
  margin: 0;
  font-style: normal;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
}

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

.site-footer {
  border-top: 1px solid var(--rule-mid);
  background: var(--bg);
}
.site-footer .container {
  padding-top: 52px;
  padding-bottom: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-note {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--mute);
  max-width: 46ch;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  color: var(--body-2);
  font-style: normal;
}
.footer-contact a { color: var(--body-2); transition: color .3s ease; }
.footer-contact a:hover { color: var(--mute-2); }
.footer-contact span { color: var(--mute-2); }

/* --------------------------------------------------------------------------
   Page 404
   -------------------------------------------------------------------------- */

.error-page { padding-top: 140px; padding-bottom: 140px; }
.error-page .h-page { margin-bottom: 26px; }

/* --------------------------------------------------------------------------
   Adaptatif
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
  .cols, .cols--aside { grid-template-columns: 1fr; gap: 34px; }
  .sticky-col { position: static; }
}

/* ---- Menu hamburger ------------------------------------------------------ */

@media (max-width: 780px) {
  .nav-toggle { display: block; }

  .site-header .container {
    padding-top: 16px;
    padding-bottom: 16px;
    align-items: center;
  }

  .brand { font-size: 18px; }

  /* La navigation devient un panneau deroulant sous l'en-tete */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule-mid);
    box-shadow: 0 18px 30px -24px rgba(20, 18, 15, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .28s ease,
                transform .38s cubic-bezier(.16, 1, .3, 1),
                visibility 0s linear .38s;
  }

  .site-header.is-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .28s ease,
                transform .38s cubic-bezier(.16, 1, .3, 1),
                visibility 0s;
  }

  /* Fermeture immediate au clic sur un lien (evite un panneau fige
     dans l'instantane de la transition de page) */
  .site-header.is-instant .nav,
  .site-header.is-instant .nav-toggle-bars i { transition: none; }

  .nav a {
    padding: 17px 0;
    border-bottom: 1px solid rgba(20, 18, 15, 0.08);
    font-size: 13px;
    letter-spacing: 0.14em;
  }
  .nav a:last-child { border-bottom: 0; }

  /* Dans le panneau, la page courante se distingue par la couleur seule */
  .nav a:hover,
  .nav a:focus-visible,
  .nav a[aria-current="page"] {
    border-bottom-color: rgba(20, 18, 15, 0.08);
  }
  .nav a:last-child:hover,
  .nav a:last-child:focus-visible,
  .nav a:last-child[aria-current="page"] {
    border-bottom-color: transparent;
  }
}

@media (max-width: 400px) {
  .brand { font-size: 15.5px; }
}

@media (max-width: 640px) {
  .pad-y, .pad-hero, .pad-cards, .pad-quotes, .pad-cta,
  .pad-title, .pad-body, .pad-list, .pad-faq, .pad-detail,
  .error-page {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .contact-aside { border-left: 0; padding-left: 0; }

  .faq-q { font-size: 19px; gap: 18px; }
}

/* --------------------------------------------------------------------------
   Impression
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .band-dark, .btn, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .faq-a { max-height: none !important; opacity: 1 !important; }
}
