/*
Theme Name: Lorraine Hauenstein
Description: Thème à blocs sur mesure pour le site vitrine de Lorraine Hauenstein, réalisatrice. Textes, images, couleurs et mise en page modifiables depuis l'éditeur WordPress.
Version: 3.2
Requires at least: 6.5
Requires PHP: 7.4
Author: -
Text Domain: lh
*/

/* Ce fichier ne contient que les détails de mise en forme (traits, espacements, formulaire).
   Couleurs, police et tailles se règlent dans Apparence > Éditeur > Styles. */

.wp-site-blocks > * { margin-block: 0; }
a { text-decoration-color: var(--wp--preset--color--vert); text-underline-offset: 3px; }
.wp-block-image img, video, iframe { max-width: 100%; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- En-tête et pied de page ---------- */
.lh-header { border-bottom: 1px solid var(--wp--preset--color--trait); padding-block: 22px; }
.lh-header .wp-block-site-title a { text-decoration: none; }
.lh-header .wp-block-navigation a { text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.lh-header .wp-block-navigation a:hover,
.lh-header .wp-block-navigation .current-menu-item > a { border-bottom-color: var(--wp--preset--color--vert); color: var(--wp--preset--color--encre); }
.lh-footer { border-top: 1px solid var(--wp--preset--color--trait); padding-block: 32px; color: var(--wp--preset--color--gris); }
.lh-footer a { color: var(--wp--preset--color--gris); }
.lh-small { font-size: 15px; margin: 0; }
.wp-block-social-links { gap: 12px; }
.wp-block-social-links.is-style-logos-only .wp-social-link { color: var(--wp--preset--color--gris); background: none; }
.wp-block-social-links.is-style-logos-only .wp-social-link:hover { color: var(--wp--preset--color--vert); }
.wp-block-social-links.is-style-logos-only .wp-social-link a { padding: 4px; }

/* ---------- Sections ---------- */
.wp-block-post-content > * { margin-block: 0; }
.lh-section { border-top: 1px solid var(--wp--preset--color--trait); padding-block: clamp(48px, 8vw, 96px); }
.wp-block-post-content > .lh-section:first-child { border-top: 0; }
.lh-hero { padding-block: clamp(56px, 11vw, 140px); }
.lh-eyebrow { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--gris); margin-bottom: 18px; }
.lh-lead, .lh-muted { box-sizing: border-box; }
.lh-lead { font-size: var(--wp--preset--font-size--grand); padding-right: 35%; margin-bottom: 32px; }
.lh-muted { color: var(--wp--preset--color--gris); padding-right: 35%; }
@media (max-width: 781px) { .lh-lead, .lh-muted { padding-right: 0; } }
.lh-section h1, .lh-section h2 { margin-top: 0; }
.lh-two-col p { max-width: 36em; }
.lh-page-head { padding-bottom: 24px; }
.lh-page-head + .lh-section { border-top: 0; padding-top: 24px; }

/* ---------- Trois projets (accueil) ---------- */
.lh-cards { margin-top: 32px; gap: 28px; }
.lh-cards .wp-block-column { border-top: 2px solid var(--wp--preset--color--encre); padding-top: 16px; }
.lh-cards p { margin: 0 0 14px; font-size: 16px; color: var(--wp--preset--color--gris); }

/* ---------- Bandeau clients (logos) ---------- */
.wp-block-group.lh-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 40px; margin-top: 40px; }
.lh-logos .wp-block-image { margin: 0; flex: 0 0 180px; width: 180px; }
.lh-logos .wp-block-image img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: contain; filter: grayscale(1); mix-blend-mode: multiply; opacity: .75; transition: filter .25s ease, opacity .25s ease; }
.lh-logos .wp-block-image:hover img { filter: none; opacity: 1; }
.lh-logos p { font-weight: 700; color: var(--wp--preset--color--gris); margin: 0; }
@media (max-width: 900px) { .lh-logos .wp-block-image { flex-basis: 150px; width: 150px; } }
@media (max-width: 520px) { .wp-block-group.lh-logos { gap: 20px 16px; } .lh-logos .wp-block-image { flex-basis: calc(50% - 8px); width: calc(50% - 8px); } }

/* ---------- Réalisations ---------- */
.lh-project { border-top: 1px solid var(--wp--preset--color--trait); padding-block: 28px; gap: 8px 40px; margin: 0; }
.lh-project .lh-meta { font-size: 15px; color: var(--wp--preset--color--gris); margin: 0; }
.lh-project .lh-meta strong { display: block; color: var(--wp--preset--color--encre); font-size: 17px; }
.lh-project h3 { margin: 0 0 .25em; }
.lh-project h3.lh-featured { font-size: 26px; }
.lh-project p { margin: 0 0 6px; max-width: 40em; }
.lh-project .lh-roles { color: var(--wp--preset--color--gris); font-size: 16px; }

