/*
Theme Name: Dissensus Médiation
Author: Yann Gourhant
Description: Thème WordPress complet, accessible et responsive pour une activité de médiation conventionnelle à Chambéry, Aix-les-Bains, dans le Pays voironnais et le nord-Isère.
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ygh-mediation
Tags: custom-logo, custom-menu, featured-images, accessibility-ready, blog, one-column
*/

:root {
  --navy: #18324a;
  --navy-2: #244862;
  --sage: #7c9487;
  --sage-light: #dce5df;
  --ivory: #f6f2e9;
  --paper: #fffdf8;
  --terracotta: #b96f52;
  --terracotta-dark: #98583f;
  --graphite: #252a2d;
  --muted: #657078;
  --line: #ddd9d0;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(24, 50, 74, .12);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--graphite);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: var(--terracotta-dark); }
h1, h2, h3, h4 {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 .65em;
}
h1 { font-size: clamp(2.65rem, 6vw, 5.45rem); }
h2 { font-size: clamp(2rem, 4vw, 3.55rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.85rem); }
p { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .4em; }
blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 5px solid var(--terracotta);
  background: var(--ivory);
  font-family: Georgia, serif;
  font-size: 1.2rem;
}
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 820px); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--white); padding: .8rem 1rem; border-radius: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 248, .94);
  border-bottom: 1px solid rgba(24, 50, 74, .09);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; flex-direction: column; color: var(--navy); text-decoration: none; line-height: 1; margin-right: auto; }
.brand-name { font-family: Georgia, serif; font-weight: 700; font-size: 1.35rem; }
.brand-sub { margin-top: .42rem; color: var(--sage); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 750; }
.custom-logo { max-height: 58px; width: auto; }
.main-navigation ul { display: flex; list-style: none; padding: 0; margin: 0; align-items: center; gap: 1.1rem; }
.main-navigation a { color: var(--graphite); text-decoration: none; font-size: .93rem; font-weight: 650; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--terracotta-dark); }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--navy); font-size: 1rem; font-weight: 700; padding: .65rem; }

.button, button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .78rem 1.25rem;
  border: 1px solid var(--terracotta);
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--white);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.button:hover, button:hover, input[type="submit"]:hover { color: var(--white); background: var(--terracotta-dark); transform: translateY(-1px); box-shadow: 0 10px 25px rgba(185,111,82,.25); }
.button-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.button-outline:hover { background: var(--navy); color: var(--white); }
.header-cta { white-space: nowrap; }

