/* General Body Styles */
body {
    background-color: #f8f9fa;
    color: #212529;
}

/* Header & Logo */
.container_logo {
    display: flex;
    align-items: center;
    padding: 10px 8%;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.container_logo .logo {
    width: 60px;
    height: 40px;
    background-repeat: no-repeat;
    background-size: contain;
}

.container_logo span {
    margin-left: 20px;
    font-size: 11px;
    color: #343a40;
}

/* Custom Row Override from User */
.row {
    /* --bs-gutter-x: 5.5rem; */
    --bs-gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--bs-gutter-y));
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: calc(-.5 * var(--bs-gutter-x));
}

/* Ensure full-width rows for banner */
.container-rows {
    width: 105vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-right: 0;
    margin-left: 0;
    --bs-gutter-x: 0; /* Removes left/right gutters for this specific row */
}

/* Banner */
.banniere_etud {
    background-image: url(../images/Groupe_3184.png);
        /* background-image: url('<?php echo get_template_directory_uri(); ?>/images/Groupe_3184.png'); */
    background-repeat: no-repeat;
    background-size: cover;
    height: 14vw; /* Fluid height based on viewport width */
    min-height: 100px; /* Minimum height for small screens */
    background-position: center center;
    z-index: -12;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Align content to the left */
    padding-left: 27%; /* Pushes text from the left */
}

/* Banner Text Styling */

.banniere_etud .banner-title{
    text-align: left;
        width: 700px;
}

.banniere_etud .banner-title  h1 {
    color: #2c3e50; /* A dark slate color */
    font-size: 2vw;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.banniere_etud .banner-title span {
    /* A golden yellow color */
    /* font-size: 1.2vw; */
    /* font-style: italic; */
                font-family: 'Great Vibes', cursive;
            font-size: 23px/35px;
            display: block;
            font-weight: bold;
            letter-spacing: 2px;
            margin-top: 5px;
            color: #FFBE02;
            letter-spacing: 4px;
}


/* Main Title */
#preinscri_etud h2.titre_pre {
    color: #010103;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 0;
    background: #fff;
    box-shadow: 0 0px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 15px 2rem; /* Default padding */
    border-top: none; /* Removes the line/space above the title */
    position: sticky; /* Make it sticky */
    top: 0; /* Stick to the top */
    z-index: 1000; /* Ensure it's above other content */
}

/* Form Styling */
#preinscri_etud .form-body {
    background-color: #fff;
    padding: 25px 25px 0 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

#preinscri_etud .informat_gener {
    color: #fff;
    background-color: #00417a;
    font-size: 1.25rem;
    padding: 12px 20px;
    text-transform: uppercase;
    font-weight: 500;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin: -25px -25px 25px -25px;
}

/* Form Elements */
#preinscri_etud .titre-info {
    font-size: 16px;
    color: #000;
    font-weight: 600;
    margin-bottom: 8px;
}

.required-field::after {
    content: "*";
    color: red;
    margin-left: 4px;
}
.required-field-ar::before {
    content: "*";
    color: red;
    margin-right: 4px;
}

#preinscri_etud .height-weight {
    height: 48px;
    border-radius: 30px;
}

.form-control, .form-select {
    background-color: #E6ECEE;
    border: 1px solid #ced4da;
}
.form-control:focus, .form-select:focus {
     background-color: #fff;
     border-color: #86b7fe;
     box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

.date-input-container {
    position: relative;
}
.date-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

/* Separator */
#preinscri_etud hr.hr_pres {
    background-color: #E6ECEE;
    height: 2px;
    border: none;
    margin: 2rem 0;
}

.avatar-column {
    margin-bottom: 20px;
}

/* Avatar Upload */
.avatar-upload {
    position: relative;
    max-width: 200px;
    margin: 0 auto;
}
.avatar-preview {
    width: 200px;
    height: 200px;
    position: relative;
    border-radius: 50%;
    border: 6px solid #e9ecef;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.avatar-preview > div {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
#imagePreview {
    background-image: url(../images/user_profile.jpg);
}
.avatar-edit {
    position: absolute;
    right: 2.5%;
    bottom: 2.5%;
    z-index: 1;
}
.avatar-edit input {
    display: none;
}
.avatar-edit .icon_avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #ced4da;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.avatar-edit .icon_avatar::before {
    content: '\f040'; /* FontAwesome Pencil Icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 16px;
    color: #00417a;
}
.avatar-edit .icon_avatar:hover {
    background: #f1f3f5;
}

/* Style for the avatar file format hint */
.avatar-column .form-group small {
    max-width: 200px; /* Match the avatar container width */
    margin-left: auto;
    margin-right: auto;
}


