/* ═══════════════════════════════════════════════════════════
   EDMOND'S & COMPANY — Refonte visuelle : démarche, maison,
   formulaire de contact, statistiques d'accueil
   ═══════════════════════════════════════════════════════════ */

/* Accueil : le contenu passe au-dessus du voile (une règle antérieure le plaçait dessous) */
#hero .hero-inner { z-index: 3; }
.hero-overlay { background:
  linear-gradient(90deg, rgba(26,20,16,.78) 0%, rgba(26,20,16,.5) 45%, rgba(26,20,16,.05) 75%),
  linear-gradient(to bottom, rgba(26,20,16,.45) 0%, rgba(26,20,16,.15) 35%, rgba(26,20,16,.6) 72%, rgba(26,20,16,.95) 100%); }
@media (max-width: 640px) { .hero-overlay { background: linear-gradient(to bottom, rgba(26,20,16,.6), rgba(26,20,16,.72) 50%, rgba(26,20,16,.95)); } }

/* Accueil : statistiques */
.hero-stats .hs-item { display: flex; flex-direction: column; gap: .3rem; margin-right: 2.5rem; }
.hero-stats .hs-val { font-size: 2rem; font-weight: 400; color: var(--gold-l); line-height: 1; }

/* ── Démarche ─────────────────────────────────────────────── */
#demarche { background: var(--cream-l); padding: 110px 0; }
.dm-steps { list-style: none; margin: 3.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: dm; position: relative; }
.dm-steps::before { content: ""; position: absolute; top: 27px; left: 12.5%; right: 12.5%; height: 1px; background: linear-gradient(90deg, var(--gold), var(--gold-d)); opacity: .5; }
.dm-steps li { position: relative; padding: 0 1.4rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.dm-n { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-l); border: 1px solid var(--gold); color: var(--gold-d); font-family: var(--font-s); font-size: 1.3rem; position: relative; z-index: 1; transition: background .3s, color .3s; }
.dm-steps li:hover .dm-n { background: var(--brown); color: var(--gold-l); }
.dm-steps strong { margin-top: 1.4rem; font-family: var(--font-s); font-weight: 500; font-size: 1.35rem; color: var(--brown); }
.dm-steps p { color: var(--text-m); font-size: .86rem; line-height: 1.65; margin: .6rem 0 .9rem; }
.dm-steps em { margin-top: auto; font-style: normal; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-d); border-top: 1px solid var(--border); padding-top: .6rem; }

