/* ==========================================================================
   Office Notarial Guillaume-Susini — overrides custom (au-delà de Tailwind)
   Palette : navy #0F2942 · gold #C0A062 · ivory #F8F6F1 · slate #3D4754
   Toutes les classes "composant" sont en CSS pur (Tailwind CDN ne gère pas
   @apply dans un fichier externe).
   ========================================================================== */

body {
  background-color: #F8F6F1;
  color: #3D4754;
  overflow-x: hidden;
}

#domaines,
#contact {
  background-color: #0F2942;
  color: #F8F6F1;
}

:root {
  --navy: #0F2942;
  --navy-deep: #0A1E32;
  --navy-soft: #1B3A57;
  --gold: #C0A062;
  --gold-light: #D9BE83;
  --gold-dark: #A9894C;
  --ivory: #F8F6F1;
  --slate: #3D4754;
}

html { scroll-behavior: smooth; }

/* Conteneur principal (ne depend pas uniquement de Tailwind CDN) */
.site-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (min-width: 1024px) {
  .site-container { padding-left: 2rem; padding-right: 2rem; }
}

/* Décalage des ancres pour compenser le header sticky */
section[id] { scroll-margin-top: 88px; }

/* Respect des préférences d'accessibilité (animations réduites) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   HEADER — fond sombre des le depart (plus de bandeau blanc en haut)
   -------------------------------------------------------------------------- */
#site-header {
  background: rgba(15, 41, 66, 0.97);
  border-bottom: 1px solid rgba(192, 160, 98, 0.22);
  box-shadow: 0 4px 24px rgba(10, 30, 50, 0.15);
}
.nav-title { color: var(--ivory); font-size: clamp(0.95rem, 2.5vw, 1.25rem); }
.nav-sub   { color: var(--gold-light); }
.nav-link  { color: rgba(248, 246, 241, 0.85); position: relative; transition: color .25s ease; }
.logo-mark { flex-shrink: 0; display: block; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--gold); transition: width .3s ease;
}
.nav-link:hover { color: var(--ivory); }
.nav-link:hover::after { width: 100%; }
.nav-phone { color: rgba(248, 246, 241, 0.9); transition: color .25s ease; }
.nav-phone:hover { color: var(--gold-light); }

/* Etat scrolle : fond ivoire, texte fonce (ajoute par le JS) */
#site-header.scrolled {
  background: rgba(248, 246, 241, 0.98);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(15, 41, 66, 0.08);
  box-shadow: 0 1px 0 rgba(15, 41, 66, 0.06), 0 8px 30px rgba(15, 41, 66, 0.06);
}
#site-header.scrolled .nav-title { color: var(--navy); }
#site-header.scrolled .nav-sub   { color: var(--gold-dark); }
#site-header.scrolled .nav-link  { color: var(--slate); }
#site-header.scrolled .nav-link:hover { color: var(--navy); }
#site-header.scrolled .nav-phone { color: var(--slate); }
#site-header.scrolled .nav-phone:hover { color: var(--gold-dark); }
#site-header.scrolled #burger { color: var(--navy); }

/* --------------------------------------------------------------------------
   BOUTONS & LIENS
   -------------------------------------------------------------------------- */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: 2px;
  background: var(--gold); color: var(--navy-deep);
  font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--gold);
  transition: background .25s ease, transform .2s ease, box-shadow .25s ease;
}
.btn-gold:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  transform: translateY(-2px); box-shadow: 0 10px 24px rgba(192, 160, 98, 0.35);
}
.btn-gold:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.btn-outline-light {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.6rem; border-radius: 2px;
  color: var(--ivory); border: 1px solid rgba(248, 246, 241, 0.4);
  font-weight: 500; transition: background .25s ease, border-color .25s ease;
}
.btn-outline-light:hover { background: rgba(248, 246, 241, 0.08); border-color: var(--gold-light); }

.link-gold {
  color: var(--gold-dark); font-weight: 600; transition: color .2s ease;
}
.link-gold:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   MENU BURGER (mobile)
   -------------------------------------------------------------------------- */
