/* ===== RESET GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

/* ===== BODY ===== */
body {
    background: #f1f5f9;
    padding: 20px;
}

/* ===== LOGO ===== */
.logo {
    width: 140px;
    display: block;
    margin: 0 auto 20px;
}

/* ===== WRAPPER CENTRÉ ===== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== CONTAINER ===== */
.container {
    background: #ffffff;
    max-width: 550px;
    width: 100%;
    border-radius: 18px;
    padding: 30px 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    text-align: center;
}

/* ===== HEADER ===== */
.header h1 {
    margin: 5px 0;
    color: #1c4d7a;
    font-family: 'Poppins', 'Cairo', sans-serif;
}

.header .fr {
    font-size: 22px;
    letter-spacing: 0.5px;
}

.header .ar {
    font-size: 24px;
    font-weight: bold;
}

/* ===== SUCCESS & ERROR BOX ===== */
.success-box,
.error-box {
    text-align: center; /* توسيط النصوص */
    margin: 20px auto;
    max-width: 500px;
    padding: 20px;
    border-radius: 12px;
}

.success-box {
    background: #e6f9f0;
    border: 1px solid #b7ebd1;
}

.success-box h3 {
    color: #1e8e5a;
    margin-bottom: 10px;
}

.error-box {
    background: #fdecea;
    border: 1px solid #f5c2c7;
    color: #842029;
}

/* ===== TEXTE MOTIVATION ===== */
.motivation {
    margin: 15px auto;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    text-align: center;
    max-width: 480px;
}

/* ===== BOUTON ===== */
.btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background: #007BFF;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #0056b3;
    transform: scale(1.03);
}

/* ===== FORMULAIRE ===== */
form {
    background: #fff;
    padding: 25px 20px;
    border-radius: 12px;
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ===== INPUT GROUP ===== */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 40px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    display: block;
}

/* Textarea */
.input-group textarea {
    min-height: 80px;
    resize: vertical;
}

/* Icons */
.input-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888;
    pointer-events: none;
}

/* Position icône selon la direction */
body[dir="rtl"] .input-group i { right: 12px; }
body[dir="ltr"] .input-group i { left: 12px; }

/* Texte dans les champs */
body[dir="rtl"] input,
body[dir="rtl"] textarea,
body[dir="rtl"] select {
    text-align: right;
}

body[dir="ltr"] input,
body[dir="ltr"] textarea,
body[dir="ltr"] select {
    text-align: left;
}

/* Focus */
input:focus,
textarea:focus,
select:focus {
    border-color: #007BFF;
    outline: none;
}

/* ===== LANG BUTTONS ===== */
.lang-toggle {
    text-align: center;
    margin-bottom: 20px;
}

.lang-toggle button {
    padding: 6px 15px;
    border-radius: 5px;
    border: 1px solid #007BFF;
    background: #fff;
    color: #007BFF;
    cursor: pointer;
    margin: 0 5px;
    transition: 0.3s;
}

.lang-toggle button.active {
    background: #007BFF;
    color: white;
}

/* ===== WELCOME CARD ===== */
.welcome-card {
    background: linear-gradient(135deg, #e0f7fa, #ffffff);
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    padding: 25px 20px;
    margin-bottom: 25px;
    max-width: 600px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.welcome-card h2 {
    color: #007BFF;
    font-size: 24px;
    margin-bottom: 12px;
    font-weight: bold;
}

.welcome-card p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }

    .header .fr {
        font-size: 18px;
    }

    .header .ar {
        font-size: 20px;
    }

    .motivation {
        font-size: 14px;
    }

    .welcome-card h2 {
        font-size: 20px;
    }

    .welcome-card p {
        font-size: 14px;
    }
}

/* ===== BOUTON ENVOYER ===== */
#submitBtn {
    display: block;             /* لجعل الزر كـ block element */
    margin: 20px auto 0 auto;   /* مركز أفقيًا مع 20px فاصلة من الأعلى */
    position: relative;
    padding: 15px 35px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #007BFF, #00c6ff);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    text-align: center;
}

#submitBtn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.15);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

#submitBtn:hover::before {
    top: -20%;
    left: -20%;
}

#submitBtn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    #submitBtn {
        font-size: 16px;
        padding: 12px 25px;
    }
}
