*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Charte Kermarrec Syndic (Efficience est une branche de KS) ──
   Bleu KS : CMJN C043 M010 J000 N000 · Pantone 2905 C · Web #9bc9ed */
:root {
  --brand-dark:   #27326f;   /* bleu marine — couleur principale */
  --brand-accent: #9bc9ed;   /* bleu Kermarrec Syndic — accent   */
  --brand-mid:    #4a6fa5;
  --gold:        #c9a24b;
  --white:       #ffffff;
  --white-80:    rgba(255,255,255,0.80);
  --white-20:    rgba(255,255,255,0.12);
  --drawer-w:    460px;
}

html, body {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
}

/* ── HERO ── */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.04);
  animation: bgDrift 18s ease-in-out infinite alternate;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

/* Shift background slightly when drawer opens */
.hero.drawer-open .hero__bg {
  transform: scale(1.04) translateX(-3%);
  animation-play-state: paused;
}

@keyframes bgDrift {
  from { transform: scale(1.04) translateX(0); }
  to   { transform: scale(1.08) translateX(-1%); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(39, 50, 111, 0.88) 0%,
    rgba(39, 50, 111, 0.60) 55%,
    rgba(155, 201, 237, 0.25) 100%
  );
  transition: background 0.6s;
}

.hero.drawer-open .hero__overlay {
  background: linear-gradient(
    135deg,
    rgba(39, 50, 111, 0.92) 0%,
    rgba(39, 50, 111, 0.80) 55%,
    rgba(39, 50, 111, 0.70) 100%
  );
}

.hero__shape {
  position: absolute;
  bottom: 0; right: 0;
  width: 42vw;
  height: 100vh;
  background: linear-gradient(150deg, transparent 35%, rgba(155,201,237,0.10) 35%, rgba(155,201,237,0.06) 100%);
  clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: opacity 0.5s;
}

.hero.drawer-open .hero__shape { opacity: 0; }

.hero__shape-line {
  position: absolute;
  bottom: 0; right: 0;
  width: 42vw;
  height: 100vh;
  clip-path: polygon(30% 0%, 32% 0%, 2% 100%, 0% 100%);
  background: rgba(155, 201, 237, 0.30);
  transition: opacity 0.5s;
}

.hero.drawer-open .hero__shape-line { opacity: 0; }

/* ── CONTENT ── */
.hero__content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 860px;
  width: 90%;
  gap: 0;
  animation: fadeUp 1s ease both;
  transition: transform 0.65s cubic-bezier(0.4,0,0.2,1), opacity 0.5s;
}

.hero.drawer-open .hero__content {
  transform: translateX(-80px);
  opacity: 0.35;
}

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

/* ── LOGO ── */
.logo {
  display: inline-block;
  margin-bottom: 22px;
  animation: fadeUp 1s 0.1s ease both;
  opacity: 0;
}

.logo img {
  height: clamp(52px, 6vw, 80px);
  width: auto;
  display: block;
}

.hero__title {
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.14;
  color: var(--white);
  margin-bottom: 22px;
  animation: fadeUp 1s 0.35s ease both;
  opacity: 0;
}

.hero__title em {
  font-style: normal;
  color: var(--brand-accent);
}

.hero__separator {
  width: 48px;
  height: 3px;
  background: var(--brand-accent);
  margin-bottom: 22px;
  animation: fadeUp 1s 0.45s ease both;
  opacity: 0;
}

.hero__desc {
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--white-80);
  max-width: 820px;
  margin-bottom: 30px;
  animation: fadeUp 1s 0.55s ease both;
  opacity: 0;
}

.hero__desc strong {
  font-weight: 700;
  color: var(--white);
}

/* ── CTA ── */
.cta-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeUp 1s 0.70s ease both;
  opacity: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--brand-accent);
  color: var(--brand-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 36px;
  border: 2px solid var(--brand-accent);
  transition: background 0.28s, color 0.28s, transform 0.22s;
  cursor: pointer;
}

.btn-primary:hover {
  background: transparent;
  color: var(--brand-accent);
  transform: translateY(-2px);
}

.btn-primary svg {
  flex-shrink: 0;
  transition: transform 0.22s;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-secondary {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-80);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding-bottom: 2px;
  transition: color 0.22s, border-color 0.22s;
}

.btn-secondary:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ── BOTTOM BAR ── */
.hero__footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px clamp(24px, 5vw, 72px);
  animation: fadeUp 1s 0.9s ease both;
  opacity: 0;
  transition: opacity 0.5s;
}