#burger {
  color: var(--ivory);
  display: flex; flex-direction: column; gap: 5px; width: 30px;
  flex-shrink: 0;
}
#site-header.scrolled #burger { color: var(--navy); }
.burger-line {
  display: block; height: 2px; width: 26px; background: currentColor; border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
}
#burger.open .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger.open .burger-line:nth-child(2) { opacity: 0; }
#burger.open .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Quand le menu mobile est ouvert, le burger reste clair */
#burger.open { color: var(--ivory); }

#mobile-menu.open { transform: translateX(0); }
.mobile-link { color: var(--ivory); transition: color .2s ease; }
.mobile-link:hover { color: var(--gold-light); }

/* --------------------------------------------------------------------------
   TITRES DE SECTION
   -------------------------------------------------------------------------- */
.hairline-gold { display: inline-block; height: 1px; background: var(--gold); vertical-align: middle; }

.section-eyebrow {
  display: flex; align-items: center; gap: .75rem;
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 600;
  color: var(--gold-dark); margin-bottom: 1rem;
}
.section-title {
  font-family: '"Cormorant Garamond"', Georgia, serif;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1; font-weight: 600; color: var(--navy);
}
/* Variante sur fond foncé */
.bg-navy .section-title, .section-title.text-ivory { color: var(--ivory); }
.bg-navy .section-eyebrow { color: var(--gold-light); }

/* --------------------------------------------------------------------------
   FOND TEXTURÉ (filet décoratif discret)
   -------------------------------------------------------------------------- */
.bg-pattern-grid {
  background-image:
    linear-gradient(to right, var(--gold) 1px, transparent 1px),
    linear-gradient(to bottom, var(--gold) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* --------------------------------------------------------------------------
   SECTION "L'ÉTUDE" — cartes de valeurs
   -------------------------------------------------------------------------- */
.value-card { border-top: 1px solid rgba(192, 160, 98, 0.4); padding-top: 1rem; }
.value-num {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem;
  color: var(--gold-dark); font-weight: 600;
}
.value-title { font-weight: 600; color: var(--navy); margin: .25rem 0; }
.value-text { font-size: .9rem; color: var(--slate); opacity: .85; line-height: 1.5; }

/* --------------------------------------------------------------------------
   DOMAINES D'EXPERTISE — cartes
   -------------------------------------------------------------------------- */
.domain-card {
  background: var(--navy); padding: 2.25rem 2rem;
  transition: background .35s ease, transform .35s ease;
}
.domain-card:hover { background: var(--navy-soft); }
.domain-icon {
  width: 2.75rem; height: 2.75rem; color: var(--gold-light);
  margin-bottom: 1.25rem; transition: transform .35s ease;
}
.domain-card:hover .domain-icon { transform: translateY(-4px); }
.domain-title {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem;
  color: var(--ivory); font-weight: 600; margin-bottom: .5rem;
}
.domain-text { font-size: .92rem; color: rgba(248, 246, 241, 0.7); line-height: 1.6; }

/* --------------------------------------------------------------------------
   ÉQUIPE — cartes portraits
   -------------------------------------------------------------------------- */
.team-card { text-align: center; }
.team-photo {
  width: 180px; height: 180px; object-fit: cover; border-radius: 9999px;
  margin: 0 auto 1.5rem; border: 3px solid #fff;
  box-shadow: 0 10px 30px rgba(15, 41, 66, 0.12);
  outline: 1px solid rgba(192, 160, 98, 0.5); outline-offset: 6px;
  transition: transform .35s ease, box-shadow .35s ease;
}
.team-card:hover .team-photo { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(15, 41, 66, 0.2); }
.team-name {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem;
  color: var(--navy); font-weight: 600;
}
.team-role {
  text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; font-weight: 600;
  color: var(--gold-dark); margin: .35rem 0 .9rem;
}
.team-bio { font-size: .92rem; color: var(--slate); opacity: .85; line-height: 1.6; max-width: 18rem; margin: 0 auto; }

/* --------------------------------------------------------------------------
   POURQUOI NOUS CHOISIR — cartes
   -------------------------------------------------------------------------- */
.why-card {
  background: var(--ivory); padding: 2rem;
  transition: transform .3s ease, box-shadow .3s ease;
}
.why-card:hover { box-shadow: inset 0 0 0 1px rgba(192, 160, 98, 0.4); }
.why-icon { width: 2.25rem; height: 2.25rem; color: var(--gold-dark); margin-bottom: 1rem; }
.why-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.4rem; color: var(--navy); font-weight: 600; margin-bottom: .4rem; }
.why-text { font-size: .92rem; color: var(--slate); opacity: .85; line-height: 1.6; }

/* --------------------------------------------------------------------------
   ACTUALITÉS — cartes articles
   -------------------------------------------------------------------------- */
.article-card { }
.article-img {
  width: 100%; height: 220px; object-fit: cover;
  transition: transform .5s ease;
}
.article-card a:hover .article-img { transform: scale(1.06); }
.article-tag {
  display: inline-block; text-transform: uppercase; letter-spacing: .16em;
  font-size: .66rem; font-weight: 700; color: var(--gold-dark); margin-bottom: .6rem;
}
.article-title {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; line-height: 1.2;
  color: var(--navy); font-weight: 600; margin-bottom: .6rem; transition: color .25s ease;
}
.article-card a:hover .article-title { color: var(--gold-dark); }
.article-excerpt { font-size: .92rem; color: var(--slate); opacity: .85; line-height: 1.6; margin-bottom: 1rem; }
.article-more { font-size: .82rem; font-weight: 600; color: var(--gold-dark); }

/* --------------------------------------------------------------------------
   FAQ — accordéon
   -------------------------------------------------------------------------- */
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  text-align: left; padding: 1.4rem 0; cursor: pointer;
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.35rem; font-weight: 600;
  color: var(--navy); background: none; border: none; transition: color .2s ease;
}
.faq-question:hover { color: var(--gold-dark); }
.faq-chevron { width: 1.4rem; height: 1.4rem; color: var(--gold-dark); flex-shrink: 0; transition: transform .35s ease; }
.faq-question[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  overflow: hidden; max-height: 0; transition: max-height .4s ease, opacity .3s ease; opacity: 0;
}
.faq-answer p { padding: 0 0 1.4rem; color: var(--slate); line-height: 1.7; font-size: .95rem; max-width: 95%; }

