/* =========================
   MOBILE VERSION
========================= */

.informations {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    line-height: 2.5rem;
    margin-bottom:4rem;
}

.informations h2 {
    margin-left: 0;
    margin-right: auto;
    padding-top:1rem;
}

.informations img {
    margin: 1.5rem 0;
}

.informations h5 {
    margin-bottom: 1.8rem;
    margin-top: 2.5rem;
}

.informations section {
    margin-bottom: 2rem;
}

.informations span {
    font-weight: bold;
}

.informations > section:first-of-type {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

.informations > section:first-of-type > article:first-of-type,
.informations > section:nth-of-type(2) article,
.informations > section:last-of-type article {
    margin-bottom: 2rem;
}

.informations > section:first-of-type > article:last-of-type,
.informations .card {
    background-color: #f8f8f8;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem 1.8rem;
    margin-bottom: 2rem;
}

.informations > section:first-of-type > article:first-of-type, .informations > p {
    background-color: rgba(241,90,34, 0.3);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border-radius: 6px;
    padding: 1.5rem 1.8rem;
    margin-left: 0;
}

.informations section img,
.informations section img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.informations .powder .boite {
    display:flex;
    flex-direction: column;
    flex-wrap: wrap;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 75rem;
    width: 70%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 1rem;
}

.modal-header h2 {
    margin-left: 0;
    margin-right: auto;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.3s ease;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-section-title {
    margin-left:0;
    margin-right: auto;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #bdc3c7;
}

.form-group:first-of-type .form-section-title {
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
.modal .modal-content .form-group #comment_asa {
    width: 100%;
    padding: 0.75rem 0;
    padding-left: .5rem;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    font-size:1.4rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #F8F8F8;
    box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
.modal .modal-content .form-group #comment_asa:focus {
    outline: none;
    border-color: #F15A22;
    box-shadow: 0 0 0 3px rgba(241, 90, 34, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: flex;
    flex-direction: column;
}

.form-row > div {
    width: 100%;
}

.form-row > div > .input_number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.form-actions > button {
    padding: 0.8rem 1.5rem;
    margin-top: 1rem;
    border-radius: 6px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Josefin Sans", sans-serif;
}

.btn-submit {
    background-color:rgba(11, 130, 147, 0.25);
    color:#0b8293;
    border: 2px solid rgba(11, 130, 147, 0);
    border-radius: 6px;
    font-weight: 700;
}

.btn-submit:hover {
    background-color: #FFFFFF;
    border: 2px solid rgba(11, 130, 147, 0.25);
    cursor: pointer;
}

.btn-cancel {
    background-color: #fcfcfc;
    color: #2c3e50;
    border: 2px solid #F8F8F8;
}

.btn-cancel:hover {
    background-color: #F8F8F8;
    border: 2px solid #F8F8F8;
    cursor: pointer;
}

.success-message {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid #c3e6cb;
}

.success-message.show {
    display: block;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

input.error,
select.error,
textarea.error {
    border-color: #e74c3c !important;
    background-color: #fadbd8;
}

input[type=checkbox] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    margin-top:1rem;
}

input[type=checkbox]:checked {
    border-color: #F15A22;
}

input[type=checkbox]:checked::after {
    content: "✔";
    color: #F15A22;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 1.8rem;
    font-weight: bold;
}

label.rgpd {
    font-size: 1.2rem;
    width: 95%;
}


/* =========================
   TABLET VERSION
========================= */

@media(min-width: 768px) and (max-width: 1023px) {
    .informations section article:nth-of-type(2) img,
    .informations section article:last-of-type img {
        display:block;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem;
    }

    .informations .powder .boite {
        display:flex;
        flex-direction: column;
        flex-wrap: wrap;
    }

    .modal-content {
        width: 85%;
    }

    .form-row {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
    }

    .form-row > div {
        width: 45%;
    }
}


/* =========================
   DESKTOP VERSION
========================= */

@media(min-width: 1024px) {
    .informations {
        width: 60%;
    }

    .informations > section:first-of-type > article {
        width: 43%;
    }

    .informations section {
        margin-bottom: 0;
    }

    .informations .powder > div,
    .informations .gel > div {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(4, auto);
        column-gap: 1.5rem;
    }
    
    .informations .powder > div > .powder-1,
    .informations .gel > div > .gel-1 {
        grid-column: 1/7;
        grid-row: 2/3;
    }

    .informations .powder > div > .powder-2,
    .informations .gel > div > .gel-2 {
        grid-column: 1/7;
        grid-row: 3/4;
    }

    .informations .powder > div > img,
    .informations .gel > div > img {
        grid-column: 1/7;
        grid-row: 1/2;
    }

    .informations .powder .boite {
        grid-column: 1/7;
        grid-row: 4/5;
        display: flex;
        flex-wrap: nowrap;
        align-items:center;
        flex-direction: row-reverse;
        gap: 1.5rem;
    }

    .informations .powder .boite img {
        width: 40%;
        height: auto;
        min-width: 35rem;
    }

    .informations .gel .boite {
        grid-column: 1/7;
        grid-row: 4/5;
    }

    .informations .powder .boite img,
    .informations .gel .boite img {
        width: 40%;
        height: auto;
    }

    .informations img {
        margin-top: 0;
    }

    .form-row {
        flex-direction: row;
        gap: 2rem;
        justify-content: space-between;
    }

    .form-row > div {
        flex: 1 1 calc(50% - 3rem);
        width: 45%;
    }
}


/* =========================
   BIG DESKTOP VERSION
========================= */
@media(min-width: 1440px) {
    .informations {
        width: 65%;
    }

    .informations .powder > div,
    .informations .gel > div {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(4, auto);
        column-gap: 1.5rem;
    }

    /* --- SECTION POUDRE --- */
    .informations .powder > div > .powder-1 {
        grid-column: span 3;
        grid-row: 1;
    }

    .informations .powder > div > img {
        grid-column: span 3;
        grid-row: 1;
    }

    .informations .powder > div > .powder-2 {
        grid-column: span 6;
        grid-row: 2;
    }

    .informations .powder .boite {
        grid-column: span 6;
        grid-row: 3;
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .informations .powder .boite img {
        width: 35%;
        height: auto;
    }

    /* --- SECTION GEL --- */
    .informations .gel > div > .gel-1 {
        grid-column: span 3;
        grid-row: 1;
    }

    .informations .gel > div > img {
        grid-column: span 3;
        grid-row: 1;
    }

    .informations .gel > div > .gel-2 {
        grid-column: 1/7;
        grid-row: 2/3;
    }

    .informations .gel .boite {
        grid-column: 1/7;
        grid-row: 3/4;
    }

    .form-row > div {
        width: 45%;
    }
}