/**
 * Theme Name:        Kadence - Afrique du Sud - Arthésis
 * Template:          kadence
 * Description:       Surcharge Kadence
 * Version:           1.0.0
 * Author:            Arthésis
 * Author URI:        https://www.arthesis.com
 * Text Domain:       arthesis-afrique
 * Tested up to:      6.7
 * Requires at least: 6.7
 * Requires PHP:      7.4
 * License:           GNU General Public License v2.0 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 */

 /* Image en haut de la page de paiement */
#inner-wrap .slider.devis .bg-image {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hauteur adaptée sur mobile */
@media (max-width: 767px) {
    #inner-wrap .slider.devis .bg-image {
        height: 250px !important;
    }
}


/* ==========================================
   FORMULAIRE DE PAIEMENT
   ========================================== */

/* Zone autour du formulaire */
#inner-wrap .grey.form {
    padding: 60px 20px 80px;
}

/* Contenu centré */
#inner-wrap .grey.form .devis-form {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
}

/* Titre */
#inner-wrap .grey.form .devis-form > .header h1 {
    margin: 0 0 25px;
    color: #8a7d20;
    text-align: center;
    font-size: 32px;
}

/* Encadré, dans l'esprit du formulaire de devis */
#inner-wrap .grey.form .devis-form > .content {
    padding: 35px;
    background: #f3f7fa;
}

/* Texte d'introduction */
#inner-wrap .grey.form .devis-form > .content > p {
    margin: 0 0 10px;
}

/* Supprime l'espace vide créé par le paragraphe &nbsp; */
#inner-wrap .grey.form .devis-form > .content > p:nth-child(2) {
    display: none;
}

/* Champs en deux colonnes */
#inner-wrap #mainf {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 25px;
    margin-top: 25px;
}

/* Chaque ligne du formulaire */
#inner-wrap #mainf > .col-xs-12 {
    min-width: 0;
    width: 100%;
    padding: 0;
}

/* Libellés */
#inner-wrap #mainf label {
    display: block;
    margin: 0 0 6px;
    color: #303846;
    font-size: 15px;
    font-weight: 700;
}

/* Champs, liste et adresse */
#inner-wrap #mainf input:not([type="hidden"]):not([type="checkbox"]):not([type="submit"]),
#inner-wrap #mainf select,
#inner-wrap #mainf textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd2d8;
    border-radius: 3px;
    background-color: #fff;
    color: #303846;
    font: inherit;
}

/* Zone d'adresse */
#inner-wrap #mainf textarea {
    min-height: 100px;
    resize: vertical;
}

/* Champ actif */
#inner-wrap #mainf input:focus,
#inner-wrap #mainf select:focus,
#inner-wrap #mainf textarea:focus {
    outline: 2px solid rgba(138, 125, 32, 0.3);
    outline-offset: 1px;
    border-color: #8a7d20;
}

/* Textes d'aide */
#inner-wrap #mainf .help-block {
    display: block;
    margin-top: 5px;
    color: #66717b;
    font-size: 13px;
    line-height: 1.45;
}

/* Conditions générales et bouton sur toute la largeur */
#inner-wrap #mainf > .col-xs-12:has(input[name="CGV"]),
#inner-wrap #mainf > .col-xs-12:has(input[type="submit"]) {
    grid-column: 1 / -1;
}

/* Case CGV : conserve sa taille naturelle */
#inner-wrap #mainf input[type="checkbox"] {
    width: auto;
    margin: 0 6px 0 0;
    accent-color: #8a7d20;
}

/* Bouton */
#inner-wrap #mainf input[type="submit"] {
    display: inline-block;
    width: auto;
    padding: 13px 30px;
    border: 0;
    border-radius: 3px;
    background: #8a7d20;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#inner-wrap #mainf input[type="submit"]:hover,
#inner-wrap #mainf input[type="submit"]:focus-visible {
    background: #706519;
}

/* Formulaire de paiement sur téléphone */
@media screen and (max-width: 767px) {

    body #inner-wrap .grey.form {
        padding: 35px 15px 50px !important;
    }

    /* Encadré, dans l'esprit du formulaire de devis */
    #inner-wrap .grey.form .devis-form > .content {
        padding: 35px;
        background: #f3f7fa;
    }

    body #inner-wrap .grey.form .devis-form > .header h1 {
        font-size: 25px !important;
        line-height: 1.25;
    }

    body #inner-wrap .grey.form .devis-form > .content {
        padding: 22px 18px !important;
    }

    /* Une seule colonne pour tous les champs */
    body #inner-wrap #mainf {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    body #inner-wrap #mainf > .col-xs-12 {
        grid-column: 1 / -1;
        float: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    body #inner-wrap #mainf input[type="submit"] {
        width: 100% !important;
    }
}

/* Taille du logo PayGate sur la page de paiement */
#inner-wrap img[alt="logo_paygate"] {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    margin: 15px auto;
}
/* Paiement : adaptation des deux étapes sur mobile */
@media screen and (max-width: 767px) {
    #inner-wrap .grey.form .container,
    #inner-wrap .grey.form .devis-form,
    #inner-wrap .grey.form .devis-form > .content,
    #inner-wrap .grey.form #contenido {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Formulaire initial : une colonne, sans dépendre de la grille. */
    body #inner-wrap #mainf {
        display: block !important;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    body #inner-wrap #mainf > .col-xs-12 {
        display: block;
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 18px;
        padding: 0;
        box-sizing: border-box;
    }

    body #inner-wrap #mainf input:not([type="hidden"]):not([type="checkbox"]):not([type="submit"]),
    body #inner-wrap #mainf select,
    body #inner-wrap #mainf textarea {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
    }

    /* Récapitulatif PayGate : le tableau reste dans l'écran. */
    #inner-wrap .grey.form #contenido table {
        width: 100%;
        max-width: 100%;
        table-layout: fixed;
    }

    #inner-wrap .grey.form #contenido table td {
        overflow-wrap: anywhere;
        word-wrap: break-word;
    }

    #inner-wrap .grey.form #contenido input[type="submit"] {
        max-width: 100%;
        height: auto;
        white-space: normal;
        box-sizing: border-box;
    }
}
