:root {
  --bg: #FAF8F4;
  --card: #FFFFFF;
  --ink: #201F1B;
  --ink-soft: #6A6459;
  --line: #EFEBE4;
  --sage: #5F7E5C;
  --sage-dark: #465C44;
  --sage-tint: #F2F5F0;
  --cream: #EFF3EC;
  --gold: #C9A24C;
  --gold-dark: #A9843A;
  --max: 1280px;
  --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Évite que le header sticky ne masque le haut des sections lors de la navigation par ancres */
section, [id] {
  scroll-margin-top: 100px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

#urbanisme .cours h2,
#urbanisme .section-intro {
  color: white !important;
}

.content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* En-tête */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

header .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
}

.brand-role {
  font-size: 12px;
  color: var(--sage-dark);
  display: block;
  margin-top: -2px;
}

nav {
  display: flex;
  gap: 32px;
  font-size: 14.5px;
}

nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--sage-dark);
}

/* Listes de formation */
.formation-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formation-points li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  color: white;
  line-height: 1.4;
}

.formation-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sage-tint);
  border: 1.5px solid var(--sage-dark);
}

.formation-points li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--sage-dark);
  border-bottom: 2px solid var(--sage-dark);
  transform: rotate(-45deg);
}

/* Section Hero */
.hero {
  padding: 44px 0 0;
  background: radial-gradient(ellipse 900px 500px at 85% -10%, rgba(95, 126, 92, 0.08), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-logo {
  background: var(--sage-tint);
  border-radius: 28px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo img {
  width: 100%;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.stars {
  color: var(--gold);
}

.rating-badge a {
  text-decoration: underline;
  color: var(--ink);
  text-underline-offset: 2px;
}

.hero h1 {
  font-size: clamp(28px, 4.5vw, 48px);
  line-height: 1.15;
  max-width: 15ch;
  margin-bottom: 16px;
}

.hero h1 em {
  font-style: italic;
  color: var(--sage-dark);
}

.hero p.lede {
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 24px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 100px;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid var(--sage-dark);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  cursor: pointer;
}

.btn.solid {
  background: var(--sage-dark);
  color: #fff;
}

.btn.solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px rgba(70, 92, 68, 0.35);
}

.btn.ghost {
  border-color: transparent;
  background: rgba(0, 0, 0, 0.03);
  color: var(--sage-dark);
}

.btn.ghost:hover {
  transform: translateY(-2px);
  background: rgba(95, 126, 92, 0.12);
}

.tagline-strip {
  margin-top: 40px;
  background: var(--sage-dark);
}

.tagline-strip .content {
  padding: 13px 32px;
  text-align: center;
  font-size: 13.5px;
  color: #fff;
  letter-spacing: 0.03em;
}

/* Réassurance (Trust) */
.trust {
  background: var(--sage-tint);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.trust .content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-item {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.trust-item strong {
  color: var(--ink);
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 17px;
  margin-bottom: 6px;
}

/* Sections communes */
section {
  padding: 56px 0;
}

.eyebrow {
  font-size: 12.5px;
  color: var(--gold-dark);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 29px;
  margin-bottom: 14px;
}

.section-intro {
  color: var(--ink);
  max-width: 58ch;
  margin-bottom: 28px;
  font-size: 16px;
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service {
  background: var(--card);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.07);
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--sage-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.icon svg {
  width: 24px;
  height: 24px;
}

.service h3 {
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 600;
}

.service p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Formations & Urbanisme */
#cours-dao {
  background: var(--sage-tint);
}

#urbanisme {
  background: var(--sage-dark);
}

.cours {
  padding: 0;
  margin-bottom: 0;
}

.cours-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 48px;
  align-items: center;
}

.cours-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.cours-card .label {
  font-size: 12px;
  color: var(--gold-dark);
  margin-bottom: 8px;
  display: block;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cours-card p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 22px;
  line-height: 1.6;
}

/* À Propos */
.apropos-header {
  max-width: 680px;
  margin-bottom: 32px;
}

.apropos-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 40px;
  align-items: start;
}

.apropos-lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 18px;
}

.apropos-text {
  color: var(--ink-soft);
  font-size: 16px;
  margin-bottom: 14px;
}

.apropos-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.highlight-card {
  background: var(--card);
  border-radius: 18px;
  padding: 24px 28px;
  border-left: 4px solid var(--sage-dark);
  box-shadow: var(--shadow-soft);
}

.highlight-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--ink);
}