/* --------------------------------------------------------------------------
   FORMULAIRE DE CONTACT
   -------------------------------------------------------------------------- */
.form-label {
  display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; color: var(--gold-light); margin-bottom: .45rem;
}
.form-input {
  width: 100%; padding: .75rem .9rem; border-radius: 2px;
  background: rgba(248, 246, 241, 0.06); color: var(--ivory);
  border: 1px solid rgba(248, 246, 241, 0.2);
  transition: border-color .2s ease, background .2s ease;
}
.form-input::placeholder { color: rgba(248, 246, 241, 0.4); }
.form-input:focus {
  outline: none; border-color: var(--gold); background: rgba(248, 246, 241, 0.1);
}
.form-input option { color: #111; }
.form-input.invalid { border-color: #e08a8a; }
.form-error { color: #f0b4b4; font-size: .78rem; margin-top: .35rem; min-height: 0; }

/* --------------------------------------------------------------------------
   BLOCS COORDONNÉES
   -------------------------------------------------------------------------- */
.contact-block { }
.contact-block-title {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.35rem; font-weight: 600;
  color: var(--ivory); margin-bottom: .9rem; padding-bottom: .5rem;
  border-bottom: 1px solid rgba(192, 160, 98, 0.3);
}
.contact-list { display: flex; flex-direction: column; gap: .9rem; }
.contact-list li { display: flex; gap: .75rem; align-items: flex-start; font-size: .92rem; color: rgba(248, 246, 241, 0.85); line-height: 1.5; }
.contact-ico { width: 1.25rem; height: 1.25rem; color: var(--gold-light); flex-shrink: 0; margin-top: .15rem; }
.contact-link { color: var(--gold-light); transition: color .2s ease; }
.contact-link:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer-title {
  text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700;
  color: var(--gold-light); margin-bottom: 1rem;
}
.footer-link { color: rgba(248, 246, 241, 0.7); transition: color .2s ease; }
.footer-link:hover { color: var(--gold-light); }

/* --------------------------------------------------------------------------
   ANIMATIONS AU SCROLL (IntersectionObserver ajoute .is-visible)
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Bouton retour en haut visible */
#back-to-top.visible { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 5.5rem;
  padding-bottom: 10.5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(118deg, rgba(10, 30, 50, 0.97) 0%, rgba(15, 41, 66, 0.88) 45%, rgba(27, 58, 87, 0.75) 100%),
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(192, 160, 98, 0.12), transparent 55%),
    linear-gradient(160deg, #0a1e32 0%, #0f2942 50%, #1b3a57 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(to right, #c0a062 1px, transparent 1px),
    linear-gradient(to bottom, #c0a062 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-trust {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  background: rgba(10, 30, 50, 0.92);
  border-top: 1px solid rgba(192, 160, 98, 0.25);
  backdrop-filter: blur(6px);
}
.hero-trust ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 640px) {
  .hero-trust ul { grid-template-columns: repeat(3, 1fr); }
  .hero-section { padding-bottom: 7rem; }
}
.hero-trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0;
  color: var(--ivory);
  font-size: 0.875rem;
  line-height: 1.45;
}
@media (min-width: 640px) {
  .hero-trust li { padding: 1.15rem 1.25rem; border-left: 1px solid rgba(192, 160, 98, 0.15); }
  .hero-trust li:first-child { border-left: none; padding-left: 0; }
}
.hero-trust li svg { flex-shrink: 0; width: 1.65rem; height: 1.65rem; color: var(--gold-light); margin-top: 0.1rem; }

/* Visuels de remplacement (sans images externes) */
.media-placeholder {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e8e4dc 0%, #d4cfc4 100%);
  color: var(--navy);
  border: 1px solid rgba(192, 160, 98, 0.35);
  position: relative;
  overflow: hidden;
}
.media-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(192, 160, 98, 0.15) 100%);
}
.media-placeholder span {
  position: relative;
  z-index: 1;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
  opacity: 0.75;
}
.media-placeholder--etude { min-height: 280px; }
@media (min-width: 1024px) { .media-placeholder--etude { min-height: 520px; } }