/* ---------- Boutons ---------- */
.wp-block-button .wp-block-button__link:hover { background: var(--wp--preset--color--vert); border-color: var(--wp--preset--color--vert); color: #fff; }
.lh-cta { align-items: center; gap: 16px 24px; }
.lh-cta p { margin: 0; }

/* ---------- Formulaire de contact ---------- */
.lh-form label { display: block; font-size: 15px; margin: 0 0 6px; color: var(--wp--preset--color--gris); }
.lh-form input[type="text"], .lh-form input[type="email"], .lh-form textarea {
  width: 100%; font: inherit; padding: 12px 14px; margin: 0 0 20px;
  border: 1px solid var(--wp--preset--color--encre); background: #fff; border-radius: 0; box-sizing: border-box;
}
.lh-form input:focus, .lh-form textarea:focus { outline: 3px solid var(--wp--preset--color--vert); outline-offset: 1px; }
.lh-form .lh-hp { position: absolute; left: -9999px; }
.lh-form button {
  padding: 14px 28px; background: var(--wp--preset--color--encre); color: var(--wp--preset--color--fond);
  border: 2px solid var(--wp--preset--color--encre); font: inherit; font-size: 16px; cursor: pointer;
}
.lh-form button:hover { background: var(--wp--preset--color--vert); border-color: var(--wp--preset--color--vert); color: #fff; }
.lh-notice { padding: 16px 20px; margin-bottom: 24px; border-left: 4px solid var(--wp--preset--color--alerte); background: #fff; }
.lh-notice.lh-ok { border-color: var(--wp--preset--color--vert); }

/* ---------- Lecteur vidéo : vignette YouTube + bouton lecture ---------- */
.lh-video { margin: 0 0 20px; }
.wp-block-embed.lh-video .wp-block-embed__wrapper::before { display: none !important; content: none !important; padding: 0 !important; }
.lh-video .wp-block-embed__wrapper > iframe { position: static; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.lh-yt { position: relative; aspect-ratio: 16 / 9; background: var(--wp--preset--color--encre); overflow: hidden; }
.lh-yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.lh-yt::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,0) 55%); }
.lh-yt:hover img { transform: scale(1.04); }
.lh-yt.is-playing::after { display: none; }
.lh-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lh-yt-btn { position: absolute; inset: 0; z-index: 2; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.lh-yt-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: var(--wp--preset--color--vert); box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .25s ease, background .25s ease; }
.lh-yt-play::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-38%, -50%);
  border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; transition: border-color .25s ease; }
.lh-yt-btn:hover .lh-yt-play, .lh-yt-btn:focus-visible .lh-yt-play { transform: scale(1.1); background: #fff; }
.lh-yt-btn:hover .lh-yt-play::before, .lh-yt-btn:focus-visible .lh-yt-play::before { border-left-color: var(--wp--preset--color--vert); }
.lh-yt-btn:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.lh-yt-link { position: absolute; left: 16px; bottom: 12px; z-index: 3; color: #fff; }

/* Lecteur plus petit dans la liste des réalisations */
.lh-project .lh-video { max-width: 520px; margin: 14px 0 10px; }
.lh-project .lh-yt-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.lh-project .lh-yt-play::before { border-width: 9px 0 9px 15px; }

/* ---------- Projets phares ---------- */
.lh-feature { gap: clamp(24px, 5vw, 64px); align-items: center; margin: 0 0 clamp(48px, 7vw, 88px); }
.lh-feature:last-child { margin-bottom: 0; }
.lh-feature .lh-video { margin: 0; box-shadow: 0 28px 56px -28px rgba(0,0,0,.45); }
.lh-feature p { margin: 0 0 8px; }
.lh-label { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--wp--preset--color--vert); margin-bottom: 14px !important; }
.lh-feature-title { font-size: clamp(28px, 3.6vw, 44px) !important; margin: 0 0 .3em; }
.lh-feature .lh-roles { color: var(--wp--preset--color--gris); font-size: 16px; }
@media (min-width: 782px) { .lh-reverse { flex-direction: row-reverse; } }
/* Sans vidéo (lien pas encore ajouté), le texte prend toute la largeur */
.lh-feature:not(:has(.lh-video)) > .wp-block-column { flex-basis: 100% !important; }
.lh-feature:not(:has(.lh-video)) > .wp-block-column:first-child { display: none; }

/* Cartes de l'accueil avec vidéo */
.lh-cards .wp-block-column:has(.lh-video) { border-top: 0; padding-top: 0; }
.lh-cards .lh-video { margin: 0 0 18px; box-shadow: 0 20px 40px -24px rgba(0,0,0,.4); }
.lh-cards .lh-yt-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
.lh-cards .lh-yt-play::before { border-width: 10px 0 10px 16px; }
