/**
Theme Name: Protecmo
Author: Gilles Fournat
Author URI: https://www.gillesfournat.com/
Description: Child Theme
Version: 1.1.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: protecmo
Template: astra
*/

/* ==================== FONTS ==================== */
@font-face {
    font-family: 'Avenir Next LT Pro';
    src: url('https://www.protecmo.com/fonts/AvenirNextLTPro-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Avenir Next LT Pro';
    src: url('https://www.protecmo.com/fonts/AvenirNextLTPro-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

body, h1, h2, h3, h4, h5, h6, p, ul, li {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==================== DECOR ==================== */
.title-decor, .title-decor-reverse {
    display: flex;
    justify-content: flex-start;
    gap: 20px!important;
    flex-wrap: nowrap;
    margin-top: 20px!important
}

.title-decor span {
    width: 160px;
    height: 24px;
    background-color:var(--ast-global-color-5);
    display: inline-block;
    flex-shrink: 0;
}

.title-decor-reverse span {
    width: 160px;
    height: 24px;
    background-color:var(--ast-global-color-4);
    display: inline-block;
    flex-shrink: 0;
}

.title-decor span:first-child, .title-decor-reverse span:first-child {
    background-color: var(--ast-global-color-1); /* orange */
}

@media (max-width: 768px) {
    .title-decor {
        gap: 10px !important;
    }

    .title-decor span,
    .title-decor-reverse span {
        width: 60px;
        height: 16px;
    }
}

#breadcrumbs {
    margin-bottom: 0
}
.ast-breadcrumbs-wrapper {
    margin-top: 1.4em
}

.ast-single-entry-banner {
    position: relative;
}

.ast-single-entry-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255,255,255,0.8);
    z-index: 1;
    pointer-events: none;
}

.ast-single-entry-banner > * {
    position: relative;
    z-index: 2;
}

.slider-logo .slider-content img {
    max-width: 200px;
}

/* ==================== CONTACT FORM 7 ==================== */
/* Conteneur deux colonnes */
.form-row.two-columns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Chaque colonne */
.form-row.two-columns .form-col {
    flex: 1;
    min-width: 200px; /* largeur minimale pour mobile */
}

/* Style général labels et champs */
.form-row label {
    display: block;
    margin-bottom: 5px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.form-row.rgpd {
    font-size: 14px;
    margin-top: 10px;
}

.form-submit {
    margin-top: 20px;
}


/* ==================== SINGLE PRODUIT ==================== */
.produit.ast-article-single {
    padding: 0!important
}

.post-type-archive-produit .sidebar-main aside, 
.single-produit .sidebar-main aside, 
.tax-categorie_produit .sidebar-main aside {
    padding: 0!important
}

.single-produit #primary {
    /*border: 1px solid var(--ast-global-color-0);*/
    padding: 20px;
    border-radius: var(--ast-border-radius);
    background: #fff;
}

.single-produit .produit-ligne2, .single-produit .produit-tabs, .single-produit .produit-video {
    margin-bottom: 50px
}

/* Ligne image + descriptions */
.single-produit .produit-ligne2 {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}
.single-produit .produit-col-gauche {
    flex: 0 0 300px;
}
.single-produit .produit-col-droite {
    flex: 1;
}

/* Descriptions */
.produit-description-courte {
    margin-bottom: 10px;
}
.produit-description-longue {
    margin-bottom: 15px;
}

/* Tabs */
.produit-tabs ul.ast-tabs {
    margin: 1.5rem 0 0 0 !important;
}
.produit-tabs .tab-content-wrapper {
    padding: 2.25em;
    background-color: var(--ast-global-color-4);
    border-top: 4px solid var(--ast-global-color-0);
}
.produit-tabs .tab-link {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    font-weight: 600;
    color: var(--ast-global-color-0);
    transition: background-color 0.3s;
}
.produit-tabs .tab-link.current {
    background-color: var(--ast-global-color-0);
    color: var(--ast-global-color-5);
}
.produit-tabs .tab-content {
    display: none;
}
.produit-tabs .tab-content.current {
    display: block;
}

/* Avantages list */
.avantages-list {
    list-style-type: disc;
    padding-left: 1em;
    margin: 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Ratio 16:9 */
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.produit-boutons{
    display:flex;
    justify-content:flex-start;
    gap:20px;
    margin-top:40px;
    flex-wrap:wrap;
}
.produit-boutons .ast-link-button {
    display: inline-flex;
    align-items: center;
    font-size: 0.83333333333333rem;
}

@media (max-width: 768px) {
    .produit-boutons{
        justify-content: center
    }
    .produit-tabs .tab-link {
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* ==================== ARCHIVE / TAXONOMY PRODUIT ==================== */
/* Grid */
.produit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 0;
    padding: 0;
}
.produit-grid > .wp-block-column {
    margin: 0 !important;
    padding: 0 !important;
}

/* 3 colonnes desktop */
@media (min-width: 1200px) {
    .produit-grid > .wp-block-column {
        flex: 0 0 calc(33.333% - 30px);
        max-width: calc(33.333% - 30px);
    }
}
/* 2 colonnes tablette */
@media (min-width: 600px) and (max-width: 1199px) {
    .produit-grid > .wp-block-column {
        flex: 0 0 calc(50% - 30px);
        max-width: calc(50% - 30px);
    }
}
/* 1 colonne mobile */
@media (max-width: 599px) {
    .produit-grid > .wp-block-column {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
@media (max-width: 921px) {

    .post-type-archive-produit .ast-container {
        display: flex !important;
        flex-direction: column !important;
    }

    .post-type-archive-produit #secondary {
        order: -1;
    }

    .post-type-archive-produit #primary {
        order: 2;
    }

}
/* Card */
.produit-card-wrapper {
    padding: 5px; /* espacement entre cartes */
    box-sizing: border-box;
}
.produit-card {
    background: #fff;
    border-radius: var(--ast-border-radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    box-sizing: border-box;
}
.produit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.produit-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image + overlay 16/9 */
.produit-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16/9 */
    overflow: hidden;
    border-radius: var(--ast-border-radius);
}
.produit-card-image-wrapper img.produit-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay description courte */
.produit-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.85));
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.produit-card-wrapper:hover .produit-card-overlay {
    opacity: 1;
}
.produit-card-overlay p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.25rem;
}

