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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", Arial, sans-serif;
    background: #111;
    color: #eee;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.highlights {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.highlight-item {
    background: rgba(212, 175, 55, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: transform 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-5px);
}

.highlight-item i {
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.highlight-item h3 {
    color: #d4af37;
    margin-bottom: 0.5rem;
}

/* تنسيق قسم دورات التكوين */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.formation-category {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 10px;
    border-right: 4px solid #d4af37;
    transition: transform 0.3s ease;
}

.formation-category:hover {
    transform: translateY(-3px);
}

.formation-category.highlight {
    background: rgba(212, 175, 55, 0.15);
    border: 2px solid #d4af37;
    grid-column: 1 / -1;
}

.formation-category h3 {
    color: #d4af37;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formation-category ul {
    list-style: none;
    padding: 0;
}

.formation-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
    position: relative;
    padding-right: 1rem;
}

.formation-category li:before {
    content: "✓";
    color: #d4af37;
    position: absolute;
    right: 0;
}

.formation-category li:last-child {
    border-bottom: none;
}

#join-us {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.1),
        rgba(26, 26, 26, 0.9)
    );
}

.join-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.join-text {
    flex: 2;
}

.join-image {
    flex: 1;
    text-align: center;
    color: #d4af37;
}

.join-text h3 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.join-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.join-text ul {
    list-style: none;
    margin-bottom: 2rem;
}

.join-text li {
    padding: 0.5rem 0;
    position: relative;
    padding-right: 1.5rem;
}

.join-text li:before {
    content: "•";
    color: #d4af37;
    position: absolute;
    right: 0;
    font-size: 1.2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #d4af37, #b8962f);
    color: #111;
}

.btn-secondary {
    background: transparent;
    color: #d4af37;
    border: 2px solid #d4af37;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.05);
}

/* تنسيق استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .highlights {
        flex-direction: column;
        align-items: center;
    }

    .highlight-item {
        width: 100%;
        max-width: 300px;
    }

    .join-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
    }

    .formations-grid {
        grid-template-columns: 1fr;
    }
}

.about-content {
    text-align: right;
    max-width: 800px;
    margin: 0 auto;
}

.about-paragraph {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.about-list {
    margin: 1rem 0;
    padding-right: 1.5rem;
}

.about-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.about-list li:before {
    content: "•";
    color: #d4af37;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: -1em;
}

.english-version {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.1);
    border-right: 3px solid #d4af37;
    border-radius: 5px;
}

.english-version h3 {
    color: #d4af37;
    margin-bottom: 1rem;
    text-align: center;
}

.english-version p {
    margin-bottom: 1rem;
    line-height: 1.6;
    direction: ltr;
    text-align: left;
}

/* HEADER */
.site-header {
    background: #1a1a1a;
    padding: 1.5rem;
    border-bottom: 2px solid #d4af37;
    text-align: center;
}

.site-header .logo img {
    max-width: 200px;
    margin-bottom: 0.5rem;
}

.site-header h1 {
    font-size: 2rem;
    color: #d4af37;
    margin-bottom: 0.3rem;
}

.site-header .tagline {
    font-size: 1.1rem;
    color: #bbb;
    letter-spacing: 0.5px;
}

/* NAVBAR */
.navbar {
    background: #1a1a1a;
    border-top: 2px solid #d4af37;
    border-bottom: 2px solid #d4af37;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
}

.navbar ul li a {
    text-decoration: none;
    color: #eee;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.navbar ul li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: #d4af37;
    transition: width 0.3s ease;
}

.navbar ul li a:hover {
    color: #d4af37;
}

.navbar ul li a:hover::after {
    width: 100%;
}

/* SECTIONS */
section {
    padding: 3rem 1rem;
    text-align: center;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* FORMULAIRE */
form {
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    background: #1a1a1a;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #333;
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

form label {
    display: block;
    margin-bottom: 5px;
    text-align: right;
    font-weight: bold;
    color: #d4af37;
}

form input,
form select {
    direction: rtl;
    text-align: right;
    padding: 0.8rem;
    border: 1px solid #444;
    border-radius: 8px;
    background: #222;
    color: #eee;
    outline: none;
    transition: border 0.3s;
}

form input:focus,
form select:focus {
    border: 1px solid #d4af37;
}

input:valid:not(:placeholder-shown) {
    border-color: #4caf50 !important;
}

input:invalid:not(:placeholder-shown) {
    border-color: #f44336 !important;
}

/* Messages d'erreur */
.error-message {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 3px;
    display: none;
}

/* BOUTON */
button {
    background: linear-gradient(45deg, #d4af37, #b8962f);
    color: #111;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

button:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* FOOTER */
footer {
    background: #1a1a1a;
    color: #aaa;
    text-align: center;
    padding: 1.5rem;
    border-top: 2px solid #d4af37;
    font-size: 0.9rem;
}

footer a {
    color: #d4af37;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.contact-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.contact-item i {
    color: #d4af37;
    font-size: 1.2rem;
    width: 20px;
}

.contact-item span {
    font-family: "Courier New", monospace;
    font-weight: bold;
}

/* Réseaux sociaux */
.social-links {
    margin: 15px 0;
}

.social-links a {
    display: inline-block;
    margin: 0 12px;
    font-size: 36px;
    color: #444;
    transition:
        transform 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

.social-links a:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.social-links a.facebook:hover {
    color: #1877f2;
    transform: scale(1.2);
}

.social-links a.whatsapp:hover {
    color: #25d366;
    transform: scale(1.2);
}

.social-links a.linkedin:hover {
    color: #0a66c2;
    transform: scale(1.2);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        gap: 1rem;
    }

    form {
        width: 95%;
        padding: 1.5rem;
    }

    .social-links a {
        font-size: 28px;
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .site-header h1 {
        font-size: 1.3rem;
    }

    .site-header .tagline {
        font-size: 0.9rem;
    }

    form {
        padding: 1rem;
        margin: 0.5rem;
    }

    .navbar ul {
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .navbar ul li a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #4caf50;
}
.toast.error {
    background: #f44336;
}
.toast.info {
    background: #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
