/* ==========================================================================
   Tipatipa — feuille de style principale
   ========================================================================== */

:root {
  /* Couleurs */
  --color-primary: #317b74;
  --color-primary-hover: #1f4e4a;
  --color-primary-light: #3d9389;
  --color-accent: #ff9d01;
  --color-accent-dark: #e68900;
  --color-bg: #ffffff;
  --color-bg-alt: #ffebcb;
  --color-bg-soft: #faf8f4;
  --color-text: #1a1a1a;
  --color-text-muted: #54595f;
  --color-white: #ffffff;
  --color-border: #e7dfd0;
  --color-error: #f04438;

  /* Typographie */
  --font-heading: "Sora", sans-serif;
  --font-body: "Source Sans Pro", sans-serif;

  /* Mise en page */
  --max-width: 1160px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 12px 30px rgba(26, 26, 26, 0.08);
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-hover);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
}

h2 {
  /* Sora 700, 32px en desktop, réduit progressivement sur mobile */
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
}

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

.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: 12px;
  top: -60px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--color-white);
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-hover);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-primary);
  color: var(--color-white);
}

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

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.btn-store {
  gap: 10px;
}

.btn-store svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

.main-nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}

.main-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.main-nav a:hover {
  color: var(--color-primary);
}

.header-cta {
  flex-shrink: 0;
  position: relative;
}

.main-nav .header-cta a.btn {
  color: var(--color-white);
}

.main-nav .header-cta a.btn:hover {
  color: var(--color-white);
}

.dropdown-trigger {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 270px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 600;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: var(--color-bg-soft);
  color: var(--color-primary);
}

.dropdown-menu svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 72px 0 24px;
  margin-bottom: 48px;
  overflow: hidden;
  text-align: center;
  background-color: var(--color-white);
  background-image: url("/images/header-bg-left.webp"), url("/images/header-bg-right.webp");
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right top;
  background-size: auto 100%, auto 100%;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content {
  position: relative;
  max-width: 1000px;
}

.hero-content-wide {
  max-width: 1180px;
}

.hero-heading {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 28px;
}

.hero-heading-lines {
  text-align: left;
}

.hero-heading-lines h1:first-child {
  text-align: center;
}

.hero-heading-lines h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 72px;
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
}

.hero-highlight {
  position: relative;
  display: inline-block;
}

.hero-highlight-underline {
  position: absolute;
  left: 50%;
  bottom: -0.55em;
  transform: translateX(-50%);
  width: 135%;
  height: auto;
  pointer-events: none;
}

.hero-text {
  color: var(--color-text);
  max-width: 100ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  margin-top: 8px;
}

.hero-image {
  margin-top: 8px;
}

.hero-image img {
  border-radius: var(--radius-lg);
  margin: 0 auto;
}

/* ==========================================================================
   Sections génériques
   ========================================================================== */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--color-bg-alt);
  position: relative;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 40px;
  text-align: center;
}

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

/* --- Mission / "C'est quoi Tipatipa" --- */

.mission {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.mission-text h2,
.mission-text h3 {
  margin-top: 1.4em;
}

.mission-text h2:first-child {
  margin-top: 0;
}

.mission-text h3 {
  font-size: 1.3rem;
}

.mission-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mission-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mission-list li::before {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Visuel de présentation (mosaïque de 3 photos, image unique) */
.mission-visual img {
  width: 100%;
  height: auto;
}

/* --- "On vous aide à oser le créole" --- */

.features-section {
  overflow: visible;
}

/* Bandeau orange : contient uniquement le titre, les cartes viennent
   se superposer sur son bord inférieur (voir .features margin-top négatif). */
.features-banner {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 44px 32px 104px;
  text-align: center;
}

.features-banner .section-header {
  margin: 0 auto;
}

.features-banner .section-header h2 {
  margin-bottom: 0;
}

.features-banner .section-header p {
  margin-bottom: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-top: -84px;
  margin-left: 20px;
  margin-right: 20px;
  position: relative;
  z-index: 1;
}

.feature {
  width: calc(100% - 20px);
  justify-self: center;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  text-align: left;
  overflow: visible;
  display: flex;
  flex-direction: column;
  /* pousse le texte et le téléphone aux extrémités de la carte :
     téléphone en bas (col. 1 & 3), texte en bas (col. 2) */
  justify-content: space-between;
  gap: 20px;
}

.feature-body h3 {
  color: var(--color-text);
  font-size: 1.15rem;
}

.feature-body p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.feature-image {
  display: flex;
  justify-content: center;
}

.feature-image img {
  width: 72%;
  height: auto;
  object-fit: contain;
}

/* Colonnes 1 et 3 : texte en haut, image qui déborde sous la carte */
.feature:nth-child(1) .feature-body,
.feature:nth-child(3) .feature-body {
  order: 1;
}

.feature:nth-child(1) .feature-image,
.feature:nth-child(3) .feature-image {
  order: 2;
  /* colle l'image au bord bas de la carte (= padding bas) */
  margin-bottom: -26px;
}

/* Colonne 2 : image (plus petite) au-dessus, texte en bas */
.feature:nth-child(2) .feature-image {
  order: 1;
  /* colle l'image au bord haut de la carte (= padding haut) */
  margin-top: -26px;
}

.feature:nth-child(2) .feature-image img {
  width: 62%;
}

.feature:nth-child(2) .feature-body {
  order: 2;
}

.features-footer {
  text-align: center;
  margin-top: 48px;
  padding-bottom: 24px;
}

/* ==========================================================================
   CTA final
   ========================================================================== */

.cta-band {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  margin: 0 24px;
}

.cta-band h2,
.cta-band p {
  color: var(--color-white);
}

.cta-band .btn-primary {
  background: var(--color-accent);
}

.cta-band .btn-primary:hover {
  background: #e08900;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #10302c;
  color: #cfe4e0;
  padding: 64px 0 24px;
  margin-top: 72px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-top h2 {
  color: var(--color-white);
  margin-bottom: 0.3em;
  /* conserve la taille du footer déjà validé */
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.footer-top p {
  color: #cfe4e0;
  margin-bottom: 0;
}

.footer-cta .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-hover);
}

.footer-cta .btn-primary:hover {
  background: #e08900;
  color: var(--color-primary-hover);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 40px 0;
}

.footer-brand img {
  height: 36px;
  margin-bottom: 12px;
}

.footer-brand p {
  color: #9fc0bb;
  max-width: 32ch;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  list-style: none;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
}

.footer-socials a:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

.footer-col h3 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #9fc0bb;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: var(--color-white);
}

.footer-stores img {
  height: 44px;
  width: auto;
  margin-top: 8px;
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #7fa39d;
}

/* ==========================================================================
   Page Contact
   ========================================================================== */

.contact-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  /* mêmes marges left/right que la page d'accueil (.container) */
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 24px 0;
}

