:root {
  --color-primary: #f8a401;
  --color-secondary: #664300;
  --color-dark: #1f1a12;
  --color-text: #2d2a24;
  --color-muted: #6b675f;
  --color-bg-alt: #faf6ee;
  --color-border: #ece4d3;
  --radius: 10px;
  --wrap: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  background: #fff;
}
img { max-width: 100%; display: block; }
a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--color-dark); line-height: 1.25; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 820px; }

.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: var(--color-dark); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(248, 164, 1, .35); }
.btn-outline { border-color: var(--color-primary); color: var(--color-secondary); }
.btn-block { width: 100%; text-align: center; }

/* Top bar (réseaux sociaux + téléphone + nouveautés) */
.topbar { background: var(--color-secondary); color: #fff; font-size: .85rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem .75rem; padding: .5rem 0; }

.topbar-right { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.topbar-icon-link { color: #fff; display: inline-flex; align-items: center; gap: .4rem; }
.topbar-icon-link:hover { color: var(--color-primary); text-decoration: none; }
.topbar-icon-link .icon { width: 16px; height: 16px; flex-shrink: 0; }
.topbar-phone span { font-weight: 600; white-space: nowrap; }

/* Carrousel « Nouveautés » : une actualité à la fois, sur une ligne, défilement automatique
   entre les 3 dernières + points de navigation. */
.topbar-news { display: flex; align-items: center; gap: .75rem; flex: 1 1 auto; min-width: 0; }
.topbar-news-track { position: relative; flex: 1 1 auto; min-width: 0; height: 1.3em; }
.topbar-news-slide {
  position: absolute; top: 0; left: 0; right: 0; color: #fff; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.topbar-news-slide.is-active { opacity: 1; pointer-events: auto; }
.topbar-news-slide:hover { text-decoration: underline; }
.topbar-news-dots { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
.topbar-news-dot {
  width: 6px; height: 6px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,.4); cursor: pointer;
}
.topbar-news-dot.is-active { background: #fff; }

/* Sélecteur de langue (bandeau du haut) */
.lang-switcher { position: relative; }
.lang-switcher-toggle {
  background: none; border: none; color: #fff; display: inline-flex; align-items: center; gap: .35rem;
  font-size: .85rem; font-family: inherit; cursor: pointer; padding: 0;
}
.lang-switcher-toggle .icon { width: 12px; height: 12px; transition: transform .15s ease; }
.lang-switcher.is-open .lang-switcher-toggle .icon { transform: rotate(180deg); }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-code { font-weight: 600; letter-spacing: .02em; }
.lang-switcher-panel {
  display: none; position: absolute; top: 100%; right: 0; margin-top: .6rem; background: #fff; color: var(--color-text);
  border-radius: var(--radius); box-shadow: 0 16px 32px rgba(0,0,0,.18); min-width: 160px;
  padding: .4rem 0; z-index: 60;
}
.lang-switcher.is-open .lang-switcher-panel { display: block; }
.lang-option { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; color: var(--color-text); font-size: .9rem; }
.lang-option:hover { background: var(--color-bg-alt); text-decoration: none; }
.lang-option.is-current { font-weight: 700; color: var(--color-secondary); }

/* Header */
.site-header { border-bottom: 1px solid var(--color-border); background: #fff; position: sticky; top: 0; z-index: 50; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.5rem; gap: 1rem; }
.logo img { height: 44px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-dark); display: block; }

.main-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.main-nav > ul > li { position: relative; }
.nav-item-row { display: flex; align-items: center; }
.main-nav > ul > li .nav-item-row > a { color: var(--color-dark); font-weight: 600; padding: .5rem 0; display: inline-block; }
.main-nav > ul > li.is-active .nav-item-row > a,
.main-nav > ul > li .nav-item-row > a:hover { color: var(--color-primary); text-decoration: none; }
.submenu-toggle {
  background: none; border: none; padding: .5rem; margin-left: .1rem; cursor: pointer; color: var(--color-dark);
  display: inline-flex; align-items: center; justify-content: center;
}
.submenu-toggle .icon { width: 13px; height: 13px; transition: transform .15s ease; }
.has-children.is-open .submenu-toggle .icon { transform: rotate(180deg); }
.main-nav .sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  min-width: 220px; padding: .5rem 0; box-shadow: 0 12px 24px rgba(0,0,0,.08);
  flex-direction: column; gap: 0;
}
.main-nav li.has-children:hover .sub-menu,
.main-nav li.has-children.is-open .sub-menu { display: flex; }
.main-nav .sub-menu li a { display: block; padding: .5rem 1rem; color: var(--color-text); font-weight: 500; }
.main-nav .sub-menu li a:hover { background: var(--color-bg-alt); text-decoration: none; }

/* Hero */
.hero { background: linear-gradient(135deg, #fff6e6, #fff); padding: 4rem 0; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero-text h1 { font-size: 2.6rem; margin-bottom: 1rem; }
.hero-text p { color: var(--color-muted); font-size: 1.1rem; margin-bottom: 1.75rem; }
.hero-media img { border-radius: var(--radius); }

/* Highlights (home themes) */
.highlights { padding: 4rem 0; background: var(--color-bg-alt); }
.section-title { text-align: center; margin-bottom: 2.5rem; font-size: 2rem; }
.highlights-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.highlight-card {
  background: #fff; border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  border: 1px solid var(--color-border); color: var(--color-text); transition: transform .15s ease, box-shadow .15s ease;
}
.highlight-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,.08); text-decoration: none; }
.highlight-card .icon { width: 40px; height: 40px; color: var(--color-primary); margin: 0 auto 1rem; }
.highlight-card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.highlight-card p { color: var(--color-muted); font-size: .95rem; }
.highlight-link { color: var(--color-secondary); font-weight: 600; font-size: .9rem; }

/* Qualiopi banner + page */
.qualiopi-banner { background: var(--color-secondary); color: #fff; padding: 2.5rem 0; }
.qualiopi-banner-inner { display: flex; align-items: center; gap: 1.5rem; justify-content: center; flex-wrap: wrap; text-align: center; }
.qualiopi-banner-inner img.qualiopi-icon-lg { height: 64px; width: auto; }
.qualiopi-banner-inner p { margin: 0; font-size: 1.1rem; max-width: 520px; }
.qualiopi-banner .btn-outline { border-color: #fff; color: #fff; }
.qualiopi-certificate { margin-top: 2rem; text-align: center; }
.qualiopi-certificate img { max-width: 480px; margin: 0 auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
/* Logo Qualiopi en pied de page : logo au-dessus, mention en dessous (jamais côte à côte),
   avec une zone de respiration autour du logo — conformément au kit de communication Qualiopi. */
.footer-qualiopi { display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; margin-top: 1.25rem; max-width: 220px; }
.footer-qualiopi img { width: 130px; height: auto; }
.footer-qualiopi span { color: var(--color-primary); font-size: .85rem; line-height: 1.4; }
.footer-qualiopi:hover span { text-decoration: underline; }

/* Page content */
.page-hero { padding: 3rem 0 1rem; text-align: center; }
.page-lead { color: var(--color-muted); font-size: 1.1rem; max-width: 680px; margin: 0 auto; }
.page-content { padding: 2rem 0 4rem; }
.page-content h2 { margin-top: 2rem; }
.page-content ul { padding-left: 1.25rem; }

/* Promo cards (offres, événements, projets mis en avant) */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin: 1.5rem 0 2.5rem; }
.promo-card {
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 1.75rem; margin: 1.5rem 0 2.5rem;
}
.promo-grid .promo-card { margin: 0; }
.promo-card h3 { margin-top: 0; }
.promo-card .promo-meta { color: var(--color-secondary); font-weight: 600; font-size: .9rem; margin-bottom: .75rem; }
.promo-card .btn { margin-top: .5rem; }
.promo-card-soon { background: #fff; border-style: dashed; }
.promo-badge {
  display: inline-block; background: var(--color-primary); color: var(--color-dark); font-weight: 700;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; padding: .3rem .7rem;
  border-radius: 999px; margin-bottom: .75rem;
}
.promo-badge-date { background: var(--color-secondary); color: #fff; }

/* Prise de rendez-vous (Calendly / TidyCal) */
.cta-booking { padding: 3rem 0 4rem; text-align: center; }
.cta-booking h2 { margin-bottom: .5rem; }
.cta-booking-intro { color: var(--color-muted); max-width: 640px; margin: 0 auto 1.5rem; }
.cta-booking-frame {
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 16px 32px rgba(0,0,0,.06); text-align: left;
}
.cta-booking-frame iframe { display: block; width: 100%; height: 700px; border: 0; }

/* Client carousel (portfolio) */
.client-carousel-section { padding: 3rem 0 4rem; background: var(--color-bg-alt); }
.client-carousel { position: relative; display: flex; align-items: center; gap: .75rem; }
.carousel-track {
  display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding: .25rem 0 .75rem;
}
.carousel-track::-webkit-scrollbar { display: none; }
.client-card {
  scroll-snap-align: start; flex: 0 0 200px; background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.5rem 1.25rem; text-align: center;
}
.client-logo { height: 56px; display: flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.client-logo img { max-height: 56px; max-width: 100%; object-fit: contain; }
.client-logo-fallback { font-weight: 700; color: var(--color-secondary); }
.client-name { font-weight: 600; margin: 0 0 .25rem; }
.client-mission { color: var(--color-muted); font-size: .85rem; margin: 0; }
.carousel-arrow {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-border);
  background: #fff; color: var(--color-secondary); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.carousel-arrow:hover { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-dark); }

.realization-carousel-section { padding: 3rem 0 4rem; }
.realization-carousel { position: relative; display: flex; align-items: center; gap: .75rem; }
.realization-card {
  scroll-snap-align: start; flex: 0 0 280px; background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem;
}
.realization-visual { height: 64px; display: flex; align-items: center; }
.realization-visual img { max-height: 64px; max-width: 100%; object-fit: contain; border-radius: 6px; }
.realization-visual .icon { width: 40px; height: 40px; color: var(--color-primary); }
.realization-title { margin: 0; font-size: 1.05rem; }
.realization-description { color: var(--color-muted); font-size: .9rem; margin: 0; flex-grow: 1; }
.realization-link { align-self: flex-start; }

/* Blog */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.post-card { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; color: var(--color-text); }
.post-card:hover { text-decoration: none; box-shadow: 0 16px 32px rgba(0,0,0,.08); }
.post-card img { height: 170px; object-fit: cover; width: 100%; }
.post-card-body { padding: 1.25rem; }
.post-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.post-date { color: var(--color-muted); font-size: .85rem; }
.post-meta { color: var(--color-muted); font-size: .9rem; }
.post-cover { border-radius: var(--radius); margin: 1rem 0; }
.post-source-badge {
  display: inline-block; margin: .35rem 0 0; padding: .15rem .55rem; border-radius: 999px;
  background: var(--color-bg-alt); color: var(--color-muted); font-size: .75rem; font-weight: 600;
}
.post-source-notice {
  background: var(--color-bg-alt); border-left: 3px solid var(--color-primary); border-radius: 4px;
  padding: .75rem 1rem; margin: 1rem 0; font-size: .95rem;
}
.page-cover { border-radius: var(--radius); margin: 0 0 2rem; width: 100%; object-fit: cover; max-height: 420px; }
.pagination { display: flex; gap: .5rem; justify-content: center; }
.pagination a { padding: .4rem .8rem; border: 1px solid var(--color-border); border-radius: 6px; }
.pagination a.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-dark); }

.latest-posts { padding: 4rem 0; text-align: center; }
.latest-posts .posts-grid { text-align: left; }

.posts-widget { padding: 1rem 0 3rem; text-align: center; border-top: 1px solid var(--color-border); margin-top: 1rem; }
.posts-widget .posts-grid { text-align: left; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Newsletter */
.newsletter-section { background: var(--color-secondary); color: #fff; padding: 3.5rem 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.newsletter-text { max-width: 420px; }
.newsletter-text h2 { color: #fff; margin-bottom: .4rem; }
.newsletter-text p { color: rgba(255,255,255,.85); margin: 0; }
.newsletter-form { flex: 1 1 380px; max-width: 460px; }
.newsletter-form-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form-row input[type=email] {
  flex: 1 1 220px; padding: .75rem 1rem; border-radius: 999px; border: none; font-size: 1rem;
}
.newsletter-form-row .btn { flex-shrink: 0; }
.newsletter-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.newsletter-consent { display: flex; align-items: flex-start; gap: .5rem; margin-top: .9rem; font-size: .8rem; color: rgba(255,255,255,.85); cursor: pointer; }
.newsletter-consent input { margin-top: .2rem; flex-shrink: 0; }
.newsletter-consent a { color: #fff; text-decoration: underline; }
.newsletter-flash { padding: .6rem 1rem; border-radius: 8px; margin-bottom: .75rem; font-size: .9rem; font-weight: 600; }
.newsletter-flash-success { background: rgba(255,255,255,.15); }
.newsletter-flash-info { background: rgba(255,255,255,.1); }
.newsletter-flash-error { background: rgba(200, 40, 40, .3); }

/* Footer */
.site-footer { background: var(--color-dark); color: #d8d2c4; padding: 3rem 0 0; }
.footer-columns { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-bottom: 2.5rem; }
.footer-logo { height: 36px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { color: #d8d2c4; }
.footer-col a:hover { color: var(--color-primary); }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; font-size: .85rem; color: #a39d8c; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .newsletter-text { max-width: none; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; width: 100%; }
  .main-nav.is-open { display: block; }
  .site-header-inner { flex-wrap: wrap; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-top: 1px solid var(--color-border); }
  .nav-item-row { justify-content: space-between; }
  .main-nav > ul > li .nav-item-row > a { display: block; padding: .75rem 0; }
  .submenu-toggle { padding: .75rem .5rem; }
  .main-nav .sub-menu { position: static; border: none; box-shadow: none; display: none; padding-left: 1rem; }
  .main-nav li.has-children:hover .sub-menu { display: none; }
  .main-nav li.has-children.is-open .sub-menu { display: flex; }
  .topbar-inner { justify-content: center; text-align: center; }
  .topbar-right { margin-left: 0; }
  .highlights-grid { grid-template-columns: 1fr; }
  .footer-columns { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2rem; }
}
