/*
Theme Name: FSE
Author: Winseo
Author URI: https://winseo.fr
Description: Thème agence pour le Full Site Editing
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: winseo
*/

/*
 * TABLE DES MATIÈRES
 * 1. BASE
 * 2. NAVIGATION
 * 3. TYPOGRAPHIE
 * 4. MÉDIAS
 * 5. COMPOSANTS
 *    5.1 Surtitre
 *    5.2 Bouton retour en haut
 *    5.3 Boutons (hover)
 *    5.4 City Cell
 *    5.5 Card clickable
 *    5.6 Google Badge
 *    5.7 Tableau
 * 6. COLONNES ÉGALE HAUTEUR
 * 7. FLUENT FORM
 * 8. WPCONSENT (Cookies)
 * 9. RESPONSIVE
 */


/* ===========================================
   1. BASE
   =========================================== */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

:target {
    scroll-margin-top: 130px;
}

.is-layout-constrained>.alignwide {
    width: 80vw;
}


/* ===========================================
   2. NAVIGATION
   =========================================== */

.current-menu-item {
    color: var(--wp--preset--color--primary);
}

.wp-block-navigation__responsive-container-content {
    row-gap: normal;
}


/* ===========================================
   3. TYPOGRAPHIE
   =========================================== */

.page-template-page-full-width strong:not(.page-template-page-full-width mark strong){
    color: var(--wp--preset--color--white);
}


/* ===========================================
   4. MÉDIAS
   =========================================== */

img:not(.wp-image-12045):not(.ti-star) {
    border-radius: 4px;
    filter: grayscale(35%) contrast(1.05) brightness(0.92) sepia(18%);
}

img:hover {
    filter: grayscale(0%) contrast(1.08) brightness(1);
}

.wp-block-gallery figcaption {
    position: relative !important;
    text-align: right !important;
    background-color: var(--wp--preset--color--secondary-3) !important;
}


/* ===========================================
   5. COMPOSANTS
   =========================================== */

/* --- 5.1 Surtitre --- */

.is-style-surtitre::before {
    content: "";
    display: inline-flex;
    width: 38px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

/* --- 5.2 Bouton retour en haut --- */

.win-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

/* --- 5.3 Boutons (hover) --- */

.is-style-alt:hover a,
.is-style-soft:hover a {
    background-color: var(--wp--preset--color--secondary-3) !important;
}

/* --- 5.4 City Cell --- */

.wp-block-group.is-style-city-cell {
    gap: var(--wp--preset--spacing--xxs);
    position: relative;
}

.city-arrow {
    color: var(--wp--preset--color--primary);
    font-size: 24px;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    right: var(--wp--preset--spacing--s);
}

/* --- 5.5 Card clickable --- */

.card-link {
    position: relative;
    transition: transform .3s linear;
}

.card-link a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: absolute;
    color: transparent;
    z-index: 999;
    font-size: 0;
}

.card-link:has(a:hover) {
    transform: translateY(-10px);
}

.card-link:has(a:hover) .is-style-city-cell {
    border-color: var(--wp--preset--color--primary);
}

/* --- 5.6 Google Badge --- */

.google-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--wp--preset--color--secondary-3);
    border: 1px solid var(--wp--preset--color--secondary-4);
    border-radius: var(--wp--preset--border-radius--rd-s);
    padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--s);
}

.google-score {
    font-family: var(--wp--preset--font-family--primary);
    font-size: var(--wp--preset--font-size--l);
    color: var(--wp--preset--color--white);
    line-height: 1;
}

.stars {
    color: var(--wp--preset--color--primary);
    font-size: 16px;
    letter-spacing: 2px;
}

.google-label {
    font-size: var(--wp--preset--font-size--xs);
    color: var(--wp--preset--color--gray);
    margin-top: 2px;
}

/* --- 5.7 Tableau --- */

.win-table {
    width: 100%;
    border-collapse: collapse;
}

.win-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--wp--preset--color--secondary-3);
    color: var(--wp--preset--color--primary);
    font-size: var(--wp--preset--spacing--xs);
    font-weight: 700;
    text-transform: uppercase;
}

.win-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--wp--preset--color--secondary-4);
    vertical-align: middle;
    line-height: 1.5;
}

.win-table td:first-child {
    color: var(--wp--preset--color--white);
    font-weight: 600;
    white-space: nowrap;
}


/* ===========================================
   6. COLONNES ÉGALE HAUTEUR
   =========================================== */

.wp-block-columns.is-style-equal-height .wp-block-column {
    display: flex;
    flex-direction: column;
}

.wp-block-columns.is-style-equal-height .wp-block-column>.wp-block-group {
    margin-top: auto;
    width: 100%;
}


/* ===========================================
   7. FLUENT FORM
   =========================================== */

/* Champs texte */

.fluentform input:not(input[type="radio"]):not(input[type="checkbox"]),
.fluentform textarea,
.fluentform select[name="dropdown"],
.wc-block-components-form .wc-block-components-text-input input[type=text],
.wc-block-components-form .wc-block-components-text-input input[type=tel] {
    padding: var(--wp--preset--spacing--xs);
    background-color: var(--wp--preset--color--black-005);
    border: none;
    font-family: var(--wp--preset--font-family--primary);
    font-weight: 700;
    font-size: var(--wp--preset--font-size--xs);
}