.hero.drawer-open .hero__footer { opacity: 0; pointer-events: none; }

.hero__footer a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.22s;
}

.hero__footer a:hover { color: var(--brand-accent); }

/* ── GROUPE badge ── */
.groupe-badge {
  position: absolute;
  top: 32px;
  right: clamp(24px, 5vw, 72px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  animation: fadeUp 1s 0.1s ease both;
  opacity: 0;
  transition: opacity 0.5s;
}

.hero.drawer-open .groupe-badge { opacity: 0; pointer-events: none; }

.groupe-badge__line {
  width: 100%;
  max-width: 160px;
  height: 1px;
  background: rgba(255,255,255,0.30);
}

.groupe-badge__text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.groupe-badge__label {
  font-size: 9px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}

.groupe-badge__name {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
  font-weight: 700;
}

.groupe-badge__link {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.80);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.22s;
}

.groupe-badge__link:hover { color: var(--brand-accent); }

/* ── QUOTE CTA (bottom-left) ── */
.quote-cta {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  bottom: 48px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  animation: fadeUp 1s 0.9s ease both;
  opacity: 0;
  transition: opacity 0.5s;
}

.hero.drawer-open .quote-cta { opacity: 0; pointer-events: none; }

.quote-cta__text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--white-80);
}

.btn-quote {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  color: var(--brand-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  padding: 13px 22px;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, transform 0.22s;
}

.btn-quote:hover {
  background: var(--brand-accent);
  transform: translateY(-2px);
}

/* ── CONTACT INFO (bottom-right) ── */
.contact-info {
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: 48px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  animation: fadeUp 1s 0.9s ease both;
  opacity: 0;
  transition: opacity 0.5s;
}

.hero.drawer-open .contact-info { opacity: 0; pointer-events: none; }

.contact-info__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.contact-info__hours {
  font-size: 13px;
  font-style: italic;
  font-weight: 300;
  color: var(--white-80);
  margin-bottom: 2px;
}

.contact-info__phone {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 2px;
}

.contact-info__email,
.contact-info__address {
  font-size: 13px;
  font-weight: 400;
  color: var(--white-80);
  text-decoration: none;
}

.contact-info__email:hover { color: var(--brand-accent); }

/* ════════════════════════════════════════
   LOGIN DRAWER
════════════════════════════════════════ */
.login-drawer {
  position: fixed;
  top: 0; right: 0;
  width: var(--drawer-w);
  height: 100vh;
  background: #ffffff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
  box-shadow: -12px 0 60px rgba(39,50,111,0.18);

  /* Hidden state */
  transform: translateX(100%);
  transition: transform 0.60s cubic-bezier(0.4,0,0.2,1);
}

.login-drawer.is-open {
  transform: translateX(0);
}

/* Blue accent strip on left edge */
.login-drawer::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-accent) 100%);
}

/* Close button */
.drawer__close {
  position: absolute;
  top: 28px; right: 28px;
  width: 36px; height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(39,50,111,0.35);
  border-radius: 50%;
  transition: background 0.22s, color 0.22s;
}

.drawer__close:hover {
  background: rgba(39,50,111,0.07);
  color: var(--brand-dark);
}

/* Eyebrow + title */
.drawer__logo {
  align-self: flex-start;
  max-height: 56px;
  max-width: 240px;
  width: auto;
  height: auto;
  margin-bottom: 32px;
}

.drawer__eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 10px;
}

.drawer__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.2;
  margin-bottom: 36px;
}

/* Form */
.drawer__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.field__wrap {
  position: relative;
}

.field__input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 2px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #4a5568;
  background: #f5f7fa;
  outline: none;
  transition: border-color 0.22s, background 0.22s;
}

.field__input:focus {
  border-color: var(--brand-accent);
  background: #ffffff;
}

.field__toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #4a5568;
  opacity: 0.45;
  display: flex;
  align-items: center;
  transition: opacity 0.22s;
}

.field__toggle:hover { opacity: 1; }

.drawer__forgot {
  font-size: 12px;
  font-weight: 500;
  color: #4a5568;
  opacity: 0.6;
  text-decoration: none;
  align-self: flex-start;
  margin-top: -4px;
  transition: opacity 0.22s, color 0.22s;
}

.drawer__forgot:hover { opacity: 1; color: var(--brand-dark); }

