/*
Theme Name: EBINFO Bordeaux
Template: twentytwentyfive
Version: 1.0.10
Description: Habillage EBINFO pour Twenty Twenty-Five.
*/

:root {
  --eb-red: #6b0f0f;
  --eb-deep: #3f0808;
  --eb-pale: #f7f3f2;
  --eb-ink: #242020;
}

.eb-site-header {
  border-bottom: 1px solid #eee4e2;
  background: #fff;
}

.eb-site-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.eb-site-header .eb-site-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.eb-brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

.eb-brand img {
  display: block;
  width: 150px;
  height: auto;
}

.eb-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
}

.eb-nav a {
  color: var(--eb-ink);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
}

.eb-nav a:hover { color: var(--eb-red); }

.eb-site-footer {
  background: var(--eb-deep);
  color: #fff;
  padding: 48px 0 26px;
}

.eb-site-footer .eb-site-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 35px;
}

.eb-site-footer h2 {
  color: #fff;
  font-size: 1.45rem;
  margin: 0 0 7px;
}

.eb-site-footer p { color: #f6dedd; margin: 0; line-height: 1.55; }

.eb-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 16px 24px;
}

.eb-footer-links a { color: #fff; text-decoration: none; }
.eb-footer-links a:hover { color: #f5c9c3; }

.eb-footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,.2);
  margin-top: 8px;
  padding-top: 20px;
  color: #efd6d3;
  font-size: .83rem;
}

/* Pages importées : une entrée plus compacte que le gabarit WordPress. */
body:not(.home) main {
  padding: 30px 0 0 !important;
  background: var(--eb-pale);
}

body:not(.home) main > .wp-block-group {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body:not(.home) .wp-block-post-title {
  width: min(900px, calc(100% - 40px));
  box-sizing: border-box;
  margin: 0 auto !important;
  padding: 28px 0 35px 22px;
  color: var(--eb-deep);
  border-left: 6px solid #ef9800;
  font-size: clamp(2.2rem, 4vw, 3.7rem) !important;
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.03;
}

body:not(.home) .wp-block-post-content {
  width: min(900px, calc(100% - 40px));
  box-sizing: border-box;
  margin: 0 auto 80px;
  padding: clamp(28px, 5vw, 52px);
  color: var(--eb-ink);
  background: #fff;
  border: 1px solid #eee2df;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(63, 8, 8, .06);
  font-size: 1.05rem;
}

body:not(.home) .wp-block-post-content h1 { display: none; }

body:not(.home) .wp-block-post-content h2 {
  margin: 2.2em 0 .65em;
  color: var(--eb-deep);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -.025em;
  line-height: 1.14;
}

body:not(.home) .wp-block-post-content h3 {
  margin: 1.7em 0 .5em;
  color: var(--eb-red);
  font-size: 1.28rem;
}

body:not(.home) .wp-block-post-content p,
body:not(.home) .wp-block-post-content li { line-height: 1.7; }

body:not(.home) .wp-block-post-content a { color: var(--eb-red); font-weight: 650; }

/* Boutons déjà présents dans certaines pages historiques EBINFO. */
body:not(.home) .wp-block-post-content a.btn {
  display: inline-block !important;
  margin: .45rem .55rem .25rem 0;
  padding: .68rem .92rem;
  text-decoration: none;
  border: 1px solid var(--eb-red);
  border-radius: 5px;
}

body:not(.home) .wp-block-post-content a.btn-primary {
  color: #fff;
  background: var(--eb-red);
}

body:not(.home) .wp-block-post-content a.btn-ghost {
  color: var(--eb-red);
  background: #fff;
}

body:not(.home) .wp-block-post-content a.btn-accent {
  color: var(--eb-deep);
  background: #ef9800;
  border-color: #ef9800;
}

body:not(.home) .wp-block-post-content a.btn:hover {
  color: #fff;
  background: var(--eb-deep);
  border-color: var(--eb-deep);
}

body:not(.home) .wp-block-post-content header > p:first-of-type {
  max-width: 760px;
  margin-top: 0;
  font-size: 1.2rem;
  line-height: 1.55;
}

body:not(.home) .wp-block-post-content header > p:not(:first-of-type) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.4rem 0 2.2rem;
}

body:not(.home) .wp-block-post-content header > p:not(:first-of-type) a {
  display: inline-block;
  padding: .68rem .92rem;
  color: #fff;
  text-decoration: none;
  background: var(--eb-red);
  border: 1px solid var(--eb-red);
  border-radius: 5px;
}

body:not(.home) .wp-block-post-content header > p:not(:first-of-type) a:last-child {
  color: var(--eb-deep);
  background: #fff;
}

body:not(.home) .wp-block-post-content ul,
body:not(.home) .wp-block-post-content ol { padding-left: 1.35em; }

/* Les captures importées restent lisibles sans prendre toute la page. */
body:not(.home) .wp-block-post-content img.ebinfo-imported-image {
  display: block;
  width: auto;
  max-width: min(100%, 720px);
  height: auto;
  margin: 1.5rem 0 .9rem;
  border: 1px solid #e6d5d2;
  border-radius: 4px;
}

body:not(.home) .wp-block-post-content a:has(> img.ebinfo-imported-image) {
  display: block;
  width: fit-content;
  max-width: 100%;
}

/* Galerie importée de la page Dépannage : un visuel à la fois. */
body:not(.home) .wp-block-post-content .ebinfo-gallery {
  width: min(100%, 720px);
  margin: 2rem auto;
  padding: 14px;
  background: var(--eb-pale);
  border: 1px solid #e6d5d2;
  border-radius: 8px;
}

.ebinfo-gallery-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(52vw, 430px);
  min-height: 230px;
  overflow: hidden;
  background: #fff;
  border-radius: 5px;
}

.ebinfo-gallery-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ebinfo-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.ebinfo-gallery-controls button {
  flex: 0 0 auto;
  padding: .45rem .72rem;
  color: #fff;
  background: var(--eb-red);
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ebinfo-gallery-thumbs {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
}

.ebinfo-gallery-thumb {
  flex: 0 0 62px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.ebinfo-gallery-thumb.is-active { border-color: var(--eb-red); }
.ebinfo-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 700px) {
  .eb-site-header .eb-site-shell { min-height: auto; padding: 20px 0; align-items: flex-start; flex-direction: column; }
  .eb-brand img { width: 132px; }
  body:not(.home) main { padding-top: 18px !important; }
  body:not(.home) .wp-block-post-title { padding: 20px 0 26px 15px; border-left-width: 4px; }
  .ebinfo-gallery-stage { min-height: 190px; }
  .ebinfo-gallery-controls { gap: 8px; }
  .ebinfo-gallery-controls button { padding: .4rem .55rem; }
  .eb-nav { justify-content: flex-start; gap: 12px 18px; }
  .eb-site-footer .eb-site-shell { grid-template-columns: 1fr; }
}
