/* ==========================================================
   assets/css/catalogue-product.css
   Version SAFE (ne casse pas le reste du thème)
   => TOUT est scoppé sous .amseva-product
   ========================================================== */

/* ----------------------------------------------------------
   Wrapper global de la page
   ---------------------------------------------------------- */
.amseva-product {
    padding: 5rem 0 2rem;
}

/* ----------------------------------------------------------
   Layout Section 1 (Galerie + Infos)
   ---------------------------------------------------------- */
.amseva-product .ap-hero__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .amseva-product .ap-hero__grid {
        grid-template-columns: 1.2fr 1fr;
    }
}

/* ✅ IMPORTANT: évite les explosions en CSS grid/flex */
.amseva-product .ap-hero__grid > * {
    min-width: 0;
}

@media (min-width: 992px) {
    .amseva-product .ap-info {
        padding-left: 1rem;
    }
}

@media (min-width: 1200px) {
    .amseva-product .ap-info {
        padding-left: 1.5rem;
    }
}

.amseva-product .ap-assurance {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background-color: #f2f2f2;
    padding: 1rem;
    border-radius: 10px;
}


.amseva-product .ap-assurance > .ap-assurance__item {
    width : 100%;
}

@media (min-width: 520px) {
    .amseva-product .ap-assurance > .ap-assurance__item {
        width : 47%;
    }
}

@media (min-width: 1200px) {
    .amseva-product .ap-assurance > .ap-assurance__item {
        width : 48%;
    }
}

.amseva-product .ap-assurance > .ap-assurance__item > .ap-assurance__icon {
    color: #041c45;
}

/* ----------------------------------------------------------
   Badge état
   ---------------------------------------------------------- */
.amseva-product .ap-badge {
    display: inline-flex;
    padding: .25rem .55rem;
    border-radius: 999px;
    background: #d1fae5;
    color: #065f46;
    font-weight: 700;
    font-size: .875rem;
}

/* ----------------------------------------------------------
   Titre + description courte
   ---------------------------------------------------------- */
.amseva-product .ap-title {
    font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
    margin: .5rem 0;
}

.amseva-product .ap-short {
    color: #374151;
}

/* ----------------------------------------------------------
   Formats (boutons)
   ---------------------------------------------------------- */
.amseva-product .ap-formats__label {
    margin: .75rem 0 .5rem;
    font-weight: 700;
}

.amseva-product .ap-formats__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.amseva-product .ap-format {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: .4rem .7rem;
    font-weight: 700;
    cursor: pointer;
}

.amseva-product .ap-format.is-active {
    background: #041c45;
    color: #fff;
    border-color: #041c45;
}

.amseva-product .ap-format:focus-visible {
    outline: 2px solid #041c45;
    outline-offset: 2px;
}

/* ----------------------------------------------------------
   Metrics / dimensions
   ---------------------------------------------------------- */
.amseva-product .ap-metrics {
    margin-top: 1rem;
}

.amseva-product .ap-metrics__title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: .5rem;
}

.amseva-product .ap-metrics__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

@media (max-width: 575px) {
    .amseva-product .ap-metrics__grid {
        grid-template-columns: 1fr;
    }
}

.amseva-product .ap-metric {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: .75rem;
}

.amseva-product .ap-metric span {
    display: block;
    font-size: .85rem;
    color: #6b7280;
}

.amseva-product .ap-metric strong {
    display: block;
    font-size: 1rem;
}

.amseva-product .ap-volume {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: .75rem 1rem;
    margin-top: .75rem;
}

/* ----------------------------------------------------------
   CTA + partage
   (⚠️ On scpe .ap-btn pour ne pas casser tes boutons globaux)
   ---------------------------------------------------------- */
