/* ============================================================
   WEBCRAFT-SOLUTION — responsive.css
   Feuille de style responsive complémentaire à style.css
   Couvre : index.php, about.php, services.php, contact.php
   Breakpoints Bootstrap 5 :
     xs  : < 576px
     sm  : >= 576px
     md  : >= 768px
     lg  : >= 992px
     xl  : >= 1200px
     xxl : >= 1400px
   À charger APRÈS assets/css/style.css :
   <link rel="stylesheet" href="assets/css/responsive.css">
   ============================================================ */


/* ------------------------------------------------------------
   0. BASE MOBILE-FIRST (s'applique à tous les écrans, y compris
      les très petits, avant surcharge par les media queries)
   ------------------------------------------------------------ */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    font-size: 0.95rem;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Espacement vertical des sections réduit sur mobile */
section,
.py-5.py-lg-6 {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
}

/* Titres génériques */
.wc-hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
}

.wc-hero-subtitle {
    font-size: 0.92rem;
}

.wc-hero-note {
    font-size: 0.75rem;
}

.wc-section-title {
    font-size: 1.5rem;
    line-height: 1.3;
}

.wc-section-subtitle {
    font-size: 0.9rem;
}

.wc-eyebrow {
    font-size: 0.7rem;
}

/* Boutons pleine largeur empilés sur mobile */
.wc-hero .d-flex.flex-wrap.gap-3,
.wc-about-cta .d-flex {
    flex-direction: column;
    align-items: stretch;
}

.wc-hero .d-flex.flex-wrap.gap-3 .btn,
.wc-about-cta .d-flex .btn {
    width: 100%;
    text-align: center;
}

/* Hero : slider un peu moins « zoomé » sur mobile pour ménager les yeux */
.wc-hero {
    min-height: auto;
    padding: 3.5rem 0 3rem;
}

.wc-hero-slide img,
.wc-hero-slide video {
    animation-duration: 12s;
}

.wc-hero-dots {
    bottom: 0.85rem;
}

/* Logo plus compact sur mobile */
.wc-logo {
    height: 48px;
    width: auto;
}

/* Bloc sécurité (page accueil) */
.wc-security-card {
    padding: 1.25rem;
}

.wc-security-item {
    padding: 0.75rem;
}

.wc-security-item h3 {
    font-size: 0.82rem;
}

.wc-security-item p {
    font-size: 0.74rem;
}

/* Cartes domaines */
.wc-domain-image {
    height: 140px;
}

.wc-domain-body {
    padding: 1.25rem 1.25rem 1.1rem;
}

.wc-domain-body h3 {
    font-size: 1rem;
}

.wc-domain-body p,
.wc-domain-body li {
    font-size: 0.85rem;
}