/* les sections partagent la largeur du layout : on annule le .container interne */
.contact-layout .container {
  max-width: none;
  width: 100%;
  padding: 0;
}

.contact-layout > .section {
  flex: 1 1 0;
  min-width: 300px;
}

.contact-hero {
  text-align: center;
  padding-top: 0;
}

.contact-hero img {
  margin: 0 auto;
  border-radius: var(--radius-lg);
  max-width: 100%;
  width: 100%;
  height: auto;
}

.contact-form-wrapper {
  max-width: 100%;
  margin: 0;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-soft);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

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

.field-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: var(--color-error);
}

.form-group.has-error .field-error {
  display: block;
}

/* Honeypot anti-spam : champ caché visuellement mais accessible aux robots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: #e4f4e8;
  color: #1e7a3d;
}

.form-status.error {
  display: block;
  background: #fdecea;
  color: var(--color-error);
}

.form-submit {
  width: 100%;
}

/* ==========================================================================
   Pages légales
   ========================================================================== */

.legal-page {
  padding: 56px 0 96px;
}

.legal-page .container {
  max-width: 820px;
}

.legal-updated {
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 2em;
}

.legal-page h2 {
  margin-top: 1.8em;
  font-size: 1.5rem;
}

.legal-page h3 {
  margin-top: 1.4em;
  font-size: 1.15rem;
  color: var(--color-primary);
}

.legal-page ul {
  list-style: disc;
  padding-left: 1.4em;
  margin-bottom: 1em;
}

.legal-page li {
  margin-bottom: 0.4em;
}

.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.92rem;
}

.legal-page th,
.legal-page td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  vertical-align: top;
}

.legal-page th {
  background: var(--color-bg-alt);
  font-family: var(--font-heading);
  font-weight: 600;
}

.legal-page code {
  background: var(--color-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ==========================================================================
   Bandeau cookies
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-white);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-soft);
  z-index: 1000;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.cookie-banner a {
  color: var(--color-primary);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cookie-actions .btn {
  padding: 10px 22px;
  font-size: 0.92rem;
}

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

@media (max-width: 900px) {
  .hero-heading-lines h1 {
    font-size: 2.75rem;
    white-space: normal;
  }

  .mission {
    grid-template-columns: 1fr;
  }

  .mission-visual {
    max-width: 480px;
    margin: 0 auto;
  }

  .features-banner {
    padding-bottom: 110px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 56px;
    margin-top: -80px;
  }


  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero-heading-lines {
    text-align: center;
  }

  .hero-heading-lines h1 {
    font-size: 2rem;
    white-space: normal;
  }

  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 24px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

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

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .main-nav ul a {
    display: block;
    padding: 12px 0;
  }

  .main-nav .header-cta {
    margin-top: 12px;
  }

  .nav-toggle {
    display: block;
  }

  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    margin: 0 16px;
    padding: 40px 24px;
  }
}

@media (max-width: 900px) {
  .contact-layout > .section {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .contact-form-wrapper {
    padding: 28px 20px;
  }
}
