/* style.css */

/* === BASE & RESET === */
body {
    margin: 40px; 
    padding: 5px;
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    color: white;
    background: transparent;
}

/* FOND VIDÉO */
.video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2s; }
.bg.active { opacity: 1; }
.overlay-tint { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.3); }

/* === CONTENEUR FLUIDE === */
.layout-container {
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr) 350px; 
    grid-template-rows: auto 1fr 35vh; 
    gap: 20px;
}

/* === WIDGETS === */
.widget-box {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(15px);
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.widget-header {
    background: rgba(255, 0, 85, 0.9);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* === ZONE HAUT GAUCHE === */
.top-section-wrapper {
    grid-column: 1 / 3; 
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 380px; 
}

.astro-layout { display: flex; gap: 10px; padding: 10px; align-items: stretch; }
.weather-square {
    width: 110px; 
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.big-temp { font-size: 2.2rem; font-weight: bold; color: #ffcc00; margin-top: 5px; }
.weather-icon { font-size: 2.5rem; margin-bottom: 0; }

.astro-right-col { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.small-info-box {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 4px 10px;
    display: flex; align-items: center; justify-content: space-between;
}
.label-mini { font-size: 0.7rem; text-transform: uppercase; color: #aaa; font-weight: bold; margin-right: 10px;}
.info-text { color: #fff; font-weight: bold; font-size: 0.9rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.small-dicton { font-size: 0.8rem; font-style: italic; white-space: normal; line-height: 1.1; }

.horo-widget { 
    height: 180px; /* Hauteur suffisante pour le texte */
    display: flex;
    flex-direction: column;
}

/* 2. Le conteneur du carrousel prend toute la place restante */
.horo-layout { 
    flex: 1; 
    position: relative; /* Indispensable pour que les slides absolues se calent ici */
    overflow: hidden;   /* Empêche le texte de dépasser si trop long */
    padding: 0;         /* On gère le padding dans le slide */
}

/* 3. Le conteneur interne du carrousel */
#horoscope-carousel { 
    width: 100%; 
    height: 100%; 
    position: relative; 
}

/* 4. Chaque slide (Absolue pour l'animation) */
.horo-slide {
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    
    /* Mise en page interne : Icone à gauche, Texte à droite */
    display: flex; 
    align-items: center; 
    justify-content: flex-start; /* Aligné à gauche */
    padding: 10px 20px;          /* Espace intérieur */
    box-sizing: border-box;
    
    /* Animation Opacité */
    opacity: 0; 
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.horo-slide.active { 
    opacity: 1; 
    z-index: 2; 
}

/* 5. L'Animation de l'icône */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.yy-icon { 
    font-size: 3.5rem; /* Icône un peu plus grosse */
    margin-right: 20px; 
    min-width: 60px;   /* Garde de la place pour l'icône */
    text-align: center;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
    animation: float 4s ease-in-out infinite;
}

/* 6. Le Texte (Ajusté pour ne pas chevaucher) */
.yy-text { 
    font-size: 1rem;       /* Taille lisible */
    font-style: italic; 
    color: #e0e0e0; 
    line-height: 1.4;      /* Bonne hauteur de ligne */
    text-align: left;      /* Aligné à gauche */
    
    /* Gestion du texte trop long */
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limite à 5 lignes max */
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* === ZONE BAS : NEWS === */
.bottom-news-wrapper {
    grid-column: 1 / 5;
    grid-row: 3;
    display: flex;
    gap: 20px;
}
.news-col { flex: 1; min-width: 0; }
.news-viewport { flex: 1; overflow: hidden; position: relative; padding: 10px; }
.scroll-container { display: flex; flex-direction: column; animation: scrollVertical 40s linear infinite; }
.scroll-container:hover { animation-play-state: paused; }
@keyframes scrollVertical { 0% { transform: translateY(100%); } 100% { transform: translateY(-100%); } }
.news-item { margin-bottom: 15px; padding: 10px; background: rgba(0,0,0,0.3); border-radius: 6px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.cat-tag { color: #ffcc00; font-weight: 900; font-size: 0.8rem; display: block; margin-bottom: 4px; }


/* === ZONE CRYPTO === */
/* ... LE DÉBUT DU FICHIER RESTE INCHANGÉ ... */

/* === ZONE CRYPTO (3 LIGNES DEPUIS LE BAS) === */
.crypto-wrapper {
    grid-column: 5; 
    grid-row: 3; /* Se place dans la zone bas-droite */
    
    /* Flexbox Vertical pour gérer les lignes */
    display: flex;
    flex-direction: column; 
    justify-content: flex-end; /* <--- COLLE TOUT EN BAS */
    gap: 15px; /* Espace entre les lignes */
    
    height: 100%; 
    padding-bottom: 5px; /* Petite marge au bord bas */
}

/* Chaque Ligne de Crypto */
.crypto-line {
    display: flex;
    justify-content: center; /* Centre les carrés horizontalement */
    gap: 15px; /* Espace entre SOL et NASDAQ */
    width: 100%;
}

/* Le Carré Crypto */
.crypto-square {
    background: #000000;
    border: 1px solid #333;
    border-radius: 12px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    
    /* Dimension Carrée Fixe pour uniformité */
    width: 140px; 
    height: 140px; 
    /* Si vous voulez que ça s'adapte, utilisez : width: 45%; aspect-ratio: 1/1; */
}

/* Typographie (Inchangée) */
.sym { color: #ffffff; font-weight: 900; font-size: 1rem; margin-bottom: 5px; letter-spacing: 1px;}
.prc { font-weight: 900; font-size: 1.4rem; letter-spacing: 0.5px; margin-bottom: 2px; }
.var { font-weight: bold; font-size: 1.1rem; letter-spacing: 0.5px; }

.green { color: #00ff55; text-shadow: 0 0 10px rgba(0, 255, 85, 0.5); }
.red { color: #ff3333; text-shadow: 0 0 10px rgba(255, 51, 51, 0.5); }

/* === WIDGET MUSIQUE LOFI (Position Haut-Droite) === */
.music-player {
    position: fixed;
    /* On change la position ici : */
    top: 40px;        /* Aligné en haut */
    right: 40px;      /* Aligné à droite */
    /* On retire bottom/left */
    
    z-index: 2000;    /* Z-index élevé pour être sûr qu'il passe au-dessus de tout */
    
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 10px 25px;
    
    display: flex;
    align-items: center;
    gap: 20px;
    
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    min-width: 400px;
    
    /* Petite animation d'arrivée */
    animation: slideIn 1s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Le reste du CSS pour le player reste identique... */
.music-player:hover { border-color: #ff0055; }

.music-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s;
    min-width: 30px;
}
.music-btn:hover { transform: scale(1.2); }

/* Zone Timeline */
.timeline-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* Prend toute la place disponible */
}

.time-text {
    font-size: 0.75rem;
    color: #ccc;
    font-family: monospace;
    width: 35px; /* Largeur fixe pour éviter le décalage */
    text-align: center;
}

/* Slider commun (Timeline + Volume) */
input[type=range] {
    -webkit-appearance: none;
    background: #444;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    height: 4px;
}

#seek-slider { width: 100%; } /* Timeline prend toute la largeur */
#vol-slider { width: 70px; }

/* Rond du slider */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #ff0055;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.3); }

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid #555; /* Petit séparateur */
    padding-left: 15px;
}
.vol-icon { font-size: 1rem; }