/* ===================================================================
   RESPONSIVE — pensé élément par élément, du desktop vers mobile
   Breakpoints : 1024px (lg) · 900 (nav) · 860px (md) · 768px (swiper) ·
                 640px (sm) · 460px (xs) · ≥1280 (xl)
   =================================================================== */

/* ========================================================
   ≤ 1024px — tablette large / petit desktop
   ======================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    gap: var(--space-xl);
  }

  .hero-visual {
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .formules-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .avis-grid,
  .conseils-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  .avis-grid .avis-card:last-child:nth-child(odd) {
    grid-column: span 2;
    max-width: 520px;
    margin-inline: auto;
    width: 100%;
  }

  .formule-top {
    grid-template-columns: 1fr 1fr;
  }

  .formule-info {
    padding: 2.2rem 2rem 1.8rem;
  }

  .formule-info h3 {
    font-size: 1.9rem;
  }

  .pourqui-grid {
    gap: var(--space-2xl);
  }
}

/* ========================================================
   ≤ 900px — nav bascule en menu hamburger
   ======================================================== */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100dvh;
    background: rgba(var(--rgb-cream-light), 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--duration-base) var(--ease),
                transform var(--duration-base) var(--ease),
                visibility var(--duration-base) var(--ease);
    border: none;
    box-shadow: none;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: none;
  }

  .nav-links > a {
    font-size: 1.6rem;
    font-family: var(--font-heading);
    color: var(--color-atlantique);
    border: none !important;
    text-align: center;
  }

  /* CTA mobile : se distingue des liens normaux avec son fond ocre */
  .nav-cta {
    margin-top: 2rem;
    padding: 1rem 2.2rem;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    background: var(--color-ocre);
    color: var(--color-cream-light);
  }

  .nav-mobile-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    width: 100%;
    max-width: 250px;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--rgb-sage), 0.1);
  }
  
  .nav-mobile-socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
  }
  
  .nav-mobile-socials a {
    color: var(--color-sage);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 999;
  }
  
  .nav-toggle .icon-close {
    display: none;
  }
  
  .nav-toggle[aria-expanded="true"] .icon-menu {
    display: none;
  }
  
  .nav-toggle[aria-expanded="true"] .icon-close {
    display: block;
  }
  
  .brand {
    position: relative;
    z-index: 999;
  }
}

/* ========================================================
   ≤ 860px — tablette portrait (stack majeur)
   ======================================================== */
@media (max-width: 860px) {
  :root {
    --space-section: 4.5rem;
  }

  /* HERO */
  .hero {
    padding: 7rem 0 3.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero-eyebrow-mobile {
    margin-inline: auto;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-visual {
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
  }

  /* Polaroid réduit sur tablette portrait pour pas dépasser du container */
  .hero-polaroid {
    width: 150px;
    bottom: -20px;
    left: -18px;
  }

  .hero-stamp {
    width: 145px;
    height: 145px;
    top: -22px;
    right: -22px;
  }

  /* ABOUT */
  .about-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    text-align: center;
    align-items: center;
  }

  .about-img-wrap {
    max-width: 440px;
    margin-inline: auto;
    width: 100%;
    order: 2; /* Image en dessous du texte */
  }

  .about-badge {
    right: 8px;
    bottom: 8px;
    width: 130px;
    height: 130px;
  }

  .about-badge .script {
    font-size: 1.2rem;
  }

  .about-values > div {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
  }

  /* FORMULES (4 cards) */
  .formules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
  }

  .formules-devis {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 1.8rem;
    text-align: center;
  }

  .formules-devis ul {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    justify-items: start;
    text-align: left;
  }

  /* FORMULE — idée Laponie : stack complet */
  .formule-top {
    grid-template-columns: 1fr;
  }

  .formule-visual {
    min-height: 260px;
    aspect-ratio: 16/10;
  }

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

  .formule-info,
  .formule-days,
  .formule-cta {
    padding-inline: 1.8rem;
  }

  .formule-info {
    padding-block: 2rem;
  }

  /* APPROCHE & BENEFITS */
  .parcours-head,
  .travel-planner-head {
    text-align: center;
    align-items: center;
    display: flex;
    flex-direction: column;
  }
  
  .benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
  }
  
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem;
  }

  .steps-6 .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-md);
    margin-top: 1.5rem;
  }

  .step-num {
    right: 50%;
    transform: translateX(50%);
    top: -2.3rem; 
  }

  .parcours-cta {
    text-align: center;
  }

  .steps::before {
    display: none;
  }

  /* POUR QUI */
  .pourqui-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .pourqui-visual {
    max-width: 400px;
    margin-inline: auto;
    width: 100%;
  }

  /* CONSEILS + AVIS */
  .conseils-grid,
  .avis-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .avis-grid .avis-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
  }

  /* CONTACT — stack les 2 colonnes Calendly+Form */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .contact-col {
    padding: 1.7rem 1.5rem;
  }

  /* 3 → 2 cols pour éviter la casse du champ email sur tablette portrait */
  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  /* FOOTER — centré en mode mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .footer-brand .brand-name {
    align-items: center;
  }

  .footer-col {
    text-align: center;
  }

  .footer-socials {
    justify-content: center;
  }
}

/* ========================================================
   ≤ 768px — déclenchement du carousel mobile Swiper
   (gardé ici pour harmoniser avec main.js matchMedia)
   ======================================================== */