/* Titre card avec ellipsis */
.produit-card-title {
    padding: 14px 16px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Dashicon */
.widget-categories-cpt li a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget-categories-cpt li a .dashicons {
    line-height: 1;
}

/* Description catégorie */
.taxonomy-description {
    margin: 10px 0 25px;
    font-size: 1rem;
    color: var(--ast-body-color);
}

/* Reset padding Astra pour archive / taxonomy */
#primary .site-main, .produit-grid {
    padding: 0;
    margin: 0;
}

/* ===== Pagination Produits ===== */

.navigation.pagination {
    margin: 3rem 0;
    text-align: center;
}

.navigation.pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Hover */
.navigation.pagination a.page-numbers:hover {
    background-color: #f4f4f4;
    border-color: #ccc;
}

/* Page active */
.navigation.pagination .page-numbers.current {
    background-color: var(--ast-global-color-0);
    color: #fff;
    border-color: var(--ast-global-color-0);
}

/* Bouton suivant */
.navigation.pagination .page-numbers.next {
    padding: 0 16px;
}

/* Points */
.navigation.pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* ==================== GRID 4 IMAGES LANDSCAPE + PORTRAIT ==================== */
.grid-images .wp-block-image {
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-images img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.grid-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.grid-circles p {
  flex: 1 1 160px;   /* base = 120px */
  max-width: 180px;     
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0;
  padding: 1em!important;
  /*
  height: 16%;
  width: 16%
    */
}

.call-to-action {
    padding: 100px 0 50px 0;
    text-align: center
}

/* ==================== NOS SOLUTIONS / REALISATIONS ==================== */

.solution .hero {
    min-height: 334px;
    max-height: 434px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.solution h1 {
    text-transform: inherit
}

.solution h2:not(:first-child) {
    margin-top: 50px
}

.solutions-ligne-principale {
    display:flex; 
    flex-wrap:wrap; 
    gap:30px; 
    margin-bottom: 50px
}

.solutions-col-images {
    flex:0 0 30%;
    display:flex;
    flex-direction:column;
    gap:15px;
    align-items: center
}

@media (max-width: 768px) {
    .solution {
     padding: 0 20px!important;
    }    
  .solutions-ligne-principale {
    flex-direction: column;
  }

  .solutions-col-images {
    flex: 0 0 100%;
    width: 100%;
  }

  .solutions-col-images img {
    width: 100%;
    height: auto;
  }
}

.realisation-image-wrapper {
    position: relative;
    overflow: hidden;
}

.realisation-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.realisation-legende {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 12px;
    text-align: center;
    color: #fff;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

@media (max-width: 768px) {
    .solution-grid {
        grid-template-columns: 1fr;
    }
}

.solution-archive-header h1 {
    text-align: center
}

.solution-card {
    background: #fff;
    border-radius: var(--ast-border-radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 1.5rem!important
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.solution-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.solution-card-content {
    padding: 25px;
}

.solution-card-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.solution-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.solution-card-cta {
    font-weight: 600;
    font-size: 14px;
}
/* ==================== SINGLE SECTEUR ==================== */
/* Section hero pour archive secteur */
.secteur-archive-hero {
    position: relative;
    width: 100vw;           
    left: 50%;              
    margin-left: -50vw;     
    height: 334px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

/* Overlay blanc 75% */
.secteur-archive-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.75);
    z-index: 1;
}

.secteur-archive-hero-inner {
    position: relative;
    text-align: center;
    color: var(--ast-global-color-0);
    z-index: 2;
}

.secteur-archive-hero-title {
    font-size: 4.666666666666667rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.4em;
}

/* Reset padding pour le contenu */
.single-secteur #primary {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.single-secteurs-activite .hero-title, .secteur-contexte h1 {
    font-size: 2.5rem!important;
    font-weight: 600!important;
    line-height: 1.4em!important;
    color: var(--ast-global-color-0)!important;
}

/* ===== HERO ===== */
@media (max-width: 544px) {
  .secteur-archive-hero-title {
    font-size: 33px;
      line-height: 1.4em;
  }
}
.secteur-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    padding-top: 30px;
}

.hero-image-left,
.hero-image-right {
    flex: 1 1 25%;
}

.hero-image-left img,
.hero-image-right img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--ast-border-radius);
}