.hero { position: relative; min-height: 690px; display: grid; align-items: center; overflow: hidden; background: var(--navy); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,36,54,.96) 0%, rgba(15,36,54,.88) 38%, rgba(15,36,54,.28) 73%, rgba(15,36,54,.12) 100%); }
.hero-content { position: relative; z-index: 1; max-width: 730px; padding: 7rem 0; color: var(--white); }
.hero h1 { color: var(--white); }
.eyebrow { display: inline-block; margin-bottom: 1.1rem; color: #d7e2dc; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero-lead { max-width: 650px; font-size: 1.17rem; color: rgba(255,255,255,.88); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0; }
.hero .button-outline { color: var(--white); border-color: rgba(255,255,255,.72); }
.hero .button-outline:hover { background: var(--white); color: var(--navy); }
.trust-row { display: flex; flex-wrap: wrap; gap: .7rem 1.3rem; margin-top: 2rem; padding: 0; list-style: none; font-size: .88rem; color: rgba(255,255,255,.85); }
.trust-row li::before { content: "✓"; margin-right: .42rem; color: #bcd0c3; font-weight: 800; }

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section-ivory { background: var(--ivory); }
.section-navy { background: var(--navy); color: rgba(255,255,255,.88); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-head { max-width: 770px; margin-bottom: 2.6rem; }
.section-head p { font-size: 1.1rem; color: var(--muted); }
.section-navy .section-head p { color: rgba(255,255,255,.75); }
.grid { display: grid; gap: 1.35rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 1.65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 35px rgba(24,50,74,.05); }
.card p:last-child { margin-bottom: 0; }
.card-link { position: relative; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.card-link:hover { color: inherit; transform: translateY(-4px); box-shadow: var(--shadow); }
.card-link .more { margin-top: auto; padding-top: 1rem; color: var(--terracotta-dark); font-weight: 750; }
.icon-circle { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--sage-light); color: var(--navy); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 800; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.split-image img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.step { position: relative; padding: 0 0 2rem 4.25rem; }
.step:last-child { padding-bottom: 0; }
.step::before { content: attr(data-step); position: absolute; left: 0; top: 0; width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--terracotta); color: var(--white); font-weight: 850; }
.step::after { content: ""; position: absolute; top: 2.8rem; bottom: 0; left: 1.37rem; width: 1px; background: var(--line); }
.step:last-child::after { display: none; }
.notice { padding: 1.25rem 1.4rem; border: 1px solid #d5b19f; border-left: 5px solid var(--terracotta); border-radius: var(--radius-sm); background: #fff7f2; }
.notice-safety { border-color: #d4b4b4; border-left-color: #a54848; background: #fff6f6; }
.pill-list { display: flex; flex-wrap: wrap; gap: .65rem; padding: 0; list-style: none; }
.pill-list li { margin: 0; padding: .48rem .8rem; border-radius: 999px; background: var(--sage-light); color: var(--navy); font-size: .9rem; font-weight: 650; }
.cta-panel { padding: clamp(2rem, 5vw, 4rem); border-radius: 28px; background: var(--navy); color: rgba(255,255,255,.86); box-shadow: var(--shadow); }
.cta-panel h2 { color: var(--white); }

.page-hero { padding: clamp(4.5rem, 9vw, 7.5rem) 0 3.5rem; background: var(--ivory); }
.page-hero h1 { max-width: 930px; font-size: clamp(2.6rem, 5vw, 4.75rem); }
.page-hero .lead { max-width: 780px; color: var(--muted); font-size: 1.18rem; }
.page-content { padding: 4rem 0 7rem; }
.page-content > .narrow > *:first-child { margin-top: 0; }
.page-content h2 { margin-top: 2.2em; }
.page-content h3 { margin-top: 1.8em; }
.page-content .wide-block { width: min(1100px, calc(100vw - 2rem)); margin-left: 50%; transform: translateX(-50%); }

.contact-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 2rem; align-items: start; }
.contact-panel { position: sticky; top: 110px; padding: 1.6rem; border-radius: var(--radius); background: var(--ivory); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field-full { grid-column: 1 / -1; }
label { color: var(--navy); font-weight: 720; font-size: .93rem; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c8c9c5;
  border-radius: 10px;
  background: var(--white);
  color: var(--graphite);
  font: inherit;
  padding: .72rem .8rem;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(124,148,135,.28); border-color: var(--sage); }
.checkbox { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
.checkbox input { width: 20px; min-height: 20px; margin-top: .2rem; }
.help { color: var(--muted); font-size: .85rem; }
.honeypot { position: absolute !important; left: -9999px !important; }
.alert { margin-bottom: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); }
.alert-success { background: #e4f2e8; color: #224d30; }
.alert-error { background: #f9e5e5; color: #782828; }

.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.post-card { overflow: hidden; padding: 0; }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card-body { padding: 1.4rem; }
.meta { color: var(--muted); font-size: .85rem; }
.pagination { margin-top: 2rem; }

.site-footer { padding: 4rem 0 1.5rem; background: #10283a; color: rgba(255,255,255,.75); }
.site-footer h2, .site-footer h3 { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin: .35rem 0; }
.footer-links a { color: rgba(255,255,255,.78); text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; }

@media (max-width: 980px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .main-navigation { position: absolute; left: 0; right: 0; top: 100%; display: none; padding: .8rem 1rem 1.2rem; background: var(--paper); border-bottom: 1px solid var(--line); }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { align-items: stretch; flex-direction: column; gap: .25rem; }
  .main-navigation a { display: block; padding: .7rem .5rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-layout { grid-template-columns: 1fr; }
  .contact-panel { position: static; }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  .header-inner { min-height: 72px; }
  .brand-name { font-size: 1.13rem; }
  .brand-sub { font-size: .61rem; }
  .hero { min-height: 660px; }
  .hero-media::after { background: rgba(15,36,54,.82); }
  .hero-content { padding: 5rem 0; }
  .grid-2, .grid-3, .grid-4, .posts-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header, .site-footer, .actions, .button { display: none !important; }
  body { background: #fff; color: #000; }
  .page-content, .section { padding: 1rem 0; }
}
