/* Adem17 — Phase B */
:root {
  --ink: #1c2228;
  --ink-soft: #4a5560;
  --paper: #f7f8f9;
  --paper-2: #eef1f4;
  --accent: #248bb8;
  --accent-dark: #1a6d91;
  --sidebar: #202020;
  --sidebar-text: #f2f4f6;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  --font-display: "Josefin Slab", "Palatino Linotype", Palatino, serif;
  --font-body: "Raleway", "Segoe UI", sans-serif;
  --sidebar-w: 300px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1.75rem 1.35rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  overflow-y: auto;
}

.brand {
  text-align: center;
}

.brand img {
  width: 150px;
  margin: 0 auto 0.65rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  color: #fff;
}

.brand-tag {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  opacity: 0.82;
  line-height: 1.35;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

.nav a {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav a[aria-current="page"] {
  border-left: 3px solid var(--accent);
  padding-left: calc(0.8rem - 3px);
}

.sidebar-avis {
  text-align: center;
}

.sidebar-avis a {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
  background: #202020;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.avis-stars {
  padding: 0.65rem 0.5rem 0.35rem;
  background: #202020;
  color: #ffde00;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  line-height: 1;
  min-height: 1.6rem;
}

.avis-label {
  margin: 0;
  padding: 0.55rem 0.6rem 0.7rem;
  background: #231f20;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.sidebar-contact {
  margin-top: auto;
  display: grid;
  gap: 0.55rem;
}

.btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
}

.btn-call:hover {
  background: var(--accent-dark);
}

.sidebar-contact a:not(.btn-call) {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-contact a:not(.btn-call):hover {
  color: #9fd3ef;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 40;
  border: 0;
  background: var(--sidebar);
  color: #fff;
  padding: 0.7rem 0.95rem;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.main {
  min-width: 0;
}

.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: grid;
  align-items: end;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(20, 24, 28, 0.55) 12%, rgba(20, 24, 28, 0.22) 58%),
    url("../img/hero.jpg") center / cover;
  padding: 3.5rem clamp(1.25rem, 4vw, 3.5rem);
}

.hero-inner {
  max-width: 38rem;
  animation: rise 0.75s ease both;
}

.hero .brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.95;
  margin: 0 0 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 1.35rem;
  max-width: 32rem;
  opacity: 0.95;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #000;
  color: #fff;
}

.section {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3.5rem);
}

.section-alt {
  background: var(--paper-2);
}

.section-accent {
  background: var(--accent);
  color: #fff;
}

.section-accent h2,
.section-accent p,
.section-accent a {
  color: #fff;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  margin: 0 0 0.7rem;
  line-height: 1.2;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  max-width: 42rem;
  font-size: 1.05rem;
}

.section-accent .lead {
  color: rgba(255, 255, 255, 0.92);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.partners img {
  height: 58px;
  width: auto;
  object-fit: contain;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.actu-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.actu-card {
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.actu-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  background: #ddd;
}

.actu-body {
  padding: 0.9rem 1rem 1.1rem;
}

.actu-date {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.actu-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 320px;
  height: 360px;
  border: 0;
  border-radius: 4px;
  background: #e8e4dc;
}

.map-caption {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.gallery a {
  overflow: hidden;
  border-radius: 6px;
  background: #ddd;
  aspect-ratio: 4 / 3;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}

.gallery a:hover {
  transform: translateY(-3px);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-header {
  position: relative;
  padding: 3rem clamp(1.25rem, 4vw, 3.5rem);
  color: #fff;
  background:
    linear-gradient(120deg, rgba(20, 24, 28, 0.82), rgba(36, 139, 184, 0.55)),
    url("../img/hero.jpg") center / cover;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0 0 0.5rem;
}

.page-header p {
  margin: 0;
  max-width: 40rem;
  opacity: 0.95;
}

.prose {
  max-width: 48rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose h2 {
  margin-top: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.form {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.form input,
.form textarea {
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c5ced6;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid rgba(36, 139, 184, 0.35);
  border-color: var(--accent);
}

.checkbox {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.9rem;
}

.checkbox input {
  margin-top: 0.25rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: 1rem 1.1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-ok {
  background: #e5f5ea;
  color: #1d5c32;
}

.alert-err {
  background: #fde8e6;
  color: #8a241c;
}

.info-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.info-box p,
.info-box ul {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.info-box ul {
  padding-left: 1.1rem;
}

.site-footer {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem);
}

.site-footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.footer-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  opacity: 0.85;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  background: #1a1e22;
  color: #f5f2eb;
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  line-height: 1.4;
}

.cookie-bar[hidden] {
  display: none !important;
}

.cookie-bar p {
  margin: 0;
  flex: 1 1 240px;
}

.cookie-bar a {
  color: #9fd3ef;
}

.cookie-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cookie-actions button {
  border: 0;
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.cookie-ok {
  background: var(--accent);
  color: #fff;
}

.cookie-no {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 300px);
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    z-index: 30;
    box-shadow: var(--shadow);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 25;
  }

  .grid-2,
  .grid-3,
  .form-row,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 58vh;
  }
}
