@import url(imp_form-theme.css);
@import url(imp_form-captcha.css);
@import url(imp_pxo-message.css);


.sav-shipping-for-sender {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: fit-content;
    margin: auto;
}
.sav-shipping-for-sender i.fa {
    color: grey;
    text-align: center;
}

@media (min-width: 600px) {
    .sav-shipping-for-sender {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        width: auto;
    }
}



/**
 * ========================================================
 * Les cartes des 3 étapes d'une retour SAV
 * ========================================================
 */

.sav-3-steps,
.sav-3-steps li {
    flex-direction: column;
}

.sav-3-steps {
    display: flex;
    margin: 100px auto;
    max-width: 400px;
    counter-reset: li;
}

.sav-3-steps li {
    flex: 1;
    display: flex;
    align-content: center;
}

.sav-3-steps__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 25px;
    overflow: hidden;
    border: #11baec solid 2px;
    border-radius: 20px;
}

.sav-3-steps__card:before {
    counter-increment: li;
    content: counter(li);
    display: block;
    width: 100%;
    font-size: 2.2em;
    font-weight: bold;
    line-height: 1.22;
    text-align: center;
    color: white;
    background-color: #11baec;
}

.sav-3-steps__card span {
    text-align: center;
    margin: 20px 0;
}

.sav-3-steps__card img {
    max-width: 100%;
    height: auto;
}

.sav-3-steps__arrow {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 27px;
    margin-bottom: calc(25px + 2px); /* .sav-3-steps__card padding-bottom + border-bottom */
    transform: rotate(90deg);
}

.sav-3-steps__arrow img {
    width: 60px;
    height: 60px;
}

@media (min-width: 1280px) {
    .sav-3-steps,
    .sav-3-steps li {
        flex-direction: row;
    }

    .sav-3-steps {
        max-width: none;
    }    

    .sav-3-steps li {
        align-items: flex-end;
    }

    .sav-3-steps li:last-child {
        flex: 0 0 330px; /* flex-basis = .sav-3-steps__card width */
    }
    
    .sav-3-steps__card {
        width: 330px;
    }

    .sav-3-steps__arrow {
        height: 120px;
        transform: unset;
    }
}



/**
 * =======================================================
 * Formulaire demande de retour SAV
 * =======================================================
 */

.form-sav-return h4 {
    margin-top: 0;
    font-size: 1.1em;
}

.form-sav-return h4 span {
    display: inline-block;
}

.form-sav-return h4 span:last-child {
    border-bottom: #11baec solid 4px;
}

.form-sav-return input,
.form-sav-return label {
    display: block;
}

/* Labels avec une description */
/* .form-sav-return label span {
    display: block;
    max-width: 300px;
    font-size: 0.8em;
    font-weight: 500;
    color: #11baec;
} */

.form-sav-return {
    display: grid;
    grid-template-columns: min-content auto; /* 2 colonnes : inputs | labels */
    grid-template-rows: auto auto auto;  /* 3 lignes de hauteur automatique */
    gap: 25px 0;
    margin-top: 12px;
}

.form-sav-return > input[type="radio"] {
    grid-column: 1;  /* Placer les inputs dans la première colonne */
}

.form-sav-return > label {
    grid-column: 2;  /* Placer les labels dans la deuxième colonne */
    margin: 0;
}

/* Bloc des règles dans la troisième ligne */
.form-sav-return__rules {
    grid-column: 1 / span 2; /* Fusionner les 2 colones */
    grid-row: 3;
}

.form-sav-return__rules article p {
    font-size: 0.9em;
}

@media (min-width: 1280px) {

    form label {
        font-size: unset;
    }

    .form-sav-return {
        grid-template-columns: min-content auto 1fr;  /* 3 colonnes : inputs | labels | règles */
        gap: 53px 0;
    }
        
    /* Bloc des règles dans la troisième colonne */
    .form-sav-return__rules {
        grid-column: 3;
        grid-row: 1 / span 3;  /* Fusionner les 3 lignes dans la troisième colonne */
        margin-left: auto;
        margin-right: 25px;
        max-width: 670px;
        min-height: 245px;
    }
}


/**
 * Règle de retour "placeholder" par défaut (3ème colonne)
 */

.form-sav-return__rules article:first-child p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-style: italic;
    letter-spacing: 0.03em;
}

.form-sav-return__rules article:first-child p:before {
    content: '\f05a';
    font-family: 'FontAwesome';
    font-size: 2.5em;
    font-style: normal;
    letter-spacing: unset;
}

.form-sav-return__rules article:first-child p:after {
    content: '';
    width: 50%;
}


/**
 * Règles de retour affichées par l'utilisateur
 */

/* Cache les règles au chargement de la page, sauf celle par défaut (le première <article>) */
.form-sav-return__rules article:not(:first-child) {
    display: none;
}

/* Cache la règle "placeholder" par défaut quand l'utilisateur clique sur un input Radio */
input[id^="radio-pdt"]:checked ~ .form-sav-return__rules article:first-child {
    display: none;
}

/* Affichage de la règle sélectionnée par l'utilisateur */
#radio-pdt-new:checked ~ .form-sav-return__rules [data-state="rule-pdt-new"],
#radio-pdt-used:checked ~ .form-sav-return__rules [data-state="rule-pdt-used"] {
    display: block;  /* Afficher la règle correspondante */
}


/**
 * textarea du message optionnel
 */

.form-sav-message {
    margin-bottom: 15px;
    min-height: 175px;
    max-height: 175px;
    resize: none;
    font-size: 0.9em;
}

.form-sav-message::placeholder {
    font-size: 0.9rem;
}


/**
 * Adresse de retour du colis
 */

.form-sav-address {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-top: 10px
}

.form-sav-address address {
    font-size: 1.1em;
    font-style: normal;
    letter-spacing: 0.03em;
}