body {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 0;
    background-color: #f4f4f4;
}

nav {
    margin-bottom: 20px;
}

h1 {
    color: #0066cc;
}

.thank-you {
    text-align: center;
    margin-top: 50px;
}

.thank-you h1 {
    color: #28a745;
    font-size: 2.5em;
}

.thank-you p {
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #004c99;
}

/* Navbar buttons */
.navbar-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.navbar-buttons a {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
}

/* Desktop : All buttons inline */
@media (min-width: 768px) {
    .navbar-buttons {
        flex-wrap: nowrap;
    }
    .navbar-buttons a {
        flex: none;
    }
}

/* Mobile : Two buttons per row */
@media (max-width: 767px) {
    .navbar-buttons a {
        flex: 0 1 45%;
    }
}

/* Animation fade-in */
.fade-in-navbar {
    animation: fadeIn 0.7s ease-in-out;
}

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

/* --- Animation douce de fade + montée --- */
.fade-in-navbar a {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInMove 0.7s ease forwards;
}

/* Chaque bouton se décalera légèrement */
.fade-in-navbar a:nth-child(1) { animation-delay: 0.1s; }
.fade-in-navbar a:nth-child(2) { animation-delay: 0.2s; }
.fade-in-navbar a:nth-child(3) { animation-delay: 0.3s; }
.fade-in-navbar a:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInMove {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Ombre douce sous les boutons --- */
.navbar-buttons a {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* --- Hover spécial sur desktop --- */
@media (min-width: 768px) {
    .navbar-buttons a:hover {
        transform: scale(1.05);
        background-color: #0056b3;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
    }
}

/* Hover moderne pour boutons */
.navbar-buttons a {
    transition: all 0.3s ease;
}

.navbar-buttons a:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Pour les mobiles : simuler hover en tap */
@media (hover: none) and (pointer: coarse) {
    .navbar-buttons a:active {
        background-color: #004c99;
        transform: translateY(-1px);
    }
}

/* Language Dropdown Styles */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-btn {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.language-btn::after {
    content: "▼";
    font-size: 0.6em;
    margin-left: 5px;
}

.language-btn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.language-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    z-index: 1000;
    margin-top: 5px;
}

.language-dropdown-content a {
    color: #333;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.language-dropdown-content a:hover {
    background-color: #f5f5f5;
}

.language-dropdown:hover .language-dropdown-content,
.language-dropdown:focus-within .language-dropdown-content {
    display: block;
}

/* Mobile styles for dropdown */
@media (max-width: 767px) {
    .language-dropdown {
        width: 100%;
        margin-top: 10px;
    }
    
    .language-dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-top: 5px;
    }
    
    .language-btn::after {
        margin-left: auto;
    }
}

/* Focus states for accessibility */
.language-dropdown:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.language-dropdown-content a:focus {
    outline: 2px solid #0056b3;
    outline-offset: -2px;
}

/*  */
/* ... (conservez tout le CSS existant avant cette partie) ... */

/* Style raffiné pour le sélecteur de langue */
.language-selector {
    position: relative;
    margin-left: 10px;
}

.language-trigger {
    padding: 10px 20px;
    background-color: transparent;
    color: #007BFF;
    border: 2px solid #007BFF;
    border-radius: 30px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-trigger:hover {
    background-color: #007BFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.language-trigger::after {
    content: "⌄";
    font-size: 1.2em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.language-options {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 140px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.language-options a {
    padding: 12px 16px;
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.language-options a:hover {
    background-color: #f8f9fa;
    color: #007BFF;
    padding-left: 20px;
}

.language-selector:hover .language-options,
.language-selector:focus-within .language-options {
    display: block;
}

.language-selector:hover .language-trigger::after {
    transform: rotate(180deg);
}

/* Style pour les drapeaux */
.language-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Version mobile */
@media (max-width: 767px) {
    .language-selector {
        width: 100%;
        margin: 10px 0 0 0;
    }
    
    .language-options {
        width: 100%;
        position: static;
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }
    
    .language-trigger {
        justify-content: center;
        width: 100%;
    }
}

/* === NAVBAR CUSTOM AVEC BACKGROUND IMAGE + OVERLAY === */
.navbar-custom {
    position: relative;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 1rem;
    color: white;
    background-image: url('/static/palmeraie.webp');
    background-size: cover;
    background-position: center;
    /* ⚠️ NE PAS mettre overflow: hidden ici */
}

/* Overlay sombre pour améliorer contraste */
.navbar-custom::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); /* tu peux monter à 0.5 si nécessaire */
    z-index: 0;
}

/* Tous les éléments dans la navbar doivent être au-dessus de l'overlay */
.navbar-custom .navbar-buttons,
.navbar-custom .language-selector {
    position: relative;
    z-index: 1;
}

/* === CORRECTIONS MENU LANGUE === */
.language-selector {
    position: relative;
    margin-left: 10px;
    z-index: 10; /* important */
}

.language-options {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 140px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 999; /* très au-dessus de l'overlay */
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.language-options a {
    padding: 12px 16px;
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.language-options a:hover {
    background-color: #f8f9fa;
    color: #007BFF;
    padding-left: 20px;
}

.language-selector:hover .language-options,
.language-selector:focus-within .language-options {
    display: block;
}

.language-trigger::after {
    content: "⌄";
    font-size: 1.2em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.language-selector:hover .language-trigger::after {
    transform: rotate(180deg);
}

.language-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

html[lang="ar"] {
    direction: rtl;
    font-family: 'Cairo', sans-serif; /* ou une autre police adaptée à l'arabe */
}

html[lang="ar"] body {
    text-align: right;
}

.ios-banner {
    background-color: #fefefe;
    color: #333;
    padding: 12px 16px;
    font-size: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    position: relative;
    z-index: 999;
}

.ios-instructions {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

.ios-close {
    position: absolute;
    right: 10px;
    top: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #888;
}

/* Style spécifique pour la bannière iOS en arabe */
html[lang="ar"] .ios-banner {
    direction: rtl;
    text-align: right;
}

.ios-banner.fade-in-soft {
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInBanner 0.7s ease-out forwards;
}

@keyframes fadeInBanner {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wave-separator {
    width: 100%;
    height: 80px;
    background: linear-gradient(45deg, #007BFF, #0056b3);
    position: relative;
    overflow: hidden;
}

.wave-separator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C300,120 900,0 1200,60 L1200,120 L0,120 Z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E") repeat-x;
    animation: wave 3s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.wave-transition {
    height: 80px;
    background: url('data:image/svg+xml;utf8,<svg ...>') center/cover;
    opacity: 0.3;
  }
  
  .gradient-transition {
    height: 60px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
  }

.fade-in-image {
  display: inline-block;
  overflow: hidden;
  border-radius: 0.5rem;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1.5s ease-out forwards;
  animation-delay: 0.3s;
}

.fade-in-image img {
  display: block;
  transition: transform 0.5s ease-out;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-image:hover img {
  transform: scale(1.05);
}

/* ===== ANIMATION FADE-IN-SOFT CORRIGÉE ===== */
/* État initial - élément invisible */
.fade-in-soft {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 1.2s ease-out;
}

/* État final - élément visible (contrôlé par JavaScript) */
.fade-in-soft.appear {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Garde l'animation @keyframes pour compatibilité avec d'autres éléments */
@keyframes fadeInSoft {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}