/* ══════════════════════════════════════════════════════════════
   PHOKUS studio — mobile.css
   Optimisations Mobile-First : expérience "zéro frustration"
   pour les visiteurs arrivant d'Instagram.
   Ce fichier surcharge style.css sur les petits écrans.
   ══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   BASE MOBILE — anti-débordement, smooth-scroll, touch
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* Empêche tout scroll horizontal parasite */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Accélération tactile iOS */
  * { -webkit-tap-highlight-color: transparent; }

  /* Scroll fluide natif partout */
  html { scroll-behavior: smooth; }

  /* Corrige les unités viewport sur iOS Safari (barre d'adresse) */
  .hero { min-height: 100svh; }
}


/* ══════════════════════════════════════════════════════════════
   NAV & BURGER
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .nav {
    height: 56px;
    padding: 0 16px;
  }

  /* Zone de clic burger ≥ 48×48px */
  .nav__burger {
    width: 48px;
    height: 48px;
    padding: 12px 10px;
    margin-right: -10px; /* aligne visuellement sur le bord */
  }

  /* Cache tout sauf burger + logo */
  .nav__links,
  .nav__themes-btn,
  .nav__insta,
  .nav__right .lang,
  .nav__right .lang-sep,
  .nav__right .lang-active { display: none; }

  .nav__burger { display: flex; }
}


/* ══════════════════════════════════════════════════════════════
   MENU MOBILE — overlay navigation
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .mobile-menu {
    /* Safe area pour les téléphones avec encoche/barre home */
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  /* Liens de navigation : hauteur tactile ≥ 56px chacun */
  .mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 8px 20px;
    font-size: clamp(32px, 9vw, 48px);
    width: 100%;
    text-align: center;
    /* Feedback tactile immédiat */
    transition: color .15s ease, transform .15s ease;
  }

  .mobile-menu__link:active {
    color: var(--gold);
    transform: scale(.97);
  }

  /* Bouton thèmes et lien Instagram — zones tactiles */
  .mobile-menu__themes-btn,
  .mobile-menu__insta {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
  }

  .mobile-menu__themes-btn:active { opacity: .7; }
}


/* ══════════════════════════════════════════════════════════════
   BOUTONS & CTA — taille adaptée mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .btn-primary,
  .btn-ghost {
    min-height: 44px;
    padding: 11px 20px;
    font-size: 11px;
    letter-spacing: .1em;
    width: fit-content;
  }

  .btn-primary:active { transform: scale(.97); }
  .btn-ghost:active   { opacity: .75; }

  /* Hero CTA — colonne alignée à gauche, largeur identique */
  .hero__cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: auto;
  }

  .hero__cta .btn-primary,
  .hero__cta .btn-ghost {
    width: 200px;
    text-align: center;
    justify-content: center;
  }
}


