/* ============================================
   Salima Hadiji Nutritionniste - Preloader CSS
   Charte graphique: #5C8607, #FDFAF1
   ============================================ */

* {
    box-sizing: border-box;
}

/* Overlay principal */
.salima-preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FDFAF1 0%, #f8f5e8 50%, #FDFAF1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Particules décoratives en arrière-plan */
.salima-preloader-overlay::before,
.salima-preloader-overlay::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    pointer-events: none;
    animation: floatParticle 20s infinite ease-in-out;
}

.salima-preloader-overlay::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #5C8607 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.salima-preloader-overlay::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7aad08 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
}

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%       { transform: translate(30px, -30px) scale(1.1); }
    50%       { transform: translate(-20px, 20px) scale(0.9); }
    75%       { transform: translate(20px, 30px) scale(1.05); }
}

/* État caché */
.salima-preloader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Container de contenu */
.salima-preloader-content {
    text-align: center;
    max-width: 620px;
    padding: 40px;
    animation: fadeInScale 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Container du logo */
.salima-logo-container {
    margin-bottom: 35px;
    position: relative;
    animation: logoEntrance 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes logoEntrance {
    0%   { opacity: 0; transform: scale(0.8) translateY(-20px); }
    60%  { transform: scale(1.04) translateY(3px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Logo SVG par défaut */
.salima-logo-svg {
    width: 100%;
    max-width: 380px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(92, 134, 7, 0.15));
}

/* Logo personnalisé */
.salima-custom-logo {
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(92, 134, 7, 0.18));
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* Icône feuille flottante */
.leaf-icon {
    animation: leafFloat 3.5s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes leafFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-10px) rotate(4deg); }
}

/* Titre principal */
.salima-title {
    color: #5C8607;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    line-height: 1.2;
    animation: messageSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}

/* Sous-titre (profession) */
.salima-subtitle {
    color: #7aad08;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 28px;
    animation: messageSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.45s backwards;
}

/* Séparateur décoratif */
.salima-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    animation: messageSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.5s backwards;
}

.salima-divider-line {
    flex: 1;
    max-width: 100px;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, #5C8607, transparent);
    opacity: 0.35;
}

.salima-divider-icon {
    font-size: 18px;
    color: #5C8607;
    opacity: 0.6;
}

/* Infos (adresse + téléphone) */
.salima-info-block {
    margin-bottom: 32px;
    animation: messageSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
}

.salima-info-item {
    color: #4a6b05;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.85;
}

.salima-info-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

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

/* Message de bienvenue */
.salima-message {
    color: #5C8607;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 36px;
    line-height: 1.6;
    letter-spacing: 0.4px;
    animation: messageSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
    position: relative;
    padding: 0 20px;
}

.salima-message::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #5C8607 50%, transparent 100%);
    opacity: 0.2;
}

/* Container de progression */
.salima-progress-container {
    margin-bottom: 28px;
    animation: progressFadeIn 1s ease 0.6s backwards;
}

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

/* Barre de progression */
.salima-progress-bar {
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #e8edd9 0%, #f2f5e7 50%, #e8edd9 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        inset 0 2px 6px rgba(92, 134, 7, 0.08),
        0 2px 8px rgba(92, 134, 7, 0.06);
    position: relative;
    margin-bottom: 14px;
}

/* Remplissage de la barre */
.salima-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #5C8607 0%, #7aad08 50%, #5C8607 100%);
    background-size: 200% 100%;
    border-radius: 20px;
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.salima-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

/* Texte de pourcentage */
.salima-progress-text {
    text-align: center;
    margin-top: 10px;
}

.salima-progress-percent {
    color: #5C8607;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(92, 134, 7, 0.1);
}

/* Texte de chargement */
.salima-loading-text {
    color: #7aad08;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 1; }
}

.salima-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20%  { content: ''; }
    40%      { content: '.'; }
    60%      { content: '..'; }
    80%, 100%{ content: '...'; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .salima-preloader-content { padding: 30px 20px; }
    .salima-logo-svg          { max-width: 300px; }
    .salima-custom-logo       { max-width: 200px; }
    .salima-title             { font-size: 24px; }
    .salima-subtitle          { font-size: 14px; }
    .salima-info-item         { font-size: 13px; }
    .salima-progress-percent  { font-size: 15px; }
    .salima-loading-text      { font-size: 12px; }
}

@media (max-width: 480px) {
    .salima-preloader-content { padding: 20px 15px; }
    .salima-logo-svg          { max-width: 240px; }
    .salima-custom-logo       { max-width: 160px; }
    .salima-title             { font-size: 20px; }
    .salima-subtitle          { font-size: 12px; letter-spacing: 1.5px; }
    .salima-info-item         { font-size: 12px; }
    .salima-progress-bar      { height: 8px; }
    .salima-progress-percent  { font-size: 14px; }
    .salima-loading-text      { font-size: 11px; }
    .salima-preloader-overlay::before,
    .salima-preloader-overlay::after { width: 300px; height: 300px; }
}

/* ============================================
   EFFETS PREMIUM
   ============================================ */

.salima-preloader-content::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, #5C8607, #FDFAF1, #7aad08, #FDFAF1);
    background-size: 400% 400%;
    border-radius: 20px;
    z-index: -1;
    opacity: 0.08;
    animation: gradientBorder 8s ease infinite;
    filter: blur(10px);
}

@keyframes gradientBorder {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.salima-preloader-content::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(253, 250, 241, 0.04);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    animation: glassAppear 2s ease 1s forwards;
}

@keyframes glassAppear {
    to { opacity: 1; }
}
