:root {
  --primary: #355fc3;
  --primary-dark: #16274f;
  --primary-soft: #eaf0ff;
  --text: #1d2433;
  --muted: #5f6b85;
  --border: rgba(53, 95, 195, 0.14);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --bg: #f3f3f5;
  --shadow: 0 18px 45px rgba(22, 39, 79, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1200px;
  --header-h: 82px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(53, 95, 195, 0.08),
      transparent 28%
    ),
    linear-gradient(180deg, #f8f9fd 0%, var(--bg) 100%);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(247, 247, 255, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand img {
  width: 140px;
  height: auto;
  object-fit: contain;
}

.brand-text {
  display: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--primary-dark);
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(22, 39, 79, 0.08);
  flex: 0 0 46px;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

.nav-toggle span {
  transform: translate(-50%, -50%);
}

.nav-toggle::before {
  transform: translate(-50%, calc(-50% - 6px));
}

.nav-toggle::after {
  transform: translate(-50%, calc(-50% + 6px));
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--primary);
  background: rgba(53, 95, 195, 0.08);
  outline: none;
}

.nav a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

main section {
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: stretch;
}

.hero-card,
.panel,
.service-card,
.reference-card,
.contact-card,
.detail-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-intro {
  margin-top: 10px;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 62ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4c87e7);
  color: #fff;
  box-shadow: 0 14px 30px rgba(53, 95, 195, 0.24);
}

.btn-secondary {
  background: #fff;
  color: var(--primary-dark);
  border-color: var(--border);
}

/* ===== Nuage de mots : règles originelles ===== */

.hero-cloud-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  min-height: auto;
}

.cloudContainer {
  cursor: pointer;
  width: fit-content;
  height: 264px;
  overflow: visible;
  margin: 30px auto 60px auto;
  transition: all 0.4s;
  position: relative;
}

.cloudContainer:hover {
  background: rgb(216, 255, 249);
  background: radial-gradient(
    circle,
    rgba(216, 255, 249, 1) 0%,
    rgba(0, 19, 65, 0) 60%
  );
}

.trainingSvgContainer {
  width: 413px;
  height: 263px;
  position: relative;
  transform: translate(0px, 0px);
  opacity: 1;
  overflow: visible;
}

.formationSvgPath {
  opacity: 1;
  transform: scale(1);
  fill: none;
  stroke: var(--primary);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: miter;
  stroke-miterlimit: 4;
  transition: stroke 0.4s;
}

.lightBulbMarkAccueil {
  opacity: 0;
  position: absolute;
  font-size: 5em;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
  color: var(--primary);
  transition: all 0.4s;
}

.cloudContainer:hover .lightBulbMarkAccueil {
  opacity: 1;
}

.lightBulbText {
  opacity: 0;
  position: absolute;
  font-size: 2.2em;
  width: max-content;
  left: 50%;
  top: 80%;
  transform: translate(-50%, -20%);
  z-index: 999;
  color: var(--primary);
  transition: all 0.4s;
}

.cloudContainer:hover .lightBulbText {
  opacity: 1;
}

.cloudContainer:hover svg g path {
  stroke-width: 0;
}

.cloudContainer:hover .word-black,
.cloudContainer:hover .word-blue {
  color: white;
}

.cloudContainer:hover .word-1,
.cloudContainer:hover .word-2,
.cloudContainer:hover .word-3,
.cloudContainer:hover .word-4,
.cloudContainer:hover .word-5,
.cloudContainer:hover .word-6,
.cloudContainer:hover .word-7,
.cloudContainer:hover .word-8,
.cloudContainer:hover .word-9,
.cloudContainer:hover .word-10,
.cloudContainer:hover .word-11,
.cloudContainer:hover .word-15 {
  opacity: 0;
  filter: blur(40px);
  right: 200px;
}

.cloudContainer:hover .word-12,
.cloudContainer:hover .word-13,
.cloudContainer:hover .word-14a,
.cloudContainer:hover .word-14b {
  opacity: 0;
  filter: blur(40px);
  left: 200px;
}

.words {
  font-family: "Work Sans", sans-serif;
  position: absolute;
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s 0s ease-in-out;
}

.word-blue {
  color: var(--primary);
}

.word-black {
  color: rgb(77 78 93);
}

.word-bold-1 {
  font-weight: 100;
}

.word-bold-2 {
  font-weight: 200;
}

.word-bold-3 {
  font-weight: 300;
}

.word-bold-4 {
  font-weight: 400;
}

.word-bold-5 {
  font-weight: 500;
}

.word-bold-6 {
  font-weight: 600;
}

.word-bold-7 {
  font-weight: 700;
}

.word-bold-8 {
  font-weight: 800;
}

/* Stratégie */
.word-1 {
  opacity: 1;
  filter: blur(0px);
  font-size: 3em;
  right: 83px;
  bottom: 28px;
  animation: scaleInWord 1.2s 0.3s ease forwards;
}

/* Energie */
.word-2 {
  opacity: 1;
  filter: blur(0px);
  font-size: 2.1em;
  right: 177px;
  top: 24px;
  animation: scaleInWord 1.2s 0.8s ease forwards;
}

