/*
======================================================================
CYRIL CRESPO — PORTAIL
responsive_portrait.css — V6.2 (Anti-Horizontal Scroll)
======================================================================
*/

@media (orientation: portrait) or (max-width: 720px) {

  /* ------------------------------------------------------------------
     1. SÉCURISATION ANTI-DÉBORDEMENT HORIZONTAL (STRICT)
     ------------------------------------------------------------------ */
  *, *::before, *::after {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  html {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  body {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ------------------------------------------------------------------
     2. CONTENEUR PRINCIPAL
     ------------------------------------------------------------------ */
  main, .hero {
    width: 100% !important;
    max-width: 480px !important; /* Limite propre sur grands smartphones */
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 20px 16px 40px !important;
    overflow: hidden !important; /* Empeche tout composant interne de baver */
    display: flex !important;
    flex-direction: column !important;
  }

  /* ------------------------------------------------------------------
     3. HEADER IDENTITÉ
     ------------------------------------------------------------------ */
  .heading {
    width: 100% !important;
    text-align: center;
    margin-bottom: 20px;
  }

  .heading h1 {
    font-size: clamp(2rem, 8.5vw, 3rem) !important;
    line-height: 0.95;
    letter-spacing: -0.04em;
    word-break: break-word;
  }

  .sub {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    gap: 8px;
    width: 100% !important;
  }

  .sub i {
    width: 20px;
    flex-shrink: 0;
  }

  .sub span {
    font-size: 0.46rem;
    letter-spacing: 0.12em;
    white-space: normal; /* Autorise le retour a la ligne si ecran tres etroit */
  }

  .heading p {
    margin-top: 10px;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
  }

  .heading > em {
    width: 40px !important;
    margin: 10px auto 0 !important;
    display: block;
  }

  /* ------------------------------------------------------------------
     4. PILE VERTICALE DES CARTES
     ------------------------------------------------------------------ */
  .cards {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 24px !important;
    margin-top: 10px;
    padding: 0 !important;
  }

  .card {
    width: 100% !important;
    min-width: 0 !important; /* Annule tout min-width hérité du CSS global */
    height: auto !important;
    border-radius: 4px;
    border: 1px solid rgba(201, 160, 93, 0.38);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
    overflow: hidden;
  }

  /* Zone image */
  .photo {
    width: 100% !important;
    height: 320px !important; /* Hauteur fixe stable pour le cadrage */
    position: relative;
    overflow: hidden;
  }

  .photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
  }

  /* Zone texte sous la photo */
  .body {
    width: 100% !important;
    height: auto !important;
    padding: 16px 14px 20px !important;
    background: linear-gradient(180deg, rgba(6, 6, 6, 0.96), rgba(12, 12, 12, 0.99));
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .icon {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 8px;
    background: radial-gradient(circle, #1a1510, #090909);
    border: 1px solid rgba(224, 187, 114, 0.7);
  }

  .icon svg {
    width: 18px;
    height: 18px;
  }

  .body label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
  }

  .body h2 {
    font-size: 0.88rem;
    line-height: 1.30;
    margin-top: 6px;
  }

  .body p {
    font-size: 0.68rem;
    line-height: 1.40;
    margin-top: 6px;
    color: #c4c0b8;
  }

  .body > strong {
    width: 100% !important;
    margin-top: 14px;
    padding: 11px 10px;
    font-size: 0.60rem;
    letter-spacing: 0.12em;
    box-shadow: 0 6px 16px rgba(151, 111, 43, 0.2);
  }

  /* ------------------------------------------------------------------
     5. FOOTER
     ------------------------------------------------------------------ */
  .quote {
    width: 100% !important;
    margin-top: 28px;
    padding: 0 6px;
    font-size: 0.85rem;
    text-align: center;
  }

  footer {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px;
    padding: 20px 0 0 !important;
    margin-top: 20px;
    font-size: 0.40rem;
    text-align: center;
  }
}