/* ============================================================
   BIKERENTAL - Feuille de style principale
   ============================================================ */

/* --- Directives Tailwind CSS (OBLIGATOIRE pour le compilateur) --- */
@tailwind base;
@tailwind components;
@tailwind utilities;


/* --- Écran de chargement --- */
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(203, 108, 230, 0.2);
    border-top-color: #cb6ce6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Animations d'entrée --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(203, 108, 230, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(203, 108, 230, 0); }
}
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-2deg); }
    40% { transform: rotate(2deg); }
    60% { transform: rotate(-1deg); }
    80% { transform: rotate(1deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes tickerScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.animate-fade-in    { animation: fadeIn 0.6s ease forwards; }
.animate-fade-up    { animation: fadeUp 0.6s ease forwards; }
.animate-fade-left  { animation: fadeLeft 0.6s ease forwards; }
.animate-fade-right { animation: fadeRight 0.6s ease forwards; }
.animate-zoom-in    { animation: zoomIn 0.6s ease forwards; }
.animate-slide-down { animation: slideDown 0.4s ease forwards; }
.animate-pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }
.animate-wiggle     { animation: wiggle 1s ease-in-out infinite; }
.animate-float      { animation: float 3s ease-in-out infinite; }

/* Délais d'animation */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* État initial invisible pour les animations déclenchées */
.anim-init {
    opacity: 0;
}

/* --- Scroll animations --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.scroll-animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.scroll-animate-zoom {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-animate-zoom.visible {
    opacity: 1;
    transform: scale(1);
}

/* --- Bandeau défilant --- */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
}
.ticker-content {
    display: inline-block;
    animation: tickerScroll 20s linear infinite;
}

/* --- Zone de dépôt de fichier --- */
.file-drop-zone {
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}
.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: #cb6ce6;
    background: rgba(203, 108, 230, 0.05);
}

/* --- Bouton secondaire --- */
.btn-secondary {
    background: linear-gradient(135deg, #cb6ce6, #a84fc5);
    color: white;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: linear-gradient(135deg, #d89af0, #cb6ce6);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(203, 108, 230, 0.4);
}
.btn-secondary:active {
    transform: translateY(0);
}
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Bouton primaire --- */
.btn-primary {
    background: #1F272A;
    color: white;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: #2d373b;
    transform: translateY(-1px);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- Carte --- */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* --- Modal overlay --- */
.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* --- Scrollbar personnalisée --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(203, 108, 230, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(203, 108, 230, 0.5);
}

/* --- Zone sécurisée en bas (mobile) --- */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* --- Contenu principal avec sidebar --- */
.main-content {
    margin-left: 0;
    padding-bottom: 5rem;
    transition: margin-left 0.3s ease;
}
@media (min-width: 1024px) {
    .main-content {
        margin-left: 16rem;
        padding-bottom: 1rem;
    }
}

/* --- Image cover --- */
.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* --- Tableau horizontal scroll --- */
.table-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll-x table {
    min-width: 600px;
}

/* --- Spinner inline --- */
.spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}