/* Formation */
.word-3 {
  font-size: 1.03em;
  right: 200px;
  top: 10px;
  animation: scaleInWord 1.2s 0.6s ease forwards;
}

/* Maitrise d'ouvrage */
.word-4 {
  font-size: 2.5em;
  width: max-content;
  right: 42px;
  top: 98px;
  animation: scaleInWord 1.4s 1.2s ease forwards;
}

/* Gestion de parc */
.word-5 {
  font-size: 1.9em;
  width: max-content;
  right: 14px;
  top: 140px;
  animation: scaleInWord 1.2s 0.8s ease forwards;
}

/* Décret tertiaire */
.word-6 {
  font-size: 1.5em;
  width: max-content;
  right: 144px;
  top: 210px;
  animation: scaleInWord 1.2s 1s ease forwards;
}

/* Programmation */
.word-7 {
  font-size: 1.7em;
  width: max-content;
  right: 90px;
  top: 78px;
  animation: scaleInWord 1.2s 0.6s ease forwards;
}

/* Conduite d'opération */
.word-8 {
  font-size: 1.52em;
  width: max-content;
  right: 89px;
  top: 58px;
  animation: scaleInWord 1.2s 0.75s ease forwards;
}

/* Patrimoine immobilier */
.word-9 {
  font-size: 1.03em;
  width: max-content;
  right: 89px;
  bottom: 2px;
  animation: scaleInWord 1.2s 0.75s ease forwards;
}

/* Budget */
.word-10 {
  font-size: 0.9em;
  width: max-content;
  right: 96px;
  top: 46px;
  animation: scaleInWord 1.2s 0.75s ease forwards;
}

/* Projet */
.word-11 {
  font-size: 1em;
  width: max-content;
  right: 66px;
  bottom: 23px;
  animation: scaleInWord 1.2s 0.75s ease forwards;
}

/* Conseil */
.word-12 {
  font-size: 1.6em;
  width: max-content;
  left: 19px;
  bottom: 63px;
  animation: scaleInWord 1.2s 1s ease forwards;
}

/* Marchés publics */
.word-13 {
  font-size: 1.07em;
  width: max-content;
  left: 20px;
  bottom: 93px;
  animation: scaleInWord 1s 0.8s ease forwards;
}

/* Dialogue */
.word-14a {
  font-size: 1.12em;
  width: max-content;
  left: 25px;
  bottom: 45px;
  animation: scaleInWord 1s 1.3s ease forwards;
}

/* social */
.word-14b {
  font-size: 1.12em;
  width: max-content;
  left: 42px;
  bottom: 25px;
  animation: scaleInWord 1s 1.3s ease forwards;
}

/* Bâtiment */
.word-15 {
  font-size: 0.87em;
  width: max-content;
  right: 15px;
  bottom: 60px;
  animation: scaleInWord 1s 1s ease forwards;
}