/* ── La Maison ────────────────────────────────────────────── */
#maison { background: var(--brown); padding: 110px 0; }
.mx-head { max-width: 760px; }
.mx-head h2 { color: var(--white); }
.mx-head h2 em { color: var(--gold-l); }
.mx-intro { color: rgba(240,232,214,.72); font-size: 1rem; line-height: 1.8; margin-top: 1.2rem; }
.mx-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 3rem 0 5rem; }
.mx-value { border: 1px solid rgba(184,154,106,.2); padding: 1.8rem 1.6rem; background: rgba(255,255,255,.02); transition: border-color .3s, transform .3s; }
.mx-value:hover { border-color: rgba(184,154,106,.55); transform: translateY(-3px); }
.mx-value svg { width: 40px; height: 40px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mx-value strong { display: block; margin: 1.1rem 0 .5rem; color: var(--white); font-family: var(--font-s); font-weight: 500; font-size: 1.4rem; }
.mx-value p { color: rgba(240,232,214,.6); font-size: .86rem; line-height: 1.7; margin: 0; }

.mx-founder { display: grid; grid-template-columns: 360px 1fr; gap: 4.5rem; align-items: start; }
.mx-photo { position: relative; }
.mx-photo::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--gold); opacity: .55; }
.mx-photo img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; }
.mx-kicker { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 .6rem; }
.mx-bio h3 { font-family: var(--font-s); font-weight: 400; font-size: 2.4rem; color: var(--white); margin: 0; }
.mx-role { color: var(--gold-l); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; margin: .4rem 0 1.6rem; }
.mx-bio > p:not(.mx-kicker):not(.mx-role) { color: rgba(240,232,214,.78); font-size: .95rem; line-height: 1.85; margin: 0 0 1rem; }
.mx-creds { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.mx-creds li { border-top: 2px solid var(--gold); background: rgba(255,255,255,.03); padding: .8rem .9rem; }
.mx-creds b { display: block; color: var(--white); font-family: var(--font-s); font-weight: 500; font-size: 1.2rem; }
.mx-creds span { display: block; color: rgba(240,232,214,.55); font-size: .72rem; line-height: 1.45; margin-top: .2rem; }

.mx-quote { margin: 5rem auto 0; max-width: 900px; text-align: center; position: relative; padding-top: 2.6rem; }
.mx-quote::before { content: "“"; position: absolute; top: -1.4rem; left: 50%; transform: translateX(-50%); font-family: var(--font-s); font-size: 5.5rem; line-height: 1; color: var(--gold); opacity: .6; }
.mx-quote p { font-family: var(--font-s); font-style: italic; font-weight: 300; font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.6; color: var(--cream); margin: 0; }
.mx-quote p em { font-style: normal; color: var(--gold-l); }
.mx-quote cite { display: block; margin-top: 1.4rem; font-style: normal; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

/* ── Formulaire de contact : rythme vertical régulier ─────── */
.contact-form .form-row { margin-bottom: 0; }
.contact-form .form-group { margin-bottom: 1.3rem; }
.contact-form .form-row .form-group { margin-bottom: 1.3rem; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .dm-steps { grid-template-columns: 1fr 1fr; row-gap: 2.6rem; }
  .dm-steps::before { display: none; }
  .mx-founder { grid-template-columns: 1fr; gap: 3rem; }
  .mx-photo { max-width: 340px; }
}
@media (max-width: 640px) {
  #demarche, #maison { padding: 80px 0; }
  .hero-stats .hs-item { margin-right: 1.4rem; }
  .hero-stats .hs-val { font-size: 1.6rem; }
  .dm-steps { grid-template-columns: 1fr; row-gap: 0; }
  .dm-steps::before { display: block; left: 27px; right: auto; top: 27px; bottom: 27px; width: 1px; height: auto; }
  .dm-steps li { display: grid; grid-template-columns: 54px 1fr; column-gap: 1.2rem; text-align: left; align-items: start; padding: 0 0 2rem; }
  .dm-n { grid-row: span 3; }
  .dm-steps strong { margin-top: .7rem; }
  .dm-steps p { margin: .4rem 0 .6rem; }
  .dm-steps em { margin-top: 0; justify-self: start; }
  .mx-values { grid-template-columns: 1fr; margin-bottom: 3.5rem; }
  .mx-photo { max-width: none; margin-right: 18px; }
  .mx-bio h3 { font-size: 2rem; }
  .mx-creds { grid-template-columns: 1fr 1fr; }
}

#contact .contact-form .form-row { margin-bottom: 0 !important; }
#contact .contact-form .form-group { margin-bottom: 1.15rem !important; }

/* Accueil : image de couverture en WebP (2 fois plus légère), JPEG en secours */
.hero-bg-img { background-image: url('hero-cover.jpeg'); background-image: image-set(url('hero-cover.webp') type('image/webp'), url('hero-cover.jpeg') type('image/jpeg')); }

/* ── Sélecteur de langue ─────────────────────────────────── */
.lang-switch { display: inline-flex; border: 1px solid rgba(184,154,106,.5); font-size: .64rem; letter-spacing: .12em; text-decoration: none; }
.lang-switch span { padding: .32rem .5rem; color: inherit; opacity: .55; transition: opacity .2s, background .2s; }
.lang-switch span.on { background: var(--gold); color: var(--brown); opacity: 1; }
.lang-switch:hover span { opacity: 1; }
.mobile-menu .mm-lang { color: var(--gold) !important; }

/* ── Mouvement : frises, cadre, survols, fil de lecture ───── */
.will-draw.dm-steps::before, .will-draw.tool-steps::before { transform: scaleX(0); transform-origin: left; transition: transform 1.4s cubic-bezier(.2,.7,.2,1) .2s; }
.drawn.dm-steps::before, .drawn.tool-steps::before { transform: scaleX(1); }
.will-draw.dm-steps .dm-n { transition: background .3s, color .3s, box-shadow .6s; }
.drawn.dm-steps .dm-n { box-shadow: 0 0 0 6px rgba(184,154,106,.12); }
.will-draw.mx-photo::before { transform: translate(-18px, -18px); opacity: 0; transition: transform 1.1s cubic-bezier(.2,.7,.2,1) .3s, opacity .8s .3s; }
.drawn.mx-photo::before { transform: none; opacity: .55; }
.mx-photo img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.mx-photo:hover img { transform: translate(-4px, -4px); }
.mx-creds li { transition: transform .25s, background .25s; }
.mx-creds li:hover { transform: translateY(-3px); background: rgba(184,154,106,.1); }
.exp-link strong { background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat; transition: background-size .35s ease; }
.exp-link:hover strong { background-size: 100% 1px; }
.page-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); transform: scaleX(0); transform-origin: left; z-index: 1001; pointer-events: none; }
@media (max-width: 640px) { .will-draw.dm-steps::before { transform: scaleY(0); transform-origin: top; } .drawn.dm-steps::before { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .page-progress { display: none; } }
@media print { .page-progress { display: none; } .will-draw::before { transform: none !important; opacity: .55 !important; } }

/* ── Mot du fondateur ── */
.mx-word { margin-top: 1rem; text-align: center; }
.mx-word > .mx-kicker { margin-bottom: 0; }
.mx-word .mx-quote { margin-top: 2.6rem; }
.mx-quote cite span { display: block; margin-top: .35rem; color: rgba(240,232,214,.5); letter-spacing: .16em; font-size: .62rem; }

/* Mot du fondateur : photo + citation */
.mx-word { display: grid; grid-template-columns: 320px 1fr; gap: 5rem; align-items: center; text-align: left; }
.mx-word .mx-quote { margin: 1.6rem 0 0; max-width: none; text-align: left; padding-top: 2.4rem; }
.mx-word .mx-quote::before { left: 0; transform: none; }
@media (max-width: 1024px) { .mx-word { grid-template-columns: 1fr; gap: 3rem; } .mx-word .mx-photo { max-width: 300px; } }
@media (max-width: 640px) { .mx-word .mx-photo { max-width: none; margin-right: 18px; } }

/* ── Équipe : cartes, biographie au clic ── */
.mx-team { margin-top: 6rem; padding-top: 4rem; border-top: 1px solid rgba(184,154,106,.18); }
.tm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.tm-intro { color: rgba(240,232,214,.6); font-size: .9rem; margin: 0; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 280px)); gap: 2.4rem; }
.tm-open { all: unset; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; cursor: pointer; }
.tm-photo { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #2e261e; }
.tm-photo::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(184,154,106,0); transition: border-color .4s, inset .4s; pointer-events: none; }
.tm-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: grayscale(.25); transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s; }
.tm-name { margin-top: 1.2rem; font-family: var(--font-s); font-size: 1.45rem; line-height: 1.2; color: var(--white); }
.tm-role { margin-top: .45rem; color: var(--gold-l); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.6; }
.tm-more { margin-top: 1rem; display: inline-flex; align-items: center; gap: .55rem; color: rgba(240,232,214,.6); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; transition: color .3s; }
.tm-more i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(184,154,106,.5); color: var(--gold); font-size: .9rem; transition: background .3s, color .3s, transform .4s; }
.tm-open:hover .tm-photo img, .tm-open:focus-visible .tm-photo img { transform: scale(1.04); filter: none; }
.tm-open:hover .tm-photo::after, .tm-open:focus-visible .tm-photo::after { inset: 10px; border-color: rgba(212,185,138,.7); }
.tm-open:hover .tm-more, .tm-open:focus-visible .tm-more { color: var(--gold-l); }
.tm-open:hover .tm-more i, .tm-open:focus-visible .tm-more i { background: var(--gold); color: #1a1410; transform: rotate(90deg); }
.tm-open:focus-visible { outline: 2px solid var(--gold-bright, #d4b98a); outline-offset: 6px; }

.tm-dialog { margin: auto; inset: 0; width: min(920px, calc(100vw - 2rem)); max-height: calc(100vh - 3rem); padding: 0; border: 1px solid rgba(184,154,106,.35); background: #1a1410; color: var(--cream); box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: auto; }
.tm-dialog::backdrop { background: rgba(10,8,6,.72); backdrop-filter: blur(3px); }
.tm-dialog[open] { animation: tmIn .35s cubic-bezier(.2,.7,.2,1); }
@keyframes tmIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.tm-close { position: absolute; top: .6rem; right: .8rem; z-index: 2; background: none; border: 0; color: rgba(240,232,214,.7); font-size: 2rem; line-height: 1; cursor: pointer; padding: .2rem .4rem; }
.tm-close:hover { color: #fff; }
.tm-dlg-inner { display: grid; grid-template-columns: 260px 1fr; gap: 2.6rem; padding: 2.6rem; align-items: start; }
.tm-dlg-inner .tm-dlg-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-bottom: 2px solid var(--gold); }
.tm-dlg-inner h3 { font-family: var(--font-s); font-weight: 400; font-size: 2rem; color: var(--white); margin: 0; }
.tm-dlg-inner .mx-role { margin: .4rem 0 1.4rem; }
.tm-dlg-inner .tm-dlg-text > p { color: rgba(240,232,214,.8); font-size: .93rem; line-height: 1.85; margin: 0 0 1rem; }
.tm-dlg-inner .mx-creds { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
html.tm-lock { overflow: hidden; }
@media (max-width: 760px) {
  .tm-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  .tm-name { font-size: 1.15rem; }
  .tm-role { font-size: .58rem; }
  .tm-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; }
  .tm-dlg-inner { grid-template-columns: 1fr; gap: 1.6rem; padding: 3.2rem 1.25rem 2rem; }
  .tm-dlg-inner .tm-dlg-photo { max-width: 180px; }
  .tm-dlg-inner h3 { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) { .tm-dialog[open] { animation: none; } .tm-photo img { transition: none; } }