.hero-center {
    flex: 2 1 300px;
    max-width: 600px;
    text-align: center;
}

.hero-center .hero-picto {
    width: 40%;
}

.hero-center .hero-title {
    font-size: 2.5rem;
}

/* ===== BLOCS H2 / H3 ===== */
.single-secteur h2 {
    margin-top: 50px;
    margin-bottom: 20px;
    text-align: center;
}

.single-secteur h3 {
    margin-bottom: 15px;
}

/* ===== CONTEXTE ===== */
.secteur-contexte .description-contexte {
    margin-bottom: 40px;
    line-height: 1.6;
    font-size: 1rem;
}

/* ===== APPLICATIONS ===== */
.secteur-applications {
    margin-bottom: 50px;
}
.secteur-applications .applications-grid {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.application-col {
    flex: 1 1 300px;
}

.application-col ul {
    font-size: 1.1rem;
    line-height: 1.8;
    list-style: none; 
    padding-left: 1.5em;
}

.application-col ul li {
    position: relative;
    margin-bottom: 0.4em;
}

/* Bullet personnalisé */
.application-col ul li::before {
    content: '';
    position: absolute;
    left: -1.5em;
    top: 0.6em;
    width: 0.5em;
    height: 0.5em;
    background-color: #FF6A14;
    border-radius: 50%;
}

/* ===== SOLUTIONS TECHNIQUES ===== */
.secteur-solutions {
    margin-bottom: 50px;
}
.secteur-solutions .description-solutions {
    line-height: 1.6;
    font-size: 1rem;
}

/* ===== CAS CLIENT ===== */
.secteur-exemple {
    margin-bottom: 50px
}
.secteur-exemple .description-exemple,
.secteur-exemple .resultat {
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ===== AVANT / APRES ===== */
.secteur-avant-apres .avant-apres-ligne {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.secteur-avant-apres .avant-apres-ligne h3 {
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.secteur-avant-apres .avant-apres-ligne img {
    height: 350px;
    width: auto;
    border-radius: var(--ast-border-radius);
    object-fit: cover;
}

/* ===== POURQUOI PROTECMO ===== */
.secteur-pourquoi {
    margin-bottom: 50px;    
}
.secteur-pourquoi .texte-pourquoi {
    line-height: 1.6;
    font-size: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .secteur-hero {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-image-left,
    .hero-image-right,
    .hero-center {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .hero-center .hero-picto {
        width: 50%;
    }    

    .hero-center .hero-title {
        font-size: 2rem;
    }

    .applications-grid {
        flex-direction: column;
    }

    .avant-apres-row {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .hero-center .hero-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .secteur-avant-apres .avant-apres-ligne {
        flex-direction: column;
    }
    .secteur-avant-apres .avant-apres-item {
        flex: 1 1 100%;
        flex-direction: column;
    }
}

/* ==================== ARCHIVE SECTEUR ==================== */
/* Grid 2 colonnes */
.secteur-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

@media (max-width: 768px) {
    .secteur-grid {
        grid-template-columns: 1fr;
    }
}

.secteur-card {
    background: #fff;
    border-radius: var(--ast-border-radius);
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 1.5rem!important
}

.secteur-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.secteur-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.secteur-card-image-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.secteur-card-image-wrapper img.secteur-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.secteur-card-content {
    padding: 25px;
}

.secteur-card-title {
    font-size: 20px;
    margin-bottom: 15px;
}

.secteur-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.secteur-card-cta {
    font-weight: 600;
    font-size: 14px;
}