@keyframes scaleInWord {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  60% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Sections ===== */

.section {
  padding: 2rem 0;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p {
  color: var(--muted);
  max-width: 72ch;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.5rem;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.panel-media {
  aspect-ratio: 16 / 11;
  background: #d9e4ff;
  overflow: hidden;
}

.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-body {
  padding: 1.5rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 1.15rem;
}

.check-list {
  display: grid;
  gap: 0.9rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.check-list strong {
  display: block;
  margin-bottom: 0.15rem;
}

.check-mark {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
  margin-top: 0.15rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.service-card h3 {
  font-size: 1.18rem;
  line-height: 1.2;
}

.service-card p,
.service-card li {
  color: var(--muted);
}

.service-card ul {
  margin: 0;
  padding-left: 1rem;
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.reference-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.reference-card.is-clickable {
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.reference-card.is-clickable:hover,
.reference-card.is-clickable:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(22, 39, 79, 0.16);
  border-color: rgba(53, 95, 195, 0.22);
  outline: none;
}

.reference-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e6ebf7;
}

.reference-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.reference-card:hover .reference-media img {
  transform: scale(1.03);
}

.reference-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  height: 100%;
}

.reference-body h3 {
  font-size: 1.12rem;
  line-height: 1.25;
}

.reference-body p {
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reference-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.btn-linkish {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.btn-linkish[disabled] {
  color: #8d97ad;
  cursor: not-allowed;
}

.detail-view {
  margin-top: 1.25rem;
  display: none;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.detail-view.is-open {
  display: block;
  animation: fadeInUp 0.25s ease;
}

.detail-card {
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.detail-head h3 {
  font-size: 1.4rem;
  line-height: 1.15;
}

.detail-card p,
.detail-card li {
  color: var(--muted);
}

.detail-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.detail-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat-box {
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
}

.stat-box small {
  display: block;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.stat-box strong {
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.contact-card {
  padding: 1.5rem;
}

.contact-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.9rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.42rem;
  font-weight: 700;
  color: var(--primary-dark);
}

input,
textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(53, 95, 195, 0.16);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.95rem 1rem;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(53, 95, 195, 0.12);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

.hidden-botcheck {
  display: none !important;
}

.form-feedback {
  display: none;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: #eef3ff;
  color: var(--primary-dark);
  font-weight: 600;
}

.form-feedback.is-visible {
  display: block;
}

.form-feedback.is-loading {
  background: #eef3ff;
  border-color: rgba(53, 95, 195, 0.14);
  color: var(--primary-dark);
}

.form-feedback.is-success {
  background: #ebfff3;
  border-color: rgba(29, 156, 93, 0.2);
  color: #17663f;
}

.form-feedback.is-error {
  background: #fff1f1;
  border-color: rgba(210, 59, 59, 0.18);
  color: #9f2b2b;
}

.contact-form button[disabled] {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.site-footer {
  margin-top: 2rem;
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.footer-inner a {
  color: #96b5ff;
}

.hidden-mobile {
  display: inline;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive SPA ===== */

@media (max-width: 1080px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .references-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 74px;
  }

  .brand img {
    width: 118px;
  }

  .brand-text {
    display: block;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(248, 249, 253, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1rem 1rem;
    display: grid;
    gap: 0.35rem;
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    width: 100%;
    border-radius: 16px;
  }

  .nav-toggle[aria-expanded="true"] span {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.6);
  }

  .nav-toggle[aria-expanded="true"]::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"]::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}

@media only screen and (max-width: 768px) {
  .cloudContainer {
    transform: scale(0.8);
    margin: 5px auto 11px auto;
  }
}

@media (max-width: 720px) {
  .hero-card,
  .panel-body,
  .service-card,
  .reference-body,
  .contact-card,
  .detail-card {
    padding: 1.15rem;
  }

  .services-grid,
  .references-grid,
  .gallery-grid,
  .stats-grid,
  .field-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hidden-mobile {
    display: none;
  }
}

@media only screen and (max-width: 375px) {
  .cloudContainer {
    transform: scale(0.7) translateX(-58px);
  }
}

@media only screen and (max-width: 320px) {
  .cloudContainer {
    transform: scale(0.65) translateX(-100px);
  }
}

/* Mentions légales */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
}

.legal-modal.is-open {
  display: block;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.legal-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 1.5rem));
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(53, 95, 195, 0.12);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(22, 39, 79, 0.24);
  overflow: hidden;
}

.legal-modal__content {
  padding: 1.5rem;
  overflow: auto;
  max-height: calc(100vh - 2rem);
}

.legal-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22, 39, 79, 0.12);
}

.legal-modal__close:hover,
.legal-modal__close:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.legal-header {
  margin-bottom: 1.25rem;
  padding-right: 3rem;
}

.legal-kicker {
  margin-bottom: 0.35rem;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.legal-header h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.1;
}

.legal-header p {
  color: var(--muted);
}

.legal-section + .legal-section {
  margin-top: 1rem;
}

.legal-section {
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(53, 95, 195, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.legal-section h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  color: var(--primary-dark);
}

.legal-section p + p {
  margin-top: 0.55rem;
}

.legal-section p {
  color: var(--muted);
}

body.legal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .legal-modal__dialog {
    width: min(100%, calc(100% - 0.75rem));
    max-height: calc(100vh - 0.75rem);
    margin: 0.375rem auto;
    border-radius: 18px;
  }

  .legal-modal__content {
    padding: 1rem;
    max-height: calc(100vh - 0.75rem);
  }

  .legal-section {
    padding: 0.9rem;
  }
}

input::placeholder,
textarea::placeholder {
  font-weight: normal;
}
input,
textarea {
  font-weight: normal;
}

/* Bouton btn linkedin */
.btn-linkedin {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px;
}

.btn-linkedin i {
  font-size: 1.2rem;
}

.hero-grid > * {
  min-width: 0;
}

@media (max-width: 768px) {
  .hero-cloud-panel {
    width: 100%;
    overflow: hidden;
  }

  .cloudContainer {
    width: 100%;
    max-width: 100%;
    margin: 5px auto 11px;
    transform: none;
  }

  .trainingSvgContainer {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  .words {
    max-width: 100%;
  }
}

.detail-main,
.detail-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.detail-cover {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #eef3ff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(22, 39, 79, 0.08);
}

.detail-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px) {
  .detail-cover img {
    aspect-ratio: 16 / 9;
  }
}

.previewable-image {
  cursor: zoom-in;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.previewable-image:hover,
.previewable-image:focus-visible {
  transform: scale(1.01);
  box-shadow: 0 12px 28px rgba(22, 39, 79, 0.14);
  outline: none;
}

.image-preview-open {
  overflow: hidden;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: none;
}

.image-preview-modal.is-open {
  display: block;
}

.image-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.image-preview-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  padding: 0.75rem;
  display: grid;
  gap: 0.75rem;
}

.image-preview-modal__img {
  width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.image-preview-modal__caption {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
}

.image-preview-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.image-preview-modal__close:hover,
.image-preview-modal__close:focus-visible {
  outline: none;
  transform: translateY(-1px);
}