.amseva-product .ap-cta {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

/* Boutons UNIQUEMENT sur la fiche produit */
.amseva-product .ap-btn {
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: .75rem 1rem;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
}

.amseva-product .ap-btn--primary {
    background: #041c45;
    color: #fff;
}

.amseva-product .ap-btn--ghost {
    background: #fff;
    border-color: #e5e7eb;
    color: #041c45;
}

.amseva-product .ap-share {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: .75rem;
    background: #fff;
}

.amseva-product .ap-share__link {
    display: block;
    width: 100%;
    text-align: left;
    padding: .5rem .6rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    margin-bottom: .5rem;
    color: #111827;
    text-decoration: none;
    cursor: pointer;
}

.amseva-product .ap-share__status {
    margin: .5rem 0 0;
    color: #6b7280;
    font-size: .9rem;
}

/* ----------------------------------------------------------
   Tabs (scopés)
   ---------------------------------------------------------- */
.amseva-product .ap-tabs {
    margin-top: 4rem;
}

.amseva-product .ap-tablist {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /*border: 1px solid #e5e7eb;
    border-radius: 12px;*/
    overflow: hidden;
}

/* ⚠️ Ne pas affecter des .ap-tab ailleurs */
.amseva-product .ap-tab {
    background: #f2f2f2;
    border: 0;
    padding: .75rem;
    font-weight: 800;
    cursor: pointer;
}

.amseva-product .ap-tab.is-active {
    background: #041c45;
    color: #ffffff;
}

.amseva-product .ap-tab:focus-visible {
    outline: 2px solid #041c45;
    outline-offset: -2px;
}

.amseva-product .ap-panel {
    /*border: 1px solid #e5e7eb;*/
    border-top: 0;
    border-radius: 0 0 12px 12px;
    padding: 2.5rem 1.5rem;
    background: #fff;
}

.amseva-product .ap-specs__title {
    margin-bottom: 2rem;
    color: #041c45;
}

/* Spécifications */
.amseva-product .ap-specs {
    display: grid;
    /*gap: .5rem;*/
}

.amseva-product .ap-spec {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem .75rem;
    /*border: 1px solid #e5e7eb;*/
    /*border-radius: 12px;*/
    background: #f9fafb;
}

.amseva-product .ap-spec:nth-child(odd) {
    background: #f2f2f2;
}

.amseva-product .ap-spec:nth-child(even) {
    background: #ffffff;
}

.amseva-product .ap-spec strong {
    text-align: right;
}

/* Avis */
.amseva-product .ap-reviews {
    display: grid;
    gap: 1rem;
}

.amseva-product .ap-review {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
}

.amseva-product .ap-review__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.amseva-product .ap-review__stars i {
    color: #f39501;
}

.amseva-product .ap-review__date {
    color: #6b7280;
    font-size: .9rem;
}

/* ==========================================================
   Swiper Galerie (SAFE + FIX width)
   ========================================================== */

/* ✅ IMPORTANT: bloquer largeurs absurdes + compat grid/flex */
.amseva-product .ap-gallery,
.amseva-product .ap-swiper-main,
.amseva-product .ap-swiper-thumbs,
.amseva-product .ap-gallery .swiper {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* Structure Swiper */
.amseva-product .ap-gallery .swiper {
    display: block;
    overflow: hidden;
}

/* Wrapper/slides contre bootstrap/flex */
.amseva-product .ap-gallery .swiper-wrapper,
.amseva-product .ap-gallery .swiper-slide {
    box-sizing: border-box;
}

.amseva-product .ap-gallery .swiper-slide {
    width: 100%;
    max-width: 100%;
}

/* Main */
.amseva-product .ap-swiper-main {
    border-radius: 16px;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

/* Image principale */
.amseva-product .ap-slide-img {
    width: 100%;
    height: 520px;
    object-fit: contain;
    display: block;
}

@media (max-width: 991px) {
    .amseva-product .ap-slide-img { height: 420px; }
}

@media (max-width: 575px) {
    .amseva-product .ap-slide-img { height: 320px; }
}

/* Thumbs */
.amseva-product .ap-swiper-thumbs {
    margin-top: 12px;
}

.amseva-product .ap-thumb-img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Dots */
.amseva-product .ap-swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
}

/* Placeholder */
.amseva-product .ap-gallery__placeholder {
    height: 520px;
    background: repeating-linear-gradient(
            45deg,
            #e5e7eb,
            #e5e7eb 10px,
            #f3f4f6 10px,
            #f3f4f6 20px
    );
}

@media (max-width: 991px) {
    .amseva-product .ap-gallery__placeholder { height: 420px; }
}

@media (max-width: 575px) {
    .amseva-product .ap-gallery__placeholder { height: 320px; }
}

/* ==========================================================
   Gravity Forms wrapper
   ========================================================== */
.ap-form { margin-top:2.5rem; }

.ap-form{
    --amseva-bg: #041c45;
    --amseva-accent: #f39501;
    --amseva-text: #111827;
    --amseva-muted: #374151;

    --amseva-border: rgba(17, 24, 39, .18);
    --amseva-field-bg: #ffffff;
    --amseva-form-bg: #e2f0ff;

    --amseva-radius: 14px;
    --amseva-radius-lg: 16px;
    --amseva-shadow: 0 10px 30px rgba(4, 28, 69, .10);
    --amseva-ring: 0 0 0 4px rgba(243, 149, 1, .22);

    background: var(--amseva-form-bg);
    color: var(--amseva-text);
    max-width: 860px;
    margin: 2.5rem auto;
    border-radius: 18px;
    padding: 30px 50px;
}

.gform_required_legend { display: none !important; }

/* ================= Form wrapper + BG ================= */
/*.ap-form #gform_2{
    max-width: 720px;
    margin: 0 auto;
    border-radius: 18px;
    padding: 30px 50px;
    color: var(--amseva-text);
}*/

/* ================= Layout compact ================= */
.ap-form #gform_2 .gform_fields{
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px 12px;
    margin: 0;
    padding: 0;
}

.ap-form #gform_2 .gfield{
    grid-column: 1 / -1;
    margin: 0;
    min-width: 0;
}