/* Section deux colonnes + image */
.wc-two-cols-image-wrapper {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

/* Cartes superposées (over-card) : pas de chevauchement sur mobile */
.wc-over-card {
    padding: 1.25rem 1.25rem 1.5rem;
}

.wc-over-card-title {
    font-size: 1.05rem;
}

.wc-over-card-block h4 {
    font-size: 0.88rem;
}

.wc-over-card-block p {
    font-size: 0.8rem;
}

/* Bandeau compteurs : 2 colonnes sur mobile (déjà en g-4 / col-6) */
.wc-counter-strip {
    border-radius: 1.4rem;
    padding: 1.1rem 1rem;
}

.wc-counter-number {
    font-size: 1.4rem;
}

.wc-counter-label {
    font-size: 0.72rem;
}

/* Cartes vidéo : ratio plus court sur mobile pour éviter les écrans trop longs */
.wc-video-card-media {
    padding-top: 62%;
}

.wc-video-card-body {
    padding: 1.1rem 1.1rem 1.35rem;
}

.wc-video-card-body h3 {
    font-size: 0.98rem;
}

.wc-video-card-body p,
.wc-video-card-body li {
    font-size: 0.82rem;
}

.wc-btn-light-cta {
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* Cartes tarifs (pricing) */
.wc-pricing-card {
    padding: 1.15rem 1.1rem 1.3rem;
}

.wc-pricing-card h3 {
    font-size: 0.95rem;
}

.wc-pricing-amount {
    font-size: 0.85rem;
}

.wc-pricing-card li {
    font-size: 0.78rem;
}

/* Hero À propos */
.wc-about-title {
    font-size: 1.55rem;
}

.wc-about-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem 0.9rem;
    gap: 0.85rem;
}

.wc-about-stat-number {
    font-size: 1.4rem;
}

.wc-about-stat-label {
    font-size: 0.78rem;
}

/* Mission / Vision */
.wc-mission-visual {
    padding: 1.75rem 1.4rem;
    margin-top: 1.5rem;
}

.wc-vision-quote {
    font-size: 0.95rem;
    padding: 0.9rem 1.1rem;
}

/* Présence / Valeurs / Secteurs / Pourquoi nous */
.wc-presence-card,
.wc-sector-chip {
    padding: 1.4rem 1.25rem;
}

.wc-value-card {
    padding: 1.4rem 1rem;
}

.wc-value-icon {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
}

.wc-why-item {
    gap: 0.85rem;
}

.wc-why-icon {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
}

.wc-why-item h3 {
    font-size: 0.92rem;
}

.wc-why-item p {
    font-size: 0.8rem;
}

.wc-about-cta h2 {
    font-size: 1.5rem;
}

.wc-about-cta p {
    font-size: 0.9rem;
}

/* Page contact */
.wc-contact-card {
    padding: 1.4rem 1.2rem;
    margin-top: 1.5rem;
}

.wc-contact-highlights li {
    font-size: 0.82rem;
}

/* Drapeaux Afrique centrale : 3 par ligne sur très petit écran */
.wc-flags-central-africa .row.g-2 > div {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

.wc-flag-img,
.wc-flag-images {
    max-width: 40px;
}

.wc-flag-label {
    font-size: 0.62rem;
}

/* Footer */
.wc-footer {
    text-align: center;
    padding-top: 2rem;
}

.wc-footer h5,
.wc-footer h6 {
    margin-top: 1.25rem;
}


/* ------------------------------------------------------------
   1. >= 576px (sm) — petits mobiles en paysage / phablettes
   ------------------------------------------------------------ */
@media (min-width: 576px) {

    .wc-hero-title {
        font-size: 2rem;
    }

    .wc-section-title {
        font-size: 1.75rem;
    }

    .wc-hero .d-flex.flex-wrap.gap-3,
    .wc-about-cta .d-flex {
        flex-direction: row;
        align-items: center;
    }

    .wc-hero .d-flex.flex-wrap.gap-3 .btn,
    .wc-about-cta .d-flex .btn {
        width: auto;
    }

    .wc-domain-image {
        height: 155px;
    }

    .wc-about-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wc-flags-central-africa .row.g-2 > div {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .wc-video-card-media {
        padding-top: 58%;
    }

    .wc-btn-light-cta {
        width: auto;
    }

    .wc-footer {
        text-align: left;
    }
}


/* ------------------------------------------------------------
   2. >= 768px (md) — tablettes
   ------------------------------------------------------------ */
@media (min-width: 768px) {

    body {
        font-size: 1rem;
    }

    section,
    .py-5.py-lg-6 {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    .wc-hero-title {
        font-size: 2.35rem;
    }

    .wc-hero-subtitle {
        font-size: 1rem;
    }

    .wc-section-title {
        font-size: 2rem;
    }

    .wc-section-subtitle {
        font-size: 0.95rem;
    }

    .wc-logo {
        height: 64px;
    }

    .wc-security-card {
        padding: 1.5rem;
    }

    .wc-domain-image {
        height: 165px;
    }

    .wc-domain-body h3 {
        font-size: 1.05rem;
    }

    .wc-over-card-title {
        font-size: 1.15rem;
    }

    .wc-counter-number {
        font-size: 1.6rem;
    }

    .wc-video-card-media {
        padding-top: 65%;
    }

    .wc-about-title {
        font-size: 1.85rem;
    }

    .wc-about-stat-number {
        font-size: 1.55rem;
    }

    .wc-mission-visual {
        padding: 2.2rem 1.8rem;
        margin-top: 0;
    }

    .wc-contact-card {
        margin-top: 0;
    }

    .wc-flags-central-africa .row.g-2 > div {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .wc-about-cta h2 {
        font-size: 1.75rem;
    }
}


/* ------------------------------------------------------------
   3. >= 992px (lg) — petits écrans de bureau / desktop
   ------------------------------------------------------------ */
@media (min-width: 992px) {

    section,
    .py-5.py-lg-6 {
        padding-top: 4.5rem !important;
        padding-bottom: 4.5rem !important;
    }

    .wc-hero {
        min-height: calc(100vh - 120px);
    }

    .wc-hero-title {
        font-size: 3rem;
    }

    .wc-section-title {
        font-size: 2.1rem;
    }

    .wc-logo {
        height: 100px;
    }

    /* Chevauchement des cartes "over-card" réactivé uniquement à partir du desktop */
    .wc-over-card-left {
        margin-right: -24px;
    }

    .wc-over-card-right {
        margin-left: -24px;
    }

    .wc-domain-image {
        height: 160px;
    }

    .wc-video-card-media {
        padding-top: 70%;
    }

    .wc-btn-light-cta {
        display: inline-block;
        width: auto;
    }

    .wc-about-title {
        font-size: 2rem;
    }

    .wc-about-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wc-mission-list li,
    .wc-mission-text,
    .wc-vision-text {
        font-size: 1rem;
    }

    .wc-why-item {
        gap: 1rem;
    }

    .wc-about-cta h2 {
        font-size: 1.9rem;
    }
}


/* ------------------------------------------------------------
   4. >= 1200px (xl) — grands écrans
   ------------------------------------------------------------ */
@media (min-width: 1200px) {

    .container {
        max-width: 1140px;
    }

    .wc-hero-title {
        font-size: 3.15rem;
    }

    .wc-section-title {
        font-size: 2.25rem;
    }

    .wc-domain-image {
        height: 170px;
    }

    .wc-video-card-media {
        padding-top: 68%;
    }

    .wc-mission-visual {
        padding: 2.6rem 2.2rem;
    }
}


/* ------------------------------------------------------------
   5. >= 1400px (xxl) — très grands écrans
   ------------------------------------------------------------ */
@media (min-width: 1400px) {

    .container {
        max-width: 1280px;
    }

    .wc-hero-title {
        font-size: 3.3rem;
    }

    .wc-section-title {
        font-size: 2.4rem;
    }

    .wc-domain-image {
        height: 180px;
    }
}


/* ------------------------------------------------------------
   6. Très petits écrans (< 400px) — anciens smartphones
   ------------------------------------------------------------ */
@media (max-width: 399.98px) {

    .wc-hero-title {
        font-size: 1.5rem;
    }

    .wc-section-title {
        font-size: 1.3rem;
    }

    .wc-about-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        padding: 0.85rem 0.75rem;
    }

    .wc-about-stat-number {
        font-size: 1.2rem;
    }

    .wc-flags-central-africa .row.g-2 > div {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .wc-counter-strip .row.g-4 > div {
        flex: 0 0 50%;
        max-width: 50%;
    }
}


/* ------------------------------------------------------------
   7. Confort tactile — écrans tactiles (téléphones/tablettes)
   ------------------------------------------------------------ */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .wc-link-primary,
    .navbar-nav .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .wc-domain-card:hover,
    .wc-video-card:hover,
    .wc-pricing-card:hover,
    .wc-presence-card:hover,
    .wc-sector-chip:hover {
        transform: none;
    }
}


/* ------------------------------------------------------------
   8. Orientation paysage sur mobile (hauteur réduite)
   ------------------------------------------------------------ */
@media (max-width: 991.98px) and (orientation: landscape) {

    .wc-hero {
        min-height: auto;
        padding: 2.5rem 0;
    }

    section,
    .py-5.py-lg-6 {
        padding-top: 2.25rem !important;
        padding-bottom: 2.25rem !important;
    }
}



/* ------------------------------------------------------------
   9. Impression (utile pour devis / conditions imprimées)
   ------------------------------------------------------------ */
@media print {

    .wc-topbar,
    .wc-navbar,
    .wc-nav-overlay,
    .wc-video-cards-section video,
    .wc-footer,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000000;
    }

    .wc-section-title,
    .wc-hero-title {
        color: #000000 !important;
    }
}

/* ============================================================
   CORRECTIF RESPONSIVE GLOBAL — WEBCRAFT SOLUTION
   ============================================================ */

/* Empêche les éléments de créer une largeur supplémentaire */
html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
}

/* Correction du modèle de dimensionnement */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Les lignes Bootstrap ne doivent pas dépasser le container */
.row {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Évite les débordements des colonnes */
[class*="col-"] {
    min-width: 0;
    max-width: 100%;
}

/* Les containers restent toujours dans la largeur disponible */
.container,
.container-fluid {
    width: 100%;
    max-width: 100%;
}

/* Médias réellement responsifs */
img,
video,
iframe,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Les textes longs ne doivent pas élargir la page */
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
a,
span {
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

/* Les boutons ne doivent jamais dépasser leur parent */
.btn,
button,
input[type="submit"],
input[type="button"] {
    max-width: 100%;
    white-space: normal;
}

/* Correction des liens et boutons sur mobile */
a,
button,
.btn {
    position: relative;
    z-index: 20;
    pointer-events: auto;
    touch-action: manipulation;
}

/* Le contenu du hero doit rester cliquable */
.wc-hero-content,
.wc-hero-content a,
.wc-hero-content button {
    position: relative;
    z-index: 30;
}

/* L'arrière-plan du hero ne doit pas bloquer les clics */
.wc-hero-slider,
.wc-hero-overlay {
    pointer-events: none;
}

/* Correction des sections avec éléments positionnés */
.wc-hero,
.wc-domains,
.wc-section-two-cols,
.wc-overlapping-cards,
.wc-video-cards-section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Les images des cartes ne doivent jamais agrandir leur parent */
.wc-domain-image,
.wc-video-card-media,
.wc-two-cols-image-wrapper,
.wc-over-card-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.wc-domain-image img,
.wc-video-card-media video,
.wc-over-card-image img,
.wc-two-cols-image {
    width: 100%;
    max-width: 100%;
    object-fit: cover;
}

/* Annulation des chevauchements sur mobile */
@media (max-width: 991.98px) {
    .wc-over-card-left,
    .wc-over-card-right {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .wc-over-card {
        width: 100%;
        max-width: 100%;
    }
}

/* Téléphones */
@media (max-width: 575.98px) {
    .container {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }

    .wc-hero-content {
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .wc-hero-title {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
        line-height: 1.25;
    }

    .wc-hero-subtitle,
    .wc-section-subtitle {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .wc-hero .btn,
    .wc-about-cta .btn,
    .wc-hero-content .btn {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
        text-align: center;
    }

    .wc-security-card,
    .wc-domain-card,
    .wc-video-card,
    .wc-over-card,
    .wc-contact-card {
        width: 100%;
        max-width: 100%;
    }

    .wc-security-item {
        min-width: 0;
        overflow: hidden;
    }

    .wc-security-item p,
    .wc-domain-body p,
    .wc-domain-body li,
    .wc-video-card-body p,
    .wc-video-card-body li {
        overflow-wrap: anywhere;
    }
}

/* Très petits téléphones */
@media (max-width: 399.98px) {
    .container {
        padding-left: 0.7rem !important;
        padding-right: 0.7rem !important;
    }

    .wc-hero-title {
        font-size: 1.4rem;
    }

    .wc-section-title {
        font-size: 1.25rem;
    }

    .wc-security-item {
        padding: 0.6rem;
    }

    .wc-security-item h3 {
        font-size: 0.75rem;
    }

    .wc-security-item p {
        font-size: 0.68rem;
    }
}