/* ══════════════════════════════════════════════════════════════
   HERO — lisibilité et respiration mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .hero__content {
    padding: 72px 16px 36px;
  }

  .hero__title {
    font-size: clamp(40px, 13vw, 64px);
    line-height: .92;
  }

  .hero__title-line--2 {
    margin-left: clamp(16px, 4vw, 40px);
  }

  .hero__sub {
    font-size: 11px;
    letter-spacing: .16em;
    margin-top: 12px;
  }

  .hero__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 20px;
  }

  .hero__bottom-left { width: 100%; }

  /* Chiffre décoratif — masqué, trop lourd */
  .hero__big-num { display: none; }

  /* Noms des shootings — wrapping naturel */
  .hero__shooting-names { height: auto; position: relative; }
  .hero__shooting-name  { position: relative; white-space: normal; }

  /* Nav slides hero — centrée, facilement cliquable */
  .hero__nav {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .hero__nav-item {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}


/* ══════════════════════════════════════════════════════════════
   FEED INSTAGRAM — slider horizontal au doigt sur mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .feed {
    padding: 56px 0 40px;
  }

  .feed__header {
    padding: 0 16px;
    margin-bottom: 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Grille → slider horizontal snap */
  .feed__grid {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding: 0 16px 12px;
    /* Masque la scrollbar visuellement */
    scrollbar-width: none;
  }

  .feed__grid::-webkit-scrollbar { display: none; }

  /* Chaque carte : 80vw → on voit le début de la suivante */
  .feed__item {
    flex: 0 0 80vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Ratio image adapté portrait mobile */
  .feed__img-wrap {
    aspect-ratio: 3/4;
  }

  /* Caption toujours visible sur mobile (pas de hover) */
  .feed__caption { display: flex; }

  /* CTA footer centré, pleine largeur */
  .feed__footer { padding: 0 16px; }
  .feed__footer-cta {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }
}

/* Tablette : grille 2×2 */
@media (min-width: 641px) and (max-width: 1024px) {
  .feed__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ══════════════════════════════════════════════════════════════
   GALERIE — une colonne + bonne lisibilité
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .galerie__header {
    padding: 56px 16px 36px;
    gap: 24px;
  }

  .galerie__title {
    font-size: clamp(48px, 14vw, 80px);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .gallery-hrow { grid-template-columns: 1fr; }
  /* On masque la première hcard qui est purement décorative */
  .gallery-hcard:first-child { display: none; }
}


/* ══════════════════════════════════════════════════════════════
   SECTION PRESSE / RÉFÉRENCES
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .presse {
    padding: 56px 16px 48px;
  }

  .presse__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 28px;
  }

  .presse__title { font-size: clamp(28px, 8vw, 44px); }

  /* Une carte par ligne sur mobile */
  .presse__grid { grid-template-columns: 1fr; }

  /* Carte award — compact sur mobile */
  .presse__card--award .presse__award-rank { font-size: 32px; }
}


/* ══════════════════════════════════════════════════════════════
   CONTACT — typographie, formulaire tactile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .contact__content {
    padding: 72px 16px 64px;
  }

  .contact__title {
    font-size: clamp(48px, 13vw, 80px);
  }

  .contact__chapo {
    font-size: 17px;
    line-height: 1.6;
    margin-top: 20px;
  }

  .contact__cta { flex-direction: column; gap: 10px; }
  .contact__grid { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
  .contact__value { font-size: 16px; }

  /* Formulaire — zones tactiles confortables */
  .form__type-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .form__type-option,
  .form__type-btn {
    padding: 14px 8px;
    min-height: 52px;
    font-size: 11px;
  }

  .form__input,
  .form__textarea {
    /* iOS : empêche le zoom auto sur focus (font-size ≥ 16px) */
    font-size: 16px;
    padding: 14px 0;
    min-height: 52px;
  }

  .form__textarea  { min-height: 128px; }
  .form__row       { grid-template-columns: 1fr; gap: 0; }

  .form__submit {
    width: 100%;
    justify-content: center;
    min-height: 56px;
    font-size: 13px;
  }
}


/* ══════════════════════════════════════════════════════════════
   FOOTER — restructuré mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* ── Bandeau soutien ── */
  .footer__support {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 16px;
  }

  .footer__support-desc {
    font-size: 12px;
    line-height: 1.6;
  }

  .footer__support-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    text-align: center;
  }

  /* ── Bloc collectif : grille 2 colonnes ── */
  .footer__crew {
    padding: 40px 16px 32px;
  }

  .footer__crew-header {
    margin-bottom: 28px;
  }

  .footer__crew-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
  }

  .footer__member {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .footer__member-body {
    align-items: center;
  }

  /* ── Zone logo + citation + liens ── */
  .footer__bottom-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 16px;
  }

  /* Logo + baseline + insta : centré */
  .footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .footer__insta {
    justify-content: center;
  }

  /* Citation : centrée, séparateur visible */
  .footer__center {
    grid-column: auto;
    border-top: 1px solid rgba(244,241,234,.07);
    border-bottom: 1px solid rgba(244,241,234,.07);
    padding: 24px 0;
    text-align: center;
  }

  .footer__quote {
    font-size: clamp(16px, 4.5vw, 22px);
    text-align: center;
  }

  .footer__quote-attr {
    display: block;
    text-align: center;
    margin-top: 8px;
  }

  /* Liens de nav : 2 colonnes côte à côte */
  .footer__links-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer__col-title {
    margin-bottom: 10px;
  }

  /* ── Barre de copyright ── */
  .footer__bottom {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    text-align: center;
    border-top: 1px solid rgba(244,241,234,.06);
  }

  .footer__legal {
    display: flex;
    gap: 16px;
    justify-content: center;
  }
}