input:focus-visible,
textarea:focus-visible,
input:focus,
select:focus {
    outline: none !important;
    color: var(--wp--preset--color--black) !important;
    font-size: var(--wp--preset--font-size--xs);
}

input::placeholder,
textarea::placeholder,
.fluentform select[name="dropdown"],
.wc-block-components-form .wc-block-components-text-input label {
    color: var(--wp--preset--color--black) !important;
    font-size: var(--wp--preset--font-size--xs);
}

/* WooCommerce */

.wc-blocks-components-select .wc-blocks-components-select__select {
    background-color: var(--wp--preset--color--transparent);
    font-family: var(--wp--preset--font-family--primary);
    border: inherit;
    color: var(--wp--preset--color--black) !important;
}

.wc-blocks-components-select .wc-blocks-components-select__label,
.wc-block-components-form .wc-block-components-text-input input[type=email] {
    color: var(--wp--preset--color--black) !important;
}

.wc-block-components-form .wc-block-components-text-input input[type=email] {
    background-color: var(--wp--preset--color--white);
    border: inherit;
}

/* Checkbox */

.fluentform input[type="checkbox"] {
    appearance: none;
    margin: 0;
    font: inherit;
    color: var(--wp--preset--color--secondary);
    width: 1.15em;
    height: 1.15em;
    border: 2px solid var(--wp--preset--color--black);
    border-radius: 0.15em;
    transform: translateY(-4px);
    display: grid;
    place-content: center;
}

.fluentform input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--wp--preset--color--primary);
}

.fluentform input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.fluentform .ff-el-form-check>label {
    display: grid !important;
    grid-template-columns: 1em auto !important;
    gap: 0.8em;
}

/* Bouton submit */

.ff-btn-submit {
    font-family: var(--wp--preset--font-family--primary);
    background-color: var(--wp--preset--color--secondary);
    border-radius: var(--wp--custom--radius--l);
    border: none;
    color: var(--wp--preset--color--white);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 700;
    line-height: inherit;
    padding: 8px 24px 10px;
    text-decoration: none;
}

.ff-btn-submit:hover {
    background-color: var(--wp--preset--color--contrast-2);
    color: white;
    cursor: pointer;
}

/* Message de succès */

.ff-message-success {
    padding: 0 var(--wp--preset--spacing--s);
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--secondary);
    font-weight: 700;
    box-shadow: inherit;
}


/* ===========================================
   8. WPCONSENT (Cookies)
   =========================================== */

.wpconsent-iframe-placeholder-google-maps,
.wpconsent-iframe-placeholder-google-maps iframe {
    max-width: 100% !important;
}

.wpconsent-consent-floating-button {
    border-radius: 0 !important;
}

.wpconsent-cookie-policy {
    overflow-x: hidden;
}

.wpconsent-cookie-policy-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 1rem 0 2rem;
}

.wpconsent-cookie-policy-table th,
.wpconsent-cookie-policy-table td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #d9d9d9;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.wpconsent-cookie-policy-table th+th,
.wpconsent-cookie-policy-table td+td {
    border-left: 1px solid #d9d9d9;
}


/* ===========================================
   9. RESPONSIVE
   =========================================== */

@media (width < 1281px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (width > 1024px) {
    .hide-on-desktop {
        display: none !important;
    }
}

@media (width < 1025px) {
    .hero-rs {
        bottom: 14vh;
    }

    .hide-on-tablet {
        display: none !important;
    }

    .win-margin-mobile {
        padding-left: 10vw !important;
        padding-right: 10vw !important;
    }

    .win-center-mobile {
        text-align: center;
        margin: auto !important;
    }

    .win-reverse {
        -webkit-flex-direction: column-reverse;
        -ms-flex-direction: column-reverse;
        flex-direction: column-reverse;
        flex-wrap: nowrap !important;
    }

    .responsive-grid-2 {
        grid-template-columns: repeat(1, 1fr);
    }

    .delete-grid {
        display: flex !important;
        flex-direction: column;
    }
}

@media (width < 769px) {
    .hide-on-mobile {
        display: none !important;
    }

    .win-translateY-offset15,
    .win-translateY-offset40,
    .win-translateY-offset50 {
        transform: inherit;
    }

    .min-h-500 {
        min-height: 450px;
    }

    .city-arrow {
        display: none;
    }

    /* Colonnes égale hauteur : annulation sur mobile */
    .wp-block-columns.is-style-equal-height .wp-block-column>.wp-block-group {
        margin-top: 20px;
    }

    /* Tableau responsive */
    .win-table,
    .win-table thead,
    .win-table tbody,
    .win-table th,
    .win-table td,
    .win-table tr {
        display: block;
    }

    .win-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .win-table tr {
        margin-bottom: 20px;
        border: 2px solid var(--wp--preset--color--primary);
    }

    .win-table td {
        border: none;
        border-bottom: 1px solid var(--wp--preset--color--secondary-4);
        position: relative;
        min-height: 40px;
        text-align: right;
        padding-left: 45%;
    }

    .win-table td::before {
        position: absolute;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: var(--wp--preset--color--primary);
        content: attr(data-label);
        text-align: left;
    }
}

@media (width < 600px) {
    .responsive-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* WPConsent : tableau cookies en mobile */
@media (max-width: 782px) {
    .wpconsent-cookie-policy-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .wpconsent-cookie-policy-table tbody {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
}