/* Half width responsive */
.ap-form #gform_2 .gfield--width-half{ grid-column: span 12; }
@media (min-width: 768px){
    .ap-form #gform_2 .gfield--width-half{ grid-column: span 6; }
}

/* ================= Sections : aucun espace + aucune bordure ================= */
.ap-form #gform_2 .gsection{
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    display: none;
}
.ap-form #gform_2 .gsection_title{
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--amseva-text);
}
.ap-form #gform_2 .gsection_description{
    margin: 0 0 6px;
    color: var(--amseva-muted);
    font-size: .92rem;
    line-height: 1.35;
}

/* ================= Labels / textes ================= */
.ap-form #gform_2 .gfield_label,
.ap-form #gform_2 .gform-field-label{
    display: inline-block;
    margin: 0 0 4px;
    font-weight: 800;
    color: var(--amseva-text);
    font-size: 0.9rem;
}

.ap-form #gform_2 .gfield_required_asterisk{
    /*color: var(--amseva-accent);*/
    font-weight: 900;
}

/* descriptions */
.ap-form #gform_2 .gfield_description{
    margin-top: 6px;
    color: var(--amseva-muted);
    font-size: .9rem;
    line-height: 1.35;
}

.ap-form #gform_2 .gfield_description.gfield_validation_message { color: var(--amseva-accent);}

/* ================= Inputs (compacts) ================= */
.ap-form #gform_2 input[type="text"],
.ap-form #gform_2 input[type="email"],
.ap-form #gform_2 input[type="tel"],
.ap-form #gform_2 select,
.ap-form #gform_2 textarea{
    width: 100%;
    background: var(--amseva-field-bg);
    border: 1px solid var(--amseva-border);
    border-radius: var(--amseva-radius);
    padding: 9px 12px;
    font-size: .98rem;
    line-height: 1.15;
    color: var(--amseva-text);
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ap-form #gform_2 textarea{
    height: 80px;
    resize: vertical;
}

.ap-form #gform_2 input:focus,
.ap-form #gform_2 select:focus,
.ap-form #gform_2 textarea:focus{
    outline: none;
    border-color: var(--amseva-accent);
    box-shadow: var(--amseva-ring);
}

.ap-form #gform_2 [disabled]{
    opacity: .6;
    cursor: not-allowed;
    background: rgba(255,255,255,.75);
}

/* ================= Fieldsets : cacher legend ================= */
.ap-form #gform_2 fieldset > legend{
    display: none !important;
}

.ap-form #gform_2 fieldset.date_form_must > legend,
.ap-form #gform_2 fieldset.subject_contact_must > legend{
    display: inline-block !important;
    margin: 0 0 4px;
    font-weight: 800;
    color: var(--amseva-text);
    font-size: .9rem;
}

/* ================= Radios (compacts + responsive) ================= */
.ap-form #gform_2 .gfield--type-radio .ginput_container_radio{
    margin-top: 6px;
}

.ap-form #gform_2 .gfield_radio{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 768px){
    .ap-form #gform_2 .gfield_radio{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (min-width: 992px){
    .ap-form #gform_2 .gfield--type-radio.gf_list_3col .gfield_radio{
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.ap-form #gform_2 .gchoice{
    display: flex;
    align-items: center;
    gap: 10px;
    /*padding: 10px 12px;
    border: 1px solid var(--amseva-border);
    border-radius: var(--amseva-radius-lg);
    background: #fff;*/
}

.ap-form #gform_2 .gfield-choice-input[type="radio"]{
    width: 16px;
    height: 16px;
    accent-color: var(--amseva-accent);
}

/* ================= Name field (compact + responsive) ================= */
.ap-form #gform_2 .ginput_container--name{
    display: grid;
    grid-template-columns: 1fr;
    gap: 2%;
}
@media (min-width: 768px){
    .ap-form #gform_2 .ginput_container--name{
        grid-template-columns: 49% 49%;
        align-items: end;
    }
}
.ap-form #gform_2 .ginput_container--name .gform-field-label--type-sub{
    margin: 0 0 4px;
    font-weight: 800;
    color: var(--amseva-text);
    font-size: .9rem;
}

/* ================= Consent : sans background ================= */
.ap-form #gform_2 .gfield--type-consent .ginput_container_consent{
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ap-form #gform_2 .gfield--type-consent input[type="checkbox"]{
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--amseva-accent);
}

.ap-form #gform_2 .gfield--type-consent .gfield_consent_label{
    margin: 0;
    font-weight: 800;
    color: var(--amseva-text);
    line-height: 1.35;
}

