/* ============================================
   MON-BAIL-COMMERCIAL.FR — HOCHMAN AVOCATS
   Charte graphique cohérente avec avocats.hochman.fr
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  /* Brand Colors */
  --bleu-marine: #1E3A5F;
  --bleu-marine-dark: #152d4a;
  --bleu-marine-light: #2a5080;
  --creme: #FAF8F5;
  --creme-dark: #F0EDE8;
  --blanc: #FFFFFF;
  --noir: #000000;
  --gris-pro: #666666;
  --gris-clair: #F5F5F5;
  --gris-border: #DDDDDD;
  --gris-texte: #333333;
  --rouge-hochman: #D52B2B;
  --rouge-hover: #B82222;
  --or-accent: #C9A84C;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Roboto', -apple-system, sans-serif;

  /* Spacing */
  --section-pad: clamp(3rem, 6vw, 6rem);
  --content-max: 820px;
  --wide-max: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--gris-texte);
  background: var(--creme);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* --- Utility --- */
.container { max-width: var(--wide-max); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.content-narrow { max-width: var(--content-max); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  background: var(--bleu-marine);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.15);
}

.header-inner {
  max-width: var(--wide-max);
  margin: 0 auto;
  padding: .75rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--blanc);
  flex-shrink: 0;
}

.header-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
}

.header-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
}

.header-logo-text small {
  display: block;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .15em;
  opacity: .7;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--rouge-hochman);
  color: var(--blanc);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  padding: .6rem 1.25rem;
  border-radius: 4px;
  transition: background .2s;
  white-space: nowrap;
}
.header-cta:hover { background: var(--rouge-hover); }

/* Mobile nav */
@media (max-width: 600px) {
  .header-logo-text { font-size: .95rem; }
  .header-cta span.desktop-only { display: none; }
}

/* ============================================
   HERO BANNER (Page Pilier & Articles)
   ============================================ */
.hero-banner {
  position: relative;
  background: var(--bleu-marine);
  color: var(--blanc);
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(30,58,95,.6) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-banner .container { position: relative; z-index: 1; }

.hero-banner h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.hero-banner .lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  max-width: 700px;
  opacity: .9;
}

.hero-breadcrumb {
  font-size: .85rem;
  margin-bottom: 1.5rem;
  opacity: .7;
}
.hero-breadcrumb a { color: var(--blanc); text-decoration: underline; text-underline-offset: 2px; }

/* Article banner with image */
.article-hero {
  min-height: 380px;
  display: flex;
  align-items: flex-end;
}

.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,58,95,.95) 0%, rgba(30,58,95,.6) 50%, rgba(30,58,95,.3) 100%);
  pointer-events: none;
}

.article-hero .container { position: relative; z-index: 2; padding-bottom: 2.5rem; }

/* ============================================
   PILLAR PAGE — Sections
   ============================================ */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

.expertise-card {
  background: var(--blanc);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-left: 4px solid var(--rouge-hochman);
  transition: transform .25s, box-shadow .25s;
}
.expertise-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
}

.expertise-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--bleu-marine);
  margin-bottom: .75rem;
}

.pillar-chapter {
  padding: var(--section-pad) 0;
}

.pillar-chapter:nth-child(even) { background: var(--blanc); }

.pillar-chapter h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--bleu-marine);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 3px solid var(--rouge-hochman);
  max-width: var(--content-max);
}

.pillar-chapter .chapter-intro {
  font-size: 1.05rem;
  max-width: var(--content-max);
  margin-bottom: 2rem;
  color: var(--gris-pro);
}

.theme-block {
  max-width: var(--content-max);
  margin-bottom: 2.5rem;
}

.theme-block h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--bleu-marine);
  margin-bottom: .5rem;
}

.theme-block p {
  margin-bottom: 1rem;
  color: var(--gris-texte);
}

.article-links {
  list-style: none;
  margin: 1rem 0;
}

.article-links li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--gris-border);
}

.article-links li:last-child { border-bottom: none; }

.article-links a {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  text-decoration: none;
  color: var(--bleu-marine);
  font-weight: 500;
  transition: color .2s;
}

.article-links a::before {
  content: '→';
  color: var(--rouge-hochman);
  font-weight: 700;
  flex-shrink: 0;
}

.article-links a:hover { color: var(--rouge-hochman); }

/* TOC */
.toc {
  background: var(--blanc);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  margin: 2.5rem auto;
  max-width: var(--content-max);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.toc h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--bleu-marine);
  margin-bottom: 1rem;
  border-bottom: none;
  padding-bottom: 0;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  padding: .5rem 0;
  border-bottom: 1px solid var(--gris-border);
}