/* Submit Button */
.button-container {
    text-align: right;
    padding: 20px;
    margin-top: 30px;
    /* border-top: 1px solid #e9ecef; */
        box-shadow: 0 0px 8px rgba(0,0,0,0.1);
        margin-inline: -25px;
}

#preinscri_etud .bouton-stage {
    background-color: #00417a;
    border: none;
    text-transform: uppercase;
    border-radius: 50px;
    color: white;
    font-weight: 500;
    font-size: 16px;
    padding: 12px 35px;
    cursor: pointer;
    transition: background-color 0.3s;
}
#preinscri_etud .bouton-stage:hover {
    background-color: #00325f;
}

/* Hide number input spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* --- Responsive Design --- */

/* ADDED: Fix for medium-large screens to prevent title wrapping */
@media (max-width: 1384px) and (min-width: 1201px) {
    .banniere_etud .banner-title {
        width: 550px;
    }
}

@media (max-width: 1200px) {
    .banniere_etud {
        padding-left: 26%;
    }
    .banniere_etud .banner-title {
    text-align: left;
    width: 500px;
}
}

@media (max-width: 992px) {
    .container_logo, #preinscri_etud h2.titre_pre {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    .row {
        --bs-gutter-x: 2.5rem; /* Reduce gutter on medium screens */
    }
    .banniere_etud {
        padding-left: 26%;
    }
    .banniere_etud .banner-title h1 {
        font-size: 2vw;
    }
    .banniere_etud .banner-title span {
        font-size: 1.5vw;
    }
        .banniere_etud .banner-title {
        text-align: left;
        width: 350px;
    }

    /* Hides the title bar on tablet and mobile */
    #preinscri_etud h2.titre_pre {
        display: none;
    }
}

@media (max-width: 768px) {
    #preinscri_etud h2.titre_pre {
        font-size: 18px;
        text-align: center;
        justify-content: center;
    }
    .banniere_etud .banner-title {
        text-align: left;
        width: 300px;
    }
    .banniere_etud {
        padding-left: 26%;
    }
    .banniere_etud .banner-title h1 {
        font-size: 2vw;
    }
    .banniere_etud .banner-title span {
        font-size: 2vw;
    }

    #preinscri_etud .informat_gener {
        font-size: 1.1rem;
    }

    .avatar-preview {
        width: 160px;
        height: 160px;
    }

    .button-container {
        text-align: center;
    }
     .row {
        --bs-gutter-x: 1.5rem; /* Reduce gutter on small screens */
    }
        .avatar-edit {
    position: absolute;
    right: 20.5%;
    bottom: 2.5%;
    z-index: 1;
}
}

@media (max-width: 592px) {
    .banniere_etud {
        padding: 0 1rem;
        align-items: center;
        text-align: center;
        height: auto;
        min-height: 150px;
    }
     .banniere_etud .banner-title {
        text-align: center;
        width: 100%;
     }
    .banniere_etud .banner-title h1 {
        font-size: 1.3rem;
    }
    .banniere_etud .banner-title span {
        font-size: 0.9rem;
    }
}

/* --- Added for Title Alignment on Desktop --- */

/* For large screens (>= 992px) */
@media (min-width: 992px) {
    #preinscri_etud h2.titre_pre {
        padding-top: 15px;
        padding-bottom: 15px;
        padding-left: calc((100vw - 960px) / 2);
        padding-right: calc((100vw - 960px) / 2);
    }
}

/* For extra-large screens (>= 1200px) */
@media (min-width: 1200px) {
    #preinscri_etud h2.titre_pre {
        padding-left: calc((100vw - 1140px) / 2);
        padding-right: calc((100vw - 1140px) / 2);
    }
}

/* For extra-extra-large screens (>= 1400px) */
@media (min-width: 1400px) {
    #preinscri_etud h2.titre_pre {
        padding-left: calc((100vw - 1320px) / 2);
        padding-right: calc((100vw - 1320px) / 2);
    }
}