/* ══════════════════════════════════════════════════════════════
   DRAWER THÈMES — grille visuelle sur mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* Panneau pleine largeur qui slide du bas */
  .themes-drawer__panel {
    width: 100%;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    height: 92svh;
    border-left: none;
    border-top: 1px solid rgba(244,241,234,.1);
    border-radius: 16px 16px 0 0;
    padding: 20px 16px 32px;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.33,1,.68,1);
  }

  .themes-drawer.is-open .themes-drawer__panel {
    transform: translateY(0);
  }

  /* Poignée drag visuelle */
  .themes-drawer__panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(244,241,234,.2);
    border-radius: 2px;
    margin: 0 auto 16px;
  }

  .themes-drawer__head {
    margin-bottom: 12px;
  }

  .themes-drawer__intro {
    font-size: 13px;
    margin-bottom: 16px;
  }

  /* Grille 2 colonnes avec grandes images */
  .themes-drawer__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    overflow-y: auto;
    padding-bottom: 16px;
  }

  /* Chaque item = carte image pleine avec titre en overlay */
  .themes-drawer__item {
    display: block;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    aspect-ratio: 3/4;
    transition: transform .2s ease;
  }

  .themes-drawer__item:hover,
  .themes-drawer__item:active {
    transform: scale(.97);
    background: none;
    padding-left: 0;
    margin: 0;
  }

  /* Image pleine */
  .themes-drawer__thumb {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: 0;
  }

  /* Gradient bas pour lisibilité du texte */
  .themes-drawer__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,.85) 0%, rgba(10,10,10,.1) 50%, transparent 100%);
    pointer-events: none;
  }

  /* Texte en bas de l'image */
  .themes-drawer__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 10px 12px;
    z-index: 2;
    gap: 2px;
  }

  .themes-drawer__num  { font-size: 8px; letter-spacing: .18em; }
  .themes-drawer__name { font-size: 14px; font-weight: 700; color: var(--ivory); }
  .themes-drawer__sub  { font-size: 8px; color: rgba(244,241,234,.5); }

  /* Flèche cachée — inutile en grille */
  .themes-drawer__arrow { display: none; }

  /* Items "bientôt" — fond gris, pas d'image */
  .themes-drawer__thumb--empty {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
  }
}


/* ══════════════════════════════════════════════════════════════
   TICKER & DIVERS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

  .ticker__track span { font-size: 10px; }

  /* Drawer thèmes — pleine largeur */
  .themes-drawer__panel {
    width: 100%;
    border-left: none;
    padding: 28px 16px 48px;
    /* Safe area bas (barre home iPhone) */
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}


/* ══════════════════════════════════════════════════════════════
   TRÈS PETIT ≤ 390px (iPhone SE, petits Android)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 390px) {

  .hero__title { font-size: clamp(36px, 13vw, 52px); }
  .mobile-menu__link { font-size: clamp(28px, 9vw, 40px); }
  .form__type-grid { grid-template-columns: 1fr 1fr; }

  .feed__item { flex: 0 0 88vw; }
}


/* ══════════════════════════════════════════════════════════════
   SAFE AREA — iPhone X+ (barre home, encoche)
   ══════════════════════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 640px) {

    .nav {
      padding-left:  max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
    }

    .footer__bottom {
      padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
  }
}
