/**
 * Nom du fichier : public.home.css
 * Description : Styles de la page d'accueil publique Reserva.
 *               Mobile first, animations d'entrée, sections héro/catégories/CTA.
 *               Charte couleur harmonisée : #0E7490 (bleu océan Reserva) partout.
 * Module : Public
 * Auteur : Reserva
 * Date de création : 13/04/2026
 * Dernière modification : 14/04/2026
 */

/* ============================================
   SECTION HÉRO
   ============================================ */

.hero-section {
    /* Dégradé aux couleurs Reserva — bleu océan */
    background: linear-gradient(
        135deg,
        #0E7490 0%,
        #0C4A6E 50%,
        #164E63 100%
    );
    color: #ffffff;
    padding: 3rem 1.5rem 4rem;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 640px;
    width: 100%;
    animation: heroFadeIn 0.8s ease-out;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-highlight {
    color: #fbbf24; /* Jaune doré — sable de Djibouti */
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Barre de recherche héro */
.hero-search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    gap: 0.5rem;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #1f2937;
    background: transparent;
    padding: 0.75rem 0.5rem;
    min-width: 0; /* Empêche le dépassement sur mobile */
}

.search-input-wrapper input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: #0E7490;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: #0C4A6E;
}

/* ============================================
   SECTION CATÉGORIES
   ============================================ */

.categories-section {
    padding: 3rem 1.5rem;
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 640px;
    margin: 0 auto;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0.75rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.category-icon {
    font-size: 2rem;
    line-height: 1;
}

.category-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
}

/* ============================================
   SECTION "COMMENT ÇA MARCHE"
   ============================================ */

.how-it-works-section {
    padding: 3rem 1.5rem;
    background: #f9fafb;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #0E7490;
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ============================================
   SECTION CTA ENTREPRISE
   ============================================ */

.cta-section {
    padding: 3rem 1.5rem;
    background: linear-gradient(
        135deg,
        #0E7490 0%,
        #0C4A6E 100%
    );
    text-align: center;
}

.cta-content {
    max-width: 540px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cta-btn {
    display: inline-block;
    background: #fbbf24;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

/* ============================================
   ANIMATION D'ENTRÉE
   ============================================ */

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

/* ============================================
   RESPONSIVE — TABLETTE (768px+)
   ============================================ */

@media (min-width: 768px) {
    .hero-section {
        padding: 5rem 2rem 6rem;
        min-height: 65vh;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   RESPONSIVE — DESKTOP (1024px+)
   ============================================ */

@media (min-width: 1024px) {
    .hero-section {
        min-height: 70vh;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-content {
        max-width: 720px;
    }

    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 800px;
    }

    .categories-section,
    .how-it-works-section,
    .cta-section {
        padding: 4rem 2rem;
    }
}

/* ============================================
   MODE SOMBRE
   ============================================ */

.dark .categories-section {
    background: #0F172A;
}

.dark .how-it-works-section {
    background: #1E293B;
}

.dark .category-card {
    background: #1E293B;
    border-color: #334155;
}

.dark .category-name {
    color: #E2E8F0;
}

.dark .section-title {
    color: #E2E8F0;
}

.dark .step-title {
    color: #E2E8F0;
}

.dark .step-description {
    color: #94A3B8;
}

.dark .search-input-wrapper {
    background: #1f2937;
}

.dark .search-input-wrapper input {
    color: #f9fafb;
}

.dark .search-input-wrapper input::placeholder {
    color: #6b7280;
}

/* ──────────────────────────────────────────────────────────────
   Carrousel secteurs — auto-défilement continu vers la gauche
   (Conv 132 Dette 193). Piste = cartes dupliquées x2, translateX
   de 0 à -50% = boucle sans trou. Pause au survol. Coupé et rendu
   scrollable au doigt si l'utilisateur préfère moins d'animation.
   ────────────────────────────────────────────────────────────── */
.sectors-marquee-wrapper {
    overflow: hidden;
}

.sectors-marquee {
    display: flex;
    align-items: center;
    width: max-content;
    animation: reserva-marquee 40s linear infinite;
}

/* Pause du défilement au survol de la piste */
.sectors-marquee-wrapper:hover .sectors-marquee {
    animation-play-state: paused;
}

@keyframes reserva-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Accessibilité : coupe l'animation, la piste devient scrollable au doigt */
@media (prefers-reduced-motion: reduce) {
    .sectors-marquee {
        animation: none;
    }
    .sectors-marquee-wrapper {
        overflow-x: auto;
    }
}
