/* ===== PCSM-CI — Affichage mobile optimisé ===== */

.site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Tablette et mobile large */
@media (max-width: 992px) {
  .section {
    padding: clamp(3.25rem, 7vw, 4.5rem) 0;
  }

  .page-hero {
    margin-top: var(--site-header-h);
    padding: 2rem 0 1.75rem;
  }

  .page-hero h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .page-hero p {
    font-size: 0.95rem;
  }

  .hero__shape {
    display: none;
  }

  .hero__subtitle {
    max-width: none;
  }

  .hero__visual {
    width: 100%;
  }

  .hero__card {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    width: min(var(--container-max), 92%);
  }

  .section__header {
    margin-bottom: 2rem;
  }

  .section__header h2 {
    font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  }

  .section__header p {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: calc(var(--site-header-h) + 1.25rem) 0 4.5rem;
  }

  .hero__content {
    gap: 1.5rem;
  }

  .hero__text {
    text-align: center;
  }

  .hero__badge {
    font-size: 0.75rem;
    line-height: 1.35;
    margin-inline: auto;
    max-width: 100%;
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6.5vw, 2.15rem);
  }

  .hero__subtitle {
    font-size: 0.92rem;
    margin-bottom: 1.35rem;
    line-height: 1.55;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

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

  .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
  }

  .hero__stat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: 0.65rem 0.4rem;
    text-align: center;
  }

  .hero__stat strong {
    font-size: 1.2rem;
  }

  .hero__stat span {
    font-size: 0.62rem;
    line-height: 1.25;
    display: block;
  }

  .hero__card {
    padding: 1.25rem 1.15rem;
    text-align: left;
  }

  .hero__card-header {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .hero__card-header i {
    width: 40px;
    height: 40px;
  }

  .hero__card-list li {
    font-size: 0.88rem;
    padding: 0.5rem 0;
  }

  .hero__scroll {
    bottom: 1rem;
  }

  /* À propos */
  .about__grid {
    gap: 2rem;
  }

  .about__image {
    max-width: 300px;
    margin-inline: auto;
  }

  .about__experience {
    right: 0.25rem;
    bottom: 0;
    padding: 0.75rem 1rem;
  }

  .about__experience strong {
    font-size: 1.5rem;
  }

  .about__content h3 {
    font-size: 1.25rem;
    text-align: center;
  }

  .about__content {
    text-align: center;
  }

  .about__features {
    text-align: left;
  }

  /* Services */
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .service-card {
    padding: 1.15rem;
  }

  .service-card h3 {
    font-size: 1rem;
  }

  .service-card p {
    font-size: 0.85rem;
  }

  /* Mission */
  .mission-card {
    padding: 1.5rem 1.25rem;
  }

  /* Galerie */
  .gallery__filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.35rem;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }

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

  .gallery__filter {
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.45rem 0.8rem;
    white-space: nowrap;
  }

  .gallery__mosaic {
    gap: 0.85rem;
  }

  .gallery__card {
    border-radius: var(--radius);
  }

  .gallery__card-body {
    padding: 0.9rem 1rem;
  }

  .gallery__card-body h3 {
    font-size: 0.95rem;
  }

  .gallery__card-body p {
    font-size: 0.78rem;
    -webkit-line-clamp: 2;
  }

  .gallery__card-action {
    display: none;
  }

  .gallery__note {
    font-size: 0.82rem;
    padding: 0.85rem 1rem;
    margin-top: 1.5rem;
  }

  /* Témoignages */
  .testimonial {
    padding: 1.35rem 1.15rem;
  }

  .testimonial p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.15rem;
  }

  .testimonials__nav {
    gap: 0.85rem;
    margin-top: 1.25rem;
  }

  .testimonials__btn {
    width: 42px;
    height: 42px;
  }

  /* Connexion */
  .connect__box {
    padding: 1.5rem 1.15rem;
    gap: 1.25rem;
  }

  .connect__content h2 {
    font-size: 1.35rem;
  }

  /* Newsletter */
  .newsletter {
    padding: 2.5rem 0;
  }

  .newsletter__text h3 {
    font-size: 1.2rem;
  }

  /* Footer + WhatsApp */
  .footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .footer__bottom p {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .whatsapp-btn {
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    width: 52px;
    height: 52px;
    font-size: 1.55rem;
  }

  /* Lightbox */
  .lightbox__close {
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    right: 0.75rem;
    width: 44px;
    height: 44px;
  }

  .lightbox__content {
    padding: 3rem 1rem 2rem;
    max-height: 92dvh;
  }

  .lightbox__content img {
    max-height: 52vh;
  }

  .lightbox__content h4 {
    font-size: 1rem;
    margin-top: 0.75rem;
  }

  .lightbox__content p {
    font-size: 0.85rem;
  }
}

/* Petit mobile */
@media (max-width: 576px) {
  :root {
    --utility-h: 0px;
    --topbar-h: 3.85rem;
  }

  .utility-bar {
    display: none;
  }

  .topbar__brand .site-logo {
    width: 38px;
    height: 38px;
  }

  .topbar__brand-fallback {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.85rem;
  }

  .topbar__brand-text {
    font-size: 1.02rem;
  }

  .topbar__end {
    gap: 0.35rem;
  }

  .lang-picker__name,
  .lang-picker__iso {
    display: none;
  }

  .lang-picker__trigger {
    min-width: 2.35rem;
    padding: 0 0.45rem;
  }

  .lang-picker__value {
    gap: 0;
  }

  .topbar__toggle {
    width: 2.5rem;
    height: 2.5rem;
  }

  .topbar__shell {
    gap: 0.4rem 0.6rem;
  }

  .topbar__toggle {
    width: 2.65rem;
    height: 2.65rem;
    margin-right: 0.15rem;
  }

  .topbar__brand {
    flex: 1;
    min-width: 0;
  }

  .topbar__nav {
    width: min(100%, 320px);
    max-width: 88vw;
    left: 0;
    right: auto;
    border-radius: 0;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .hero__stats {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .hero__stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    padding: 0.6rem 0.85rem;
  }

  .hero__stat strong {
    font-size: 1.3rem;
  }

  .hero__stat span {
    font-size: 0.78rem;
    text-align: right;
    flex: 1;
  }

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

  .about__experience {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -1.5rem auto 1rem;
    display: table;
  }

  .section {
    padding: 3.25rem 0;
  }

  .faq__item summary {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }

  .faq__item p {
    font-size: 0.88rem;
    padding: 0 1rem 1rem;
  }

  .contact__form {
    padding: 1.15rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.45rem;
  }

  .hero__badge span {
    display: inline;
  }

  .gallery__card--large,
  .gallery__card--large img {
    min-height: 200px;
  }

  .gallery__card img {
    min-height: 160px;
  }

  .topbar__link {
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
  }
}