.highlight-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* Avis */
.avis {
  background: var(--sage-tint);
}

.avis .section-intro {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.avis .section-intro a {
  text-decoration: underline;
  color: var(--ink);
  text-underline-offset: 2px;
}

.avis-carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.avis-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.avis-track::-webkit-scrollbar {
  display: none;
}

.avis-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: var(--card);
  border-radius: 18px;
  padding: 28px 30px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.avis-card-stars {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 2px;
}

.avis-card-text {
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.avis-card-footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.avis-card-auteur {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.avis-card-meta {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.avis-nav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--sage-dark);
  background: #fff;
  color: var(--sage-dark);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background-color .15s ease;
}

.avis-nav:hover {
  background: var(--sage-dark);
  color: #fff;
  transform: translateY(-2px);
}

.avis-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.avis-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}

.avis-dots button.active {
  background: var(--sage-dark);
  transform: scale(1.2);
}

/* Contact */
#contact {
  background: var(--ink);
  padding: 56px 0;
}

.contact-card {
  background: transparent;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}

.contact-card h2 {
  color: #fff;
}

.contact-card .eyebrow {
  color: var(--gold);
}

.contact-info p {
  color: #C9C2B8;
  font-size: 15.5px;
  margin-bottom: 20px;
}

.contact-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.contact-list li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-list li:first-child {
  border-top: none;
}

.contact-list .label {
  font-size: 12px;
  color: #C9C2B8;
  display: block;
  margin-bottom: 3px;
  letter-spacing: 0.01em;
}

.contact-list a {
  text-decoration: none;
  font-size: 16px;
  color: #fff;
}

.contact-list a:hover {
  text-decoration: underline;
}

.location-text {
  color: #fff;
  font-size: 15px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-group label {
  font-size: 13px;
  color: #C9C2B8;
  font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  background: #2A2924;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  transition: all .15s ease;
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
  color: #787268;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--gold);
  outline: none;
  background: #32302A;
}

.hp-field {
  display: none !important;
}

.btn-submit {
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 15px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  margin-top: 8px;
}

.btn-submit:hover {
  background: #D9B25C;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(201, 162, 76, 0.3);
}

/* Notifications de statut */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14.5px;
  margin-bottom: 12px;
}

.alert-success {
  background: #465C44;
  color: #fff;
}

.alert-error {
  background: #8B0000;
  color: #fff;
}

/* Pied de page */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
  background: var(--bg);
}

footer .content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}

footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

footer a:hover {
  border-bottom-color: var(--ink);
}

/* -------------------------------------------------------------------------- */
/* MEDIA QUERIES (DESIGN RESPONSIVE)                                          */
/* -------------------------------------------------------------------------- */

@media (min-width: 1080px) {
  .avis-card {
    flex-basis: calc(33.333% - 14px);
  }
}

@media (min-width: 760px) and (max-width: 1079px) {
  .avis-card {
    flex-basis: calc(50% - 10px);
  }
}

@media (max-width: 1000px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .content {
    padding: 0 20px;
  }

  /* Header & Navigation mobile sans débordement */
  header .content {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    width: 100%;
  }

  nav a {
    font-size: 13.5px;
    padding: 2px 4px;
  }

  /* Repassage de toutes les grilles en 1 colonne */
  .hero-grid,
  .cours-grid,
  .apropos-grid,
  .contact-card {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form {
    padding: 20px 16px;
  }

  .hero-logo {
    max-width: 200px;
    margin: 0 auto;
    padding: 20px;
  }

  .trust .content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 560px) {
  .services {
    grid-template-columns: 1fr;
  }

  .cta-row .btn {
    width: 100%;
    text-align: center;
  }

  .avis-nav {
    display: none;
  }
}