.article-thumb {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background: linear-gradient(160deg, var(--navy-soft) 0%, var(--navy) 100%);
  border-bottom: 2px solid var(--gold);
}
.article-thumb span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--gold-light);
}

/* Portraits equipe : initiales (pas de photo externe) */
.team-avatar {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--gold-light);
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-soft) 100%);
  border: 3px solid #fff;
  outline: 1px solid rgba(192, 160, 98, 0.5);
  outline-offset: 5px;
  box-shadow: 0 10px 28px rgba(15, 41, 66, 0.15);
  transition: transform .35s ease, box-shadow .35s ease;
}
.team-card:hover .team-avatar {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(15, 41, 66, 0.22);
}
@media (min-width: 640px) {
  .team-avatar { width: 180px; height: 180px; font-size: 2.5rem; }
}

/* Cartouche etude : ne debord pas sur mobile */
.etude-badge {
  position: absolute;
  bottom: -1rem;
  right: 0;
  left: auto;
  max-width: calc(100% - 1rem);
}
@media (min-width: 640px) {
  .etude-badge { right: 1.5rem; bottom: -1.5rem; max-width: none; }
}

/* Grilles responsive renforcees */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }

.domains-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(192, 160, 98, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
@media (min-width: 640px) { .domains-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .domains-grid { grid-template-columns: repeat(3, 1fr); } }

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(192, 160, 98, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
@media (min-width: 640px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
}

/* Header mobile : nom raccourci */
@media (max-width: 400px) {
  .nav-sub { display: none; }
  .nav-brand-long { display: none; }
  .nav-brand-short { display: block; }
}
@media (min-width: 401px) {
  .nav-brand-short { display: none; }
}

/* FAQ : texte qui ne debord pas */
.faq-question { font-size: clamp(1.05rem, 3.5vw, 1.35rem); padding-right: 0.5rem; }

/* Footer mentions : pas de debordement */
.footer-legal { word-break: break-word; }

/* Sections : padding mobile reduit */
@media (max-width: 639px) {
  #etude, #equipe, #pourquoi, #actualites, #faq, #contact {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
}

/* Grille etude : image avant texte sur mobile */
#etude .grid { display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 1024px) {
  #etude .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
}