@media (max-width: 768px) {
  /* Masquer la pagination si un seul slide (cas dégénéré) */
  .mobile-carousel.swiper-initialized .swiper-pagination-lock {
    display: none;
  }
}

/* ========================================================
   ≤ 640px — mobile large (iPhone horizontal / petites tablettes)
   ======================================================== */
@media (max-width: 640px) {
  :root {
    --container-pad: 88%;
    --space-section: 4rem;
  }

  body {
    font-size: 0.98rem;
  }

  /* NAV */
  .nav {
    padding: 0.8rem 0;
  }

  .nav-inner {
    gap: 1rem;
  }

  .brand-logo,
  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-name strong {
    font-size: 0.88rem;
  }

  .brand-name span {
    font-size: 0.6rem;
    letter-spacing: 0.22em;
  }

  /* HERO — magazine éditorial mobile : image d'abord, titre imposant ensuite */
  .hero {
    padding: calc(var(--nav-height) + 1.5rem) 0 2.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  /* Inversion d'ordre spécifique : Eyebrow > Image > Contenu */
  .hero-eyebrow-mobile {
    display: inline-flex;
    margin-inline: auto;
    margin-bottom: 0;
    order: 1;
  }

  .hero-content .hero-eyebrow {
    display: none;
  }

  .hero-visual {
    order: 2;
    max-width: 100%;
    margin: 0;
    aspect-ratio: 5 / 4;
    border-radius: var(--radius-md);
    overflow: visible;
  }

  .hero-content {
    order: 3;
  }

  /* Image principale : full-width, rotation retirée, coins arrondis */
  .hero-img-main {
    transform: none;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -15px rgba(var(--rgb-ink), 0.35);
  }

  /* Stamp devient un overlay en bas-droit, plus discret */
  .hero-stamp {
    top: auto;
    right: 14px;
    bottom: 14px;
    width: 120px;
    height: 120px;
    padding: 0.9rem;
    border-width: 2px;
    transform: rotate(-4deg);
    background: rgba(var(--rgb-cream-light), 0.95);
  }

  .hero-stamp .script {
    font-size: 1.2rem;
  }

  .hero-stamp span {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    margin-top: 4px;
  }

  /* Polaroid caché en mobile — encombre trop pour peu de valeur */
  .hero-polaroid {
    display: none;
  }

  /* Centrage Hybride : En-têtes centrés, textes longs justifiés à gauche */
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .carnet-body, .storytelling-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .carnet-flipbook-wrap {
    max-width: 400px;
  }
  
  .carnet-features li {
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 0.8rem;
  }

  .about-body .section-eyebrow,
  .pourqui-grid > div:first-child .section-eyebrow {
    display: flex;
    width: fit-content;
    margin-inline: auto;
  }

  .about-body .section-title,
  .pourqui-grid > div:first-child .section-title {
    text-align: center;
    margin-inline: auto;
  }

  .pourqui-lede {
    text-align: center;
    margin-inline: auto;
  }

  .contact-col-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Eyebrow + titre : plus aéré, magazine */
  .hero-eyebrow {
    font-size: 0.68rem;
    padding: 0.4rem 0.9rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
    margin-top: 0;
  }

  .hero h1 {
    /* Réduit pour que le H1 tienne sur 2 lignes en mobile au lieu de 3. */
    font-size: clamp(1.85rem, 7.5vw, 2.6rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
  }

  .hero h1 .script {
    font-size: 1.1em;
  }

  .hero-lede {
    font-size: 1.02rem;
    line-height: 1.65;
    margin-bottom: 1.8rem;
    max-width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .hero-ctas .btn {
    width: 100%;
    flex: auto;
    padding: 1.1rem;
    font-size: 1rem;
  }

  .btn {
    justify-content: center;
    padding: 1rem 1.4rem;
    width: 100%;
    min-height: 48px;
  }

  /* Trust : grille 2×2 centrée — alignement propre des 4 badges. */
  .hero-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
    margin: 1.8rem auto 0;
    max-width: 380px;
  }

  /* Layout vertical sur mobile : picto au-dessus, texte centré en dessous. */
  .hero .hero-trust > div {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    gap: 0.45rem !important;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .hero .hero-trust > div > i,
  .hero .hero-trust > div > svg {
    width: 22px !important;
    height: 22px !important;
    color: var(--color-petra);
    flex-shrink: 0;
  }

  /* Hauteur minimum de 2 lignes pour le texte → tous les badges sont
     alignés visuellement, qu'ils tiennent sur 1 ou 2 lignes. */
  .hero .hero-trust > div > span {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(0.78rem * 1.25 * 2);
    width: 100%;
  }

  /* SECTION titre */
  .section-eyebrow {
    font-size: 1.55rem;
  }

  .section-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  /* ABOUT */
  .about-img-wrap {
    max-width: 320px;
  }

  .about-badge {
    width: 108px;
    height: 108px;
    right: -4px;
    bottom: -8px;
  }

  .about-badge .script {
    font-size: 1.02rem;
  }

  .about-body p.lede {
    font-size: 1.08rem;
    padding-left: 1rem;
  }

  .about-body p {
    font-size: 1.02rem;
  }

  .about-values {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  /* FORMULES — quand le Swiper n'est pas initialisé (ex. JS off) : 1 colonne */
  .formules-grid:not(.swiper-initialized) {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .formules-grid:not(.swiper-initialized) .offer-card {
    max-width: 420px;
    margin-inline: auto;
    width: 100%;
  }

  .offer-banner {
    aspect-ratio: 16/10;
  }

  .offer-name .script {
    font-size: 1.25rem;
  }

  .offer-name h3 {
    font-size: 1.3rem;
  }

  .offer-price .price {
    font-size: 1.7rem;
  }

  .offer-body {
    padding: 1.3rem 1.2rem 1.4rem;
  }

  .formules-devis {
    padding: 1.5rem 1.3rem;
  }

  .formules-devis-head .script {
    font-size: 1.5rem;
  }

  .formules-devis-head h3 {
    font-size: 1.5rem;
  }

  .formules-devis ul {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .formules-devis li {
    font-size: 0.88rem;
  }

  /* FORMULE — idée Laponie */
  .formule-visual {
    min-height: 0;
    aspect-ratio: 3/2;
  }

  .formule-info {
    padding: 1.8rem 1.4rem 1.3rem;
  }

  .formule-info .script {
    font-size: 1.5rem;
  }

  .formule-info h3 {
    font-size: 1.55rem;
  }

  .formule-meta > div {
    font-size: 0.88rem;
  }

  .formule-price .price {
    font-size: 2.2rem;
  }

  .formule-days,
  .formule-cta {
    padding: 1.6rem 1.4rem;
  }

  .formule-days-title {
    font-size: 1.55rem;
  }

  .formule-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .formule-cta p {
    font-size: 1rem;
    margin-inline: auto;
  }

  .formule-ribbon {
    top: 18px;
    right: -54px;
    padding: 0.45rem 3.5rem;
    font-size: 0.62rem;
  }

  /* APPROCHE */
  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .step-icon {
    width: 60px;
    height: 60px;
  }

  .step-icon i {
    width: 24px;
    height: 24px;
  }

  /* POUR QUI */
  .pourqui-item {
    padding: 1.3rem;
    gap: 1rem;
  }

  .pourqui-item strong {
    font-size: 1.05rem;
  }

  .pourqui-tag {
    bottom: -18px;
    left: 8px;
    padding: 0.8rem 1.1rem;
  }

  .pourqui-tag .script {
    font-size: 1.25rem;
  }

  /* CONSEILS */
  .conseils-grid:not(.swiper-initialized) {
    grid-template-columns: 1fr;
  }

  .conseil {
    padding: 1.8rem 1.4rem 1.6rem;
  }

  .conseil h4 {
    font-size: 1.08rem;
  }

  /* Stamp Alert/Info/Tip : repositionné à l'intérieur de la card en mobile
     pour éviter tout débordement du carousel Swiper. */
  .conseil-stamp {
    font-size: 0.62rem;
    padding: 0.4rem 0.85rem;
    top: 12px;
    right: 12px;
    transform: rotate(3deg);
  }

  /* AVIS */
  .avis-grid:not(.swiper-initialized) {
    grid-template-columns: 1fr;
  }

  .avis-rating {
    padding: 0.7rem 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .avis-card {
    padding: 1.6rem 1.3rem;
  }

  .avis-text {
    font-size: 0.94rem;
  }

  .avis-cta-wrap a {
    font-size: 0.9rem;
    text-align: center;
    padding: 0.85rem 1.1rem;
  }

  /* CONTACT — mobile ≤640px */
  .contact-head {
    margin-bottom: var(--space-xl);
  }

  .contact-lede {
    font-size: 1.02rem;
  }

  .contact-col {
    padding: 1.4rem 1.2rem;
  }

  .contact-col-head {
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
  }

  .contact-col-step {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .contact-col-head h3 {
    font-size: 1.18rem;
  }

  .contact-col-head p {
    font-size: 0.88rem;
  }

  .calendly-inline-widget {
    height: 420px;
  }

  .calendly-start {
    width: 100%;
    padding: 0.9rem 1.4rem;
    justify-content: center;
    min-height: 48px;
  }

  .calendly-shell {
    padding: 0.5rem 0;
  }

  .calendly-inline-widget {
    margin-inline: -1.2rem;
    width: calc(100% + 2.4rem);
    min-width: auto;
    border-radius: 0;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px; /* évite le zoom auto iOS lors du focus */
    padding: 0.8rem 0.9rem;
  }

  .form-submit {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .contact-cards {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    max-width: 100%;
  }

  .contact-card {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    min-height: 56px;
  }

  .contact-card > i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .contact-card .label {
    font-size: 0.58rem;
  }

  .contact-card strong {
    font-size: 0.95rem;
  }

  /* FOOTER */
  footer {
    padding: 2.8rem 0 1.6rem;
  }

  .footer-col h5 {
    margin-bottom: 0.7rem;
  }

  .footer-col a {
    padding: 0.35rem 0;
    margin-bottom: 0.15rem;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-copy {
    font-size: 0.72rem;
    line-height: 1.6;
  }

  /* PAGE LÉGALE */
  .legal-page {
    padding: calc(var(--nav-height) + var(--space-lg)) 0 var(--space-2xl);
  }

  .legal-page h1 {
    font-size: clamp(1.7rem, 6vw, 2.2rem);
  }

  .legal-page h2 {
    font-size: 1.3rem;
  }
}

/* ========================================================
   ≤ 460px — très petits mobiles (iPhone SE, petits Android)
   ======================================================== */
@media (max-width: 460px) {
  :root {
    --container-pad: 92%;
  }

  /* Hero ≤460px : stamp encore plus compact, titre serré (2 lignes max). */
  .hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .hero-stamp {
    width: 100px;
    height: 100px;
    right: 10px;
    bottom: 10px;
    padding: 0.7rem;
  }

  .hero-stamp .script {
    font-size: 1.02rem;
  }

  .hero-stamp span {
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    margin-top: 3px;
  }

  .nav-inner {
    gap: 0.7rem;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand-name strong {
    font-size: 0.78rem;
    letter-spacing: 0.025em;
  }

  .brand-name span {
    font-size: 0.54rem;
    letter-spacing: 0.2em;
  }

  /* Ribbon formule qui dépasse sur très petit */
  .formule-ribbon {
    top: 14px;
    right: -46px;
    padding: 0.4rem 3rem;
    font-size: 0.56rem;
  }

  /* Badge comprendre d'abord masqué en dessous de 460 — pas de place */
  .about-badge {
    display: none;
  }

  .pourqui-tag {
    left: 4px;
    bottom: -14px;
    padding: 0.7rem 1rem;
  }

  .pourqui-tag .script {
    font-size: 1.1rem;
  }

  /* Avis sur très petit écran : quote mark moins débordante */
  .avis-card::before {
    font-size: 3.5rem;
    top: -0.2rem;
  }

  /* Formule idée : meta en stack, price centré */
  .formule-info h3 {
    font-size: 1.4rem;
  }

  .formule-meta {
    gap: 0.6rem;
  }

  .day {
    gap: 0.8rem;
    padding: 0.8rem 0;
  }

  .day-num {
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
  }

  /* Section title encore plus serré */
  .section-title {
    font-size: clamp(1.6rem, 8vw, 2rem);
  }

  .calendly-inline-widget {
    height: 400px;
  }

  /* Contact col padding plus compact */
  .contact-col {
    padding: 1.2rem 1rem;
  }

  /* Steps icons dans approche */
  .step .script {
    font-size: 1.2rem;
  }

  .step h4 {
    font-size: 1.05rem;
  }
}

/* ========================================================
   ≥ 1280px — grand desktop : aération extra
   ======================================================== */
@media (min-width: 1280px) {
  :root {
    --container-max: 1240px;
  }
}