.btn-login {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--brand-dark);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 2px solid var(--brand-dark);
  border-radius: 2px;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.28s, color 0.28s, transform 0.22s;
}

.btn-login:hover {
  background: transparent;
  color: var(--brand-dark);
  transform: translateY(-2px);
}

.btn-login svg {
  flex-shrink: 0;
  transition: transform 0.22s;
}

.btn-login:hover svg { transform: translateX(4px); }

/* Footer links inside drawer */
.drawer__footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 10px;
  color: rgba(39,50,111,0.30);
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer__footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.22s;
}

.drawer__footer a:hover { color: var(--brand-dark); }

/* ════════════════════════════════════════
   QUOTE MODAL
════════════════════════════════════════ */
.quote-modal {
  position: fixed;
  top: 50%; left: 50%;
  z-index: 260;
  width: 90%;
  max-width: 1140px;
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  padding: 48px 56px;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(20, 26, 60, 0.35);

  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.quote-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.quote-modal__close {
  position: absolute;
  top: 24px; right: 24px;
  width: 36px; height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(39,50,111,0.35);
  border-radius: 50%;
  transition: background 0.22s, color 0.22s;
}

.quote-modal__close:hover {
  background: rgba(39,50,111,0.07);
  color: var(--brand-dark);
}

.quote-modal__title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.25;
  margin-bottom: 14px;
  padding-right: 40px;
}

.quote-modal__underline {
  width: 56px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 32px;
}

.quote-modal__body {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.quote-modal__image {
  flex: 0 0 260px;
  align-self: stretch;
}

.quote-modal__image img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
}

/* Form */
.quote-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.quote-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.quote-form__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.quote-form__field--full { width: 100%; }

.quote-form__field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
}

.quote-form__field input,
.quote-form__field select,
.quote-form__field textarea {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #33415c;
  background: #ffffff;
  border: 1.5px solid #d3dbe8;
  border-radius: 2px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.22s;
}

.quote-form__field textarea { resize: vertical; }

.quote-form__field input:focus,
.quote-form__field select:focus,
.quote-form__field textarea:focus {
  border-color: var(--brand-accent);
}

/* ── ANTI-BOT : champ appât (honeypot) ──
   Masqué hors de l'écran plutôt qu'en display:none : les robots qui analysent
   le CSS repèrent display:none et évitent le piège, alors qu'un décalage
   hors cadre passe pour un champ normal. Invisible pour l'utilisateur. */
.quote-form__hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quote-form__rgpd {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  color: #6b7690;
}

.quote-form__rgpd a {
  color: var(--brand-mid);
  text-decoration: underline;
}

.quote-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.quote-form__checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #33415c;
  cursor: pointer;
}

.quote-form__checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--gold);
  cursor: pointer;
}

.quote-form__submit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.quote-form__submit .btn-login { min-width: 180px; }

.quote-form__required {
  font-size: 11px;
  font-style: italic;
  color: #8891a5;
}

.quote-form__status {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.quote-form__status--ok { color: #2f8f5b; }
.quote-form__status--error { color: #c0392b; }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  html, body { height: auto; overflow-y: auto; overflow-x: hidden; }

  .hero {
    height: auto;
    min-height: 100vh;
    justify-content: flex-start;
    overflow: visible;
    padding: 100px 0 40px;
  }

  .hero__shape, .hero__shape-line { display: none; }
  .groupe-badge { top: 20px; }

  .hero__content { width: 88%; }

  .quote-cta,
  .contact-info {
    position: static;
    width: 88%;
    align-items: flex-start;
    text-align: left;
    margin-top: 36px;
  }

  .hero__footer { position: static; margin-top: 32px; }

  :root { --drawer-w: 100vw; }
  .login-drawer { padding: 48px 28px; }
  .hero.drawer-open .hero__content { transform: none; }

  .quote-modal {
    width: 94%;
    max-height: 92vh;
    padding: 32px 22px;
  }

  .quote-modal__body { flex-direction: column; gap: 24px; }
  .quote-modal__image { flex-basis: auto; width: 100%; }
  .quote-modal__image img { min-height: 160px; }

  .quote-form__row { grid-template-columns: 1fr; gap: 20px; }

  .quote-form__footer { align-items: flex-start; }
  .quote-form__submit { align-items: flex-start; width: 100%; }
  .quote-form__submit .btn-login { width: 100%; justify-content: center; }
  .quote-form__status { width: 100%; text-align: left; }
}