.toc li::before {
  content: 'Chapitre ' counter(toc) ' ';
  font-weight: 700;
  color: var(--rouge-hochman);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.toc a {
  text-decoration: none;
  color: var(--bleu-marine);
  font-weight: 500;
  transition: color .2s;
}
.toc a:hover { color: var(--rouge-hochman); }

/* ============================================
   ARTICLE PAGES — Content Styling
   ============================================ */
.article-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-pad) clamp(1.25rem, 4vw, 3rem);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--noir);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--rouge-hochman);
}

.article-content h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--noir);
  margin-top: 2rem;
  margin-bottom: .75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--noir);
}

.article-content a {
  color: var(--noir);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s;
}
.article-content a:hover { color: var(--rouge-hochman); }

.article-content ul, .article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: .5rem;
}

/* Blockquote / Jurisprudence */
.article-content blockquote,
.jurisprudence {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--rouge-hochman);
  background: rgba(245,245,245,.5);
  font-style: italic;
  color: var(--gris-pro);
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
}

.article-content thead th {
  background: var(--gris-clair);
  font-weight: 700;
  color: var(--noir);
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--gris-border);
}

.article-content tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gris-border);
  vertical-align: top;
}

.article-content tbody tr:last-child td { border-bottom: none; }

/* Responsive table */
@media (max-width: 640px) {
  .article-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================
   CTA BLOCKS
   ============================================ */
.cta-block {
  background: var(--noir);
  color: var(--blanc);
  padding: 2.5rem;
  border-radius: 8px;
  margin: 2.5rem 0;
  text-align: center;
}

.cta-block h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: .75rem;
  color: var(--blanc) !important;
}

.cta-block p {
  color: rgba(255,255,255,.85) !important;
  margin-bottom: 1.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.cta-block--light {
  background: var(--gris-clair);
  color: var(--noir);
}
.cta-block--light h3 { color: var(--noir) !important; }
.cta-block--light p { color: var(--gris-texte) !important; }

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--rouge-hochman);
  color: var(--blanc);
  text-decoration: none;
  font-weight: 500;
  padding: .85rem 1.75rem;
  border-radius: 4px;
  transition: background .2s, transform .15s;
  font-size: .95rem;
}
.btn-primary:hover { background: var(--rouge-hover); transform: translateY(-1px); color: var(--blanc); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  color: var(--rouge-hochman);
  text-decoration: none;
  font-weight: 500;
  padding: .85rem 1.75rem;
  border: 2px solid var(--rouge-hochman);
  border-radius: 4px;
  transition: all .2s;
  font-size: .95rem;
}
.btn-ghost:hover {
  background: var(--rouge-hochman);
  color: var(--blanc);
}

.cta-block .btn-ghost {
  color: var(--blanc);
  border-color: var(--blanc);
}
.cta-block .btn-ghost:hover {
  background: var(--blanc);
  color: var(--noir);
}

/* ============================================
   MAILLAGE INTERNE — Related Articles
   ============================================ */
.related-articles {
  background: var(--blanc);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  margin: 3rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.related-articles h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--bleu-marine);
  margin-bottom: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bleu-marine-dark);
  color: var(--blanc);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.footer-brand img { width: 50px; height: 50px; border-radius: 50%; }

.footer-brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.site-footer p {
  font-size: .9rem;
  opacity: .75;
  line-height: 1.7;
}

.site-footer h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--or-accent);
}

.footer-links {
  list-style: none;
}
.footer-links li { padding: .35rem 0; }
.footer-links a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--blanc); }

.footer-contact a {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .9rem;
  padding: .35rem 0;
  transition: color .2s;
}
.footer-contact a:hover { color: var(--blanc); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .8rem;
  opacity: .6;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp .6s ease-out both;
}

/* Stagger children */
.stagger > * { animation: fadeInUp .5s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: .1s; }
.stagger > *:nth-child(2) { animation-delay: .2s; }
.stagger > *:nth-child(3) { animation-delay: .3s; }
.stagger > *:nth-child(4) { animation-delay: .4s; }
.stagger > *:nth-child(5) { animation-delay: .5s; }
.stagger > *:nth-child(6) { animation-delay: .6s; }

/* ============================================
   CONTACT FLOATING BAR (Mobile)
   ============================================ */
.floating-contact {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bleu-marine);
  padding: .75rem 1rem;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}

.floating-contact-inner {
  display: flex;
  gap: .5rem;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
}

.floating-contact .btn-primary { padding: .65rem 1rem; font-size: .85rem; flex: 1; justify-content: center; }
.floating-contact .btn-wa {
  background: #25D366;
  color: var(--blanc);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: .85rem;
  flex: 1;
  justify-content: center;
  transition: background .2s;
}
.floating-contact .btn-wa:hover { background: #1fb855; }

@media (max-width: 768px) {
  .floating-contact { display: block; }
  body { padding-bottom: 65px; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .site-header, .site-footer, .floating-contact, .cta-block, .cta-buttons { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .article-content { padding: 0; }
}