.ap-form #gform_2 .gfield_consent_description{
    margin-top: 6px;
    color: var(--amseva-muted);
    font-size: .9rem;
    line-height: 1.35;
}

/* ================= Honeypot ================= */
.ap-form #gform_2 .gfield--type-honeypot{
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ================= Footer / Submit (compact) ================= */
.ap-form #gform_2 .gform_footer{
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}

.ap-form #gform_2 input[type="submit"].gform_button{
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: var(--amseva-accent);
    color: #fff;
    font-weight: 900;
    padding: 10px 16px;
    cursor: pointer;
    box-shadow: var(--amseva-shadow);
}
@media (min-width: 576px){
    .ap-form #gform_2 input[type="submit"].gform_button{
        width: 350px;
    }
}
.ap-form #gform_2 input[type="submit"].gform_button:focus{
    outline: none;
    box-shadow: var(--amseva-ring), var(--amseva-shadow);
}

/* ================= Clean admin-only ================= */
.ap-form .admin-hidden-markup{ display: none !important; }
.ap-form #gform_2 .gform-ul-reset{ margin: 0; padding: 0; list-style: none; }

/* ========================================================================
   AJOUTS : DATE (field_1_22) / HEURE (field_1_12) / FICHIER (field_2_17)
   ======================================================================== */

/* ---------- DATE : 3 selects alignés en colonnes ---------- */
.ap-form #gform_2 #field_1_22 #input_1_22{
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
@media (min-width: 576px){
    .ap-form #gform_2 #field_1_22 #input_1_22{
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }
}

/* Rend les conteneurs date propres (évite styles GF inline) */
.ap-form #gform_2 #field_1_22 .ginput_container_date{
    min-width: 0;
}
.ap-form #gform_2 #field_1_22 .ginput_container_date select{
    width: 100%;
}

/* ---------- HEURE : select propre (field_1_12) ---------- */
.ap-form #gform_2 #field_1_12 .ginput_container_select{
    width: 100%;
}
.ap-form #gform_2 #field_1_12 select{
    width: 100%;
}

/* ---------- FICHIER : zone drop + bouton (field_2_17) ---------- */
.ap-form #gform_2 #field_2_17 .gform_drop_area{
    border: 2px dashed rgba(17, 24, 39, .22);
    border-radius: 16px;
    background: rgba(255,255,255,.55);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ap-form #gform_2 #field_2_17 .gform_drop_instructions{
    color: var(--amseva-muted);
    flex: 1 1 220px;
}

.ap-form #gform_2 #field_2_17 .gform_button_select_files{
    border-radius: 999px;
    border: 1px solid var(--amseva-border);
    background: #fff;
    color: var(--amseva-text);
    padding: 10px 14px;
    font-weight: 900;
    transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
    white-space: nowrap;
}

.ap-form #gform_2 #field_2_17 .gform_button_select_files:hover{
    transform: translateY(-1px);
}
.ap-form #gform_2 #field_2_17 .gform_button_select_files:focus{
    outline: none;
    border-color: var(--amseva-accent);
    box-shadow: var(--amseva-ring);
}

/* Règles + messages upload (si tu veux les garder discrets) */
.ap-form #gform_2 #field_2_17 .gform_fileupload_rules{
    margin-top: 8px;
    color: var(--amseva-muted);
    font-size: .9rem;
}
.ap-form #gform_2 #field_2_17 .ginput_preview_list{
    margin-top: 10px;
}

/* Optionnel : rendre le shim (input file invisible) non gênant */
.ap-form #gform_2 #field_2_17 .moxie-shim{
    pointer-events: none;
}

.ap-price {
    font-size: 2rem;
}

/* ==========================================================
   SHARE PANEL – aligned icons (Facebook / LinkedIn / X)
   ========================================================== */

.amseva-product .ap-share {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    flex-wrap: wrap; /* responsive mobile */
}

/* Bouton partage */
.amseva-product .ap-share__btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;

    padding: .4rem .75rem .4rem .4rem;
    border-radius: 999px;

    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #111827;

    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Hover */
.amseva-product .ap-share__btn:hover {
    background-color: #f9fafb;
}

/* Icône ronde */
.amseva-product .ap-share__btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border-radius: 50%;
    background-color: #041c45;
    color: #ffffff;

    font-size: .9rem;
    flex-shrink: 0;
}

/* Focus accessible */
.amseva-product .ap-share__btn:focus-visible {
    outline: 2px solid #041c45;
    outline-offset: 2px;
}

/* Texte */
.amseva-product .ap-share__btn span {
    line-height: 1;
}

/* Mobile : centrer si besoin */
@media (max-width: 480px) {
    .amseva-product .ap-share {
        justify-content: center;
    }
}

