* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.small {
    font-size: 10px;
}
.medium {
    font-size: 14px;
}
.margin_bottom_20 {
    margin-bottom: 20px;
}
.italic {
    font-style: italic;
}
.white {
    color: white;
}
.gray {
    color: gray;
}
.dark {
    color: #333;
}
.red {
    color: #b71c1c;
}
.indianred {
    color: indianred;
}
.red-alert {
    color: red;
}
.hr-red {
    border: 1px solid #952c28;
    height: 1px;
    margin-left: 25px;
    margin-right: 25px;
}
.separator {
    background-color: darkgray;
    height: 1.5px;
    border: none;
}
.bold {
    font-weight: bold;
}
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}

.for-captha {
    margin-top: 10px;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif;
    background-image: url("../pictures/bg_monaco.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* margin-top: 80px; */
    position: relative; /* Filter */
}

/* For Filter */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(220, 220, 220, 0.25); */
    background: rgba(220, 220, 220, 0.10);
    pointer-events: none; /* pour ne pas bloquer les clics */
    z-index: 1;
}

* {
    position: relative;
    z-index: 2; /* pour afficher le contenu au-dessus du filtre */
}



/* HEADER */
header {
    top: 0;
    position: fixed;
    width: 100%;
    padding: 50px;
    left: 0;
}

.left-aligned-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    left: 0;
    padding: 20px 120px;
}

header img.logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 25px;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.65);
    border-radius: 5px;
}

main {
    /*
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    */
}


.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6); /* assombrissement */
    backdrop-filter: blur(4px);   /* effet premium */
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 1;
    transition: opacity 0.4s ease;
}

.loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #b71c1c;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* GIF loader */
.loader-gif {
    width: 55px;          /* petite taille */
    height: auto;
    margin-bottom: 20px; /* espace si spinner visible */
}



/* FORM */
.form-container {
    margin-top: 80px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 150px;
    background-color: ghostwhite;
    width: 38%;
    overflow-y: auto;
    padding: 50px;
    border: 1px solid #ccc;
    border-radius: 18px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
    position: relative;
    transform-style: preserve-3d; /* Nécessaire pour la rotation 3D */
}

form {
    display: flex;
    flex-direction: column;
}

.form-container form {
    display: flex;
    flex-direction: column;
    gap: 0px;
    text-align: center;
}

.form-container h2 {
    text-align: center;
    font-size: 1.2rem;
    color: #333;
}

.form-container h3 {
    text-align: center;
    font-size: 1rem;
    color: dimgray;
}

/*
.form-container hr {
    border: 1px solid #952c28;
    height: 1px;
    margin-left: 25px;
    margin-right: 25px;
}
*/

label {
    font-size: 1rem;
    color: #333;
    display: block;
    margin: 20px 0 15px;
}

input[type="radio"] {
    margin-right: 5px;
}

.input-pair {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.input-pair input[type="text"], 
.input-pair input[type="email"], 
.input-pair input[type="tel"], 
.input-pair select {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid #ccc;
    background-color: rgba(255, 255, 255, 0.500);
}

input[type="text"], input[type="email"], input[type="tel"], select {
    background-color: rgba(255, 255, 255, 0.500);
    width: 80%;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 14px;
    color: #b71c1c;
    font-size: 0.9em;
    border: 1px solid #ccc;
    margin-top: 15px;
}

.large-textarea {
    background-color: rgba(255, 255, 255, 0.500);
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid #ccc;
    z-index: 5;
}

.cover-label {
    font-size: 1rem;
    margin-bottom: 12px;
    text-align: center;
    margin-top: -30px;
}

.book-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.book-image {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hide Default Button */
.book-image input[type="file"] {
    display: none;
    margin-top: 0;
}

.customFileButton {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #b71c1c;
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.8rem;
}

.customFileButton:hover {
    background-color: white;
    color: #952c28;
}

.book-image img {
    width: 80px;
    height: 118px;
    object-fit: cover;
    margin-bottom: 4.5px;
}

/* Resume */
.large-textarea {
    font-family: Arial, sans-serif;
    resize: vertical;
    min-height: 75px;

    background-color: rgba(255, 255, 255, 0.500);
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid #ccc;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.1rem;
    /* margin-top: 5px; */
    margin-bottom: 5px;
    flex: 1;
}
.exit {
    width: 100%;
    padding: 10px;
    background-color: #b71c1c;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.1rem;
    /* margin-top: 5px; */
    margin-bottom: 5px;
    flex: 1;
}

button:hover {
    background-color: #555;
}


button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

a.button {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    margin-top: 5.5px;
    margin-bottom: 5px;
}

a.button:hover {
    background-color: #555;
}

.error {
    color: red;
    font-size: 0.9rem;
}

@media (max-width: 768px) {

    .input-pair {
        flex-direction: column;
    }

    .form-container {
        background-color: rgba(255, 255, 255, 0.8);
        width: 100%;
        overflow-y: auto;
        padding: 35px;
        border: 1px solid #ccc;
        border-radius: 25px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1;
    }
}
