/* =========================================================
   MEDBRIDGE CONSULTING — style.css
   Identité visuelle : bleu profond, turquoise, vert, blanc
   ========================================================= */

:root {
  --color-navy: #16324f;
  --color-navy-dark: #0e2338;
  --color-teal: #1c8b93;
  --color-green: #3fa66a;
  --color-white: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f8f9;
  --color-text: #202e3a;
  --color-text-light: #55677a;
  --color-border: #e1e8ec;

  --gradient-brand: linear-gradient(120deg, var(--color-navy) 0%, var(--color-teal) 55%, var(--color-green) 100%);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1140px;
  --radius: 10px;
  --shadow-sm: 0 2px 10px rgba(22, 50, 79, 0.06);
  --shadow-md: 0 8px 28px rgba(22, 50, 79, 0.1);

  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: var(--color-navy-dark); margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--color-navy);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  z-index: 200;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.hero .btn-outline { border-color: var(--color-navy); color: var(--color-navy); }
.hero .btn-outline:hover { background: var(--color-navy); color: #fff; }

.btn-submit { width: 100%; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand-logo {
  height: 48px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-navy);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.primary-nav a {
  color: var(--color-navy-dark);
  font-weight: 500;
  font-size: 0.98rem;
}
.primary-nav a:hover { color: var(--color-teal); text-decoration: none; }

.primary-nav a.nav-cta {
  background: var(--gradient-brand);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
}
.primary-nav a.nav-cta:hover { color: #fff; opacity: 0.92; }

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient-brand);
  color: #fff;
  padding: 4.5rem 0 5rem;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo {
  height: 90px;
  width: auto;
  background: #fff;
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
.hero-tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 600;
  max-width: 40ch;
  margin: 0 auto 1.25rem;
}
.hero-text {
  max-width: 60ch;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.92);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.hero .btn-primary {
  background: #fff;
  color: var(--color-navy);
}
.hero .btn-primary:hover { color: var(--color-teal); }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  margin-bottom: 1rem;
}
.section-lead {
  max-width: 70ch;
  margin: 0 auto 2.75rem;
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ---------- Engagements (Notre société) ---------- */
.engagements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.25rem;
}
.engagement {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}
.engagement-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  color: var(--color-teal);
}
.engagement-icon svg { width: 24px; height: 24px; }
.engagement-label {
  font-weight: 600;
  color: var(--color-navy-dark);
  font-size: 0.98rem;
}

/* ---------- Cards (Nos expertises) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.6rem;
}
.card p {
  color: var(--color-text-light);
  font-size: 0.97rem;
  flex-grow: 1;
}
.card-link {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card-link::after {
  content: "→";
  transition: transform var(--transition);
}
.card-link:hover::after { transform: translateX(3px); }

/* ---------- Approche ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  counter-reset: step;
}
.step {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.step p { margin: 0; font-weight: 500; color: var(--color-navy-dark); }
.approche-cta { text-align: center; }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}
.contact-info h2 { text-align: left; }
.contact-info address {
  font-style: normal;
  color: var(--color-text-light);
  line-height: 1.9;
}
.contact-info address strong { color: var(--color-navy-dark); }
.contact-info address a { color: var(--color-teal); font-weight: 600; }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row-full { grid-column: 1 / -1; }

.form-row label {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--color-navy-dark);
}
.required { color: var(--color-teal); }
.optional { font-weight: 400; color: var(--color-text-light); font-size: 0.85rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-teal);
}
textarea { resize: vertical; min-height: 120px; }

.form-row-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}
.form-row-checkbox input { margin-top: 0.3rem; width: 18px; height: 18px; flex-shrink: 0; }
.form-row-checkbox label { font-weight: 400; }

.form-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.2rem;
}
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
  border-color: #c0392b;
}

.form-feedback {
  grid-column: 1 / -1;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  display: none;
}
.form-feedback.is-visible { display: block; }
.form-feedback.success {
  background: rgba(63, 166, 106, 0.12);
  color: #276b45;
  border: 1px solid rgba(63, 166, 106, 0.4);
}
.form-feedback.error {
  background: rgba(192, 57, 43, 0.08);
  color: #a5342a;
  border: 1px solid rgba(192, 57, 43, 0.35);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3.5rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-logo {
  height: 40px;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 0.9rem;
}
.footer-name { color: #fff; font-weight: 700; margin-bottom: 0.2rem; }
.footer-tagline { color: rgba(255, 255, 255, 0.65); font-size: 0.92rem; }
.footer-contact address { font-style: normal; line-height: 1.9; }
.footer-contact a { color: #fff; }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { color: rgba(255, 255, 255, 0.85); }
.footer-nav a:hover { color: #fff; }

.copyright {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .primary-nav.is-open { max-height: 400px; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
  }
  .primary-nav a {
    display: block;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--color-border);
  }
  .primary-nav a.nav-cta {
    text-align: center;
    margin-top: 0.5rem;
    border-bottom: none;
  }

  .contact-form { grid-template-columns: 1fr; padding: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-contact { display: flex; flex-direction: column; align-items: center; }
  .contact-info h2 { text-align: center; }
}

@media (max-width: 480px) {
  .hero { padding: 3.5rem 0 3.5rem; }
  .section { padding: 3rem 0; }
}
