/* --- style.css --- */

/* RESET & BASE */
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #1e293b; overflow-x: hidden; }

/* INFOBULLE (TOOLTIP) NEUTRE */
#cursor-tooltip {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}
#cursor-tooltip.visible { opacity: 1; }

/* ANIMATION MISE EN AVANT */
@keyframes pulse-highlight {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.2); } 
    100% { transform: translateY(0) scale(1); }
}
.highlight-anim { animation: pulse-highlight 0.8s ease-in-out 2; z-index: 100 !important; }

/* Correction Animation pour l'Arbre centré */
.pos-arbre.highlight-anim {
    animation-name: pulse-highlight-centered !important;
}
@keyframes pulse-highlight-centered {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); } 
    100% { transform: translateY(-50%) scale(1); }
}

/* --- SECTIONS ACCUEIL --- */
.section-full { position: relative; width: 100%; min-height: 100vh; overflow: hidden; border-bottom: 2px solid rgba(0,0,0,0.05); }
#accueil { background: #f8fafc; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
#pompier { background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%); }
#sport { background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%); }
#chat { background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%); }

/* FLÈCHE DE SCROLL */
.scroll-indicateur { position: absolute; bottom: 25px; right: 30px; text-align: center; color: #64748b; font-weight: 600; font-size: 0.85rem; animation: rebond 2s infinite; cursor: default; }
.fleche-bas { font-size: 1.8rem; color: #334155; margin-top: 5px; }
@keyframes rebond { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

/* EN-TETES */
.en-tete { position: absolute; top: 0; width: 100%; text-align: center; padding: 15px 0; color: white; font-weight: 600; letter-spacing: 1.5px; z-index: 10; font-size: 0.95rem; }
.en-tete-pompier { background: linear-gradient(to right, #b91c1c, #991b1b); box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3); }
.en-tete-sport { background: linear-gradient(to right, #2563eb, #1d4ed8); box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }
.en-tete-chat { background: linear-gradient(to right, #f97316, #ea580c); box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3); }

/* ACCUEIL CARTE */
.intro { text-align: center; margin-bottom: 30px; }
.intro h1 { font-size: 3rem; color: #0f172a; margin-bottom: 10px; }
.intro p { font-size: 1.15rem; color: #64748b; }
.conteneur-cartes { display: flex; gap: 30px; flex-wrap: wrap; justify-content: center; padding: 20px; }
.carte-lien { background: white; border-radius: 20px; width: 260px; padding: 35px 20px; text-align: center; text-decoration: none; color: #333; box-shadow: 0 15px 25px -5px rgba(0,0,0,0.05); transition: all 0.3s ease; border-top: 5px solid #ccc; display: flex; flex-direction: column; align-items: center; }
.carte-lien:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -12px rgba(0,0,0,0.15); }
.emoji-geant { font-size: 3.5rem; margin-bottom: 15px; }
.titre-lien { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; display: block; }
.sous-titre { color: #94a3b8; font-size: 0.9rem; line-height: 1.4; }
.lien-pompier { border-color: #ef4444; }
.lien-sport { border-color: #3b82f6; }
.lien-chat { border-color: #f97316; }

/* OBJETS & SCENE */
.scene { position: relative; width: 100%; height: 100%; min-height: 100vh; }
.objet-cliquable { position: absolute; cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); filter: drop-shadow(0 10px 10px rgba(0,0,0,0.15)); width: 14vw; max-width: 190px; }
.objet-cliquable:hover { transform: translateY(-10px) scale(1.05); filter: contrast(1.1) saturate(1.2) drop-shadow(0 20px 20px rgba(0,0,0,0.3)); z-index: 20; }

/* POSITIONS */
.pos-vsav { top: 15%; left: 5%; width: 19vw; max-width: 280px; } 
.pos-caserne { top: 15%; right: 5%; width: 19vw; max-width: 280px; }
.pos-kit { bottom: 5%; left: 5%; width: 18vw; max-width: 250px; }
.pos-radio { bottom: 5%; right: 5%; width: 5.5vw; max-width: 90px; }
.pos-hand { top: 15%; left: 5%; width: 9vw; max-width: 120px; animation: rotationContinue 10s linear infinite; }
.pos-hand:hover { animation-play-state: paused; transform: scale(1.1); }
.pos-traction { top: 15%; right: 5%; width: 11vw; max-width: 160px; }
.pos-rollers { bottom: 5%; left: 5%; width: 17vw; max-width: 220px; }
.pos-casque { bottom: 5%; right: 5%; width: 11vw; max-width: 150px; z-index: 50; cursor: pointer; }

/* SECTION CHAT */
.pos-arbre { top: 50%; left: 5%; transform: translateY(-50%); width: 14vw; max-width: 180px; } 
.pos-pelote { top: 50%; right: 5%; transform: translateY(-50%); width: 12vw; max-width: 150px; }
.pos-arbre:hover, .pos-pelote:hover { transform: translateY(calc(-50% - 10px)) scale(1.15) !important; }

@keyframes rotationContinue { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* TEXTE CENTRAL */
.texte-central { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; max-width: 600px; width: 60%; z-index: 1; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(12px); padding: 35px 30px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.9); box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.1); }
.texte-central h2 { font-size: 3rem; margin: 0 0 15px 0; color: #1a1a1a; font-weight: 800; } 
.texte-central p { font-size: 1.15rem; color: #4b5563; margin: 0; } 
.btn-remonter { position: absolute; bottom: 30px; right: 30px; background: rgba(255,255,255,0.9); padding: 8px 18px; border-radius: 30px; text-decoration: none; color: #333; font-weight: bold; font-size: 0.9rem; backdrop-filter: blur(5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: transform 0.2s; z-index: 100; }
.btn-remonter:hover { transform: translateY(-3px); }

/* MODALE */
.fond-modale { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 2000; }
.fond-modale.active { display: flex; animation: apparitionDouce 0.3s ease-out forwards; }
@keyframes apparitionDouce { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.contenu-modale { background: #1e293b; padding: 35px; border-radius: 20px; max-width: 550px; width: 90%; position: relative; text-align: center; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); max-height: 85vh; overflow-y: auto; color: #f1f5f9; border: 1px solid rgba(255, 255, 255, 0.1); }
.contenu-modale h2 { color: #f8fafc; margin-top: 0; }
.fermer-modale { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; cursor: pointer; color: #94a3b8; transition: color 0.2s; }
.fermer-modale:hover { color: #f87171; }
.icone-emoji { font-size: 3rem; display: block; margin-bottom: 15px; }

/* TIROIRS, LISTES */
.accordeon-container { margin-top: 20px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.tiroir-wrapper { border-radius: 8px; overflow: hidden; border: 1px solid #475569; box-shadow: none; transition: all 0.3s ease; }
.tiroir-wrapper:hover { border-color: #38bdf8; }
.tiroir-btn { width: 100%; padding: 14px 18px; background: #334155; color: white; border: none; border-left: 5px solid #38bdf8; outline: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; text-align: left; transition: all 0.3s ease; }
.tiroir-titre { font-size: 1rem; font-weight: 700; color: white; }
.tiroir-icone { font-size: 1.4rem; font-weight: 700; background: rgba(255,255,255,0.1); color: white; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s ease; }
.tiroir-btn.actif { background: #0284c7; border-left-color: #bae6fd; }
.tiroir-content { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); background-color: #1e293b; }
.tiroir-body { padding: 18px; border-top: 1px solid #475569; color: #cbd5e1; line-height: 1.6; background: #1e293b; font-size: 0.95rem; }
.intro-garde { font-weight: bold; margin-bottom: 12px; font-size: 1.05rem; color: #f8fafc; }
.liste-garde { list-style: none; padding: 0; margin: 0; text-align: left; font-size: 0.95rem; color: #cbd5e1; }
.liste-garde li { display: flex; align-items: baseline; padding: 7px 0; border-bottom: 1px solid #334155; }
.liste-garde strong { color: #38bdf8; margin-right: 5px; margin-left: 8px; white-space: nowrap; }
.note-garde { margin-top: 15px; font-style: italic; background: rgba(239, 68, 68, 0.1); padding: 10px; border-radius: 8px; border-left: 4px solid #ef4444; text-align: left; font-size: 0.9rem; color: #cbd5e1; }
.conteneur-contacts { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.btn-contact { display: flex; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: transform 0.2s, box-shadow 0.2s; color: white; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-contact:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.3); }
.btn-contact.email { background: linear-gradient(135deg, #ea580c, #c2410c); }
.btn-contact.linkedin { background: linear-gradient(135deg, #0077b5, #005582); }
.btn-contact.github { background: linear-gradient(135deg, #333333, #171515); }
.hobby-tag { background: #334155; border: 2px solid #64748b; color: #f1f5f9; padding: 7px 14px; border-radius: 18px; font-weight: 600; display: flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.hobby-emoji { font-size: 1.2rem; }

/* --- STYLE ARBRE A CHAT ZIGZAG --- */
.cat-tree-container { position: relative; display: block; width: 100%; max-width: 550px; height: 550px; margin: 0 auto; background: url('images/arbre_a_chats.png') no-repeat center center; background-size: contain; }
.tree-floor { position: absolute; width: 35%; background: #fff7ed; border: 3px solid #fed7aa; border-radius: 15px; padding: 12px; z-index: 1; box-shadow: 0 5px 15px rgba(234, 88, 12, 0.15); }
.tree-floor .floor-content h3, .tree-floor .floor-date, .tree-floor .floor-desc { color: #1e293b; }
.tree-floor:nth-child(1) { bottom: 2%; left: 2%; text-align: right; border-radius: 20px 0 20px 20px; }
.tree-floor:nth-child(1)::after { content: ''; position: absolute; top: 50%; right: -125px; width: 130px; height: 8px; background: #fed7aa; transform: translateY(-50%); z-index: -1; }
.tree-floor:nth-child(1) .floor-cat { left: -40px; }
.tree-floor:nth-child(2) { top: 38%; right: 2%; text-align: left; border-radius: 0 20px 20px 20px; }
.tree-floor:nth-child(2)::after { content: ''; position: absolute; top: 50%; left: -125px; width: 130px; height: 8px; background: #fed7aa; transform: translateY(-50%); z-index: -1; }
.tree-floor:nth-child(2) .floor-cat { right: -40px; left: auto; }
.tree-floor:nth-child(3) { top: 2%; left: 2%; text-align: right; border-radius: 20px 0 20px 20px; }
.tree-floor:nth-child(3)::after { content: ''; position: absolute; top: 50%; right: -125px; width: 130px; height: 8px; background: #fed7aa; transform: translateY(-50%); z-index: -1; }
.tree-floor:nth-child(3) .floor-cat { left: -40px; }
.floor-cat { position: absolute; top: -55px; width: 80px; height: 60px; border-radius: 10px; border: 3px solid white; box-shadow: 0 4px 8px rgba(0,0,0,0.1); background: #fff; object-fit: cover; }
.floor-content h3 { color: #9a3412; margin: 0 0 5px 0; font-size: 1rem; }
.floor-place { font-weight: 600; color: #ea580c; font-size: 0.85rem; }
.floor-date { color: #64748b; font-size: 0.8rem; font-style: italic; margin-bottom: 8px; display: block; }
.floor-desc { margin: 0; color: #475569; font-size: 0.8rem; }

/* ================================================= */
/* === STYLE PAGE PROJETS === */
/* ================================================= */

.page-projets { background-color: #0b1120; font-family: 'Inter', sans-serif; color: #e2e8f0; overflow-x: hidden; position: relative; }
.btn-retour-projet { position: fixed; top: 30px; left: 30px; display: flex; align-items: center; gap: 8px; background: rgba(30, 41, 59, 0.7); padding: 10px 20px; border-radius: 30px; text-decoration: none; color: #e2e8f0; font-weight: 500; font-size: 0.9rem; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); z-index: 1000; transition: all 0.3s; }
.btn-retour-projet:hover { background: rgba(56, 189, 248, 0.15); border-color: #38bdf8; color: #38bdf8; }
.header-projets { padding-top: 100px; padding-bottom: 40px; background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.15), transparent 60%); }
.intro-tech { max-width: 900px; margin: 0 auto; padding: 0 20px; text-align: center; }
.titre-tech { font-size: 3rem; font-weight: 800; color: white; margin-bottom: 15px; letter-spacing: -1px; }
.gradient-text { background: linear-gradient(90deg, #38bdf8, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.desc-tech { font-size: 1.15rem; color: #94a3b8; line-height: 1.7; margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }
.competences-container { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; margin-top: 40px; }
.tech-group { flex: 1; min-width: 250px; max-width: 400px; text-align: center; }
.tech-group-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; display: inline-block; }
.tags-wrapper { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-pill { background: rgba(56, 189, 248, 0.1); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.2); padding: 6px 14px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.tech-pill:hover { background: rgba(56, 189, 248, 0.2); transform: translateY(-2px); }
.piste-roller-container { position: relative; max-width: 950px; margin: 0 auto; padding: 0 20px; }
#roller-slalom { position: fixed; top: 50%; left: 50%; width: 60px; height: auto; z-index: 50; transition: transform 0.05s linear; will-change: transform; transform: translate(-50%, -50%); filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4)); pointer-events: none; }
.ligne-route { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: linear-gradient(to bottom, transparent, #334155 10%, #334155 90%, transparent); transform: translateX(-50%); z-index: 0; }
.liste-projets { display: flex; flex-direction: column; gap: 80px; margin-top: 50px; position: relative; z-index: 10; }
.projet-card { width: 42%; background: rgba(15, 23, 42, 0.6); padding: 20px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08); position: relative; cursor: pointer; transition: all 0.3s ease; display: flex; flex-direction: column; backdrop-filter: blur(12px); overflow: visible; }

.projet-card:nth-child(odd) { align-self: flex-start; margin-right: auto; text-align: left; }
.projet-card:nth-child(even) { align-self: flex-end; margin-left: auto; text-align: right; }
.projet-card:hover { transform: translateY(-8px); border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); }

/* --- CONNECTEURS PROJETS --- */
.projet-card::before {
    content: '';
    position: absolute;
    top: 50%;
    height: 3px;
    width: 8.5%; 
    background: rgba(56, 189, 248, 0.4); 
    z-index: -1;
    transition: all 0.3s ease;
}
.projet-card::after {
    content: '';
    position: absolute;
    top: calc(50% - 5px); 
    width: 10px;
    height: 10px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 12px #38bdf8;
    z-index: 1;
    transition: all 0.3s ease;
}
.projet-card:nth-child(odd)::before { right: -8.5%; }
.projet-card:nth-child(odd)::after { right: -9%; }
.projet-card:nth-child(even)::before { left: -8.5%; }
.projet-card:nth-child(even)::after { left: -9%; }
.projet-card:hover::before { background: #38bdf8; box-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
.projet-card:hover::after { transform: scale(1.4); box-shadow: 0 0 15px #38bdf8; }

.projet-img-cover { width: 100%; height: 200px; object-fit: cover; border-radius: 16px; margin-bottom: 20px; filter: brightness(0.9); transition: 0.3s; }
.projet-card h3 { margin: 0 0 10px 0; color: #f8fafc; font-size: 1.4rem; font-weight: 700; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.projet-card:nth-child(even) .card-tags { justify-content: flex-end; }
.tag { background: rgba(255, 255, 255, 0.05); color: #cbd5e1; padding: 6px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; border: 1px solid rgba(255, 255, 255, 0.1); }
.carousel-container { position: relative; width: 100%; max-width: 600px; margin: 0 auto 20px; overflow: hidden; border-radius: 12px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); background: #0f172a; }
.carousel-slide { display: none; width: 100%; text-align: center; }
.carousel-slide.active { display: block; animation: fadeEffect 0.5s; }
.carousel-media { width: 100%; height: auto; max-height: 350px; object-fit: contain; display: block; }
.carousel-caption { padding: 12px; background: #1e293b; font-weight: bold; color: #e2e8f0; border-top: 1px solid rgba(255,255,255,0.1); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; padding: 10px 15px; cursor: pointer; font-size: 1.5rem; border-radius: 50%; transition: 0.3s; }
.carousel-btn:hover { background: rgba(56, 189, 248, 0.8); }
.prev { left: 10px; } .next { right: 10px; }
@keyframes fadeEffect { from {opacity: 0.4} to {opacity: 1} }
.texte-projet { text-align: left; line-height: 1.7; color: #cbd5e1; white-space: pre-line; }

/* NAVIGATION SOUS-PROJETS */
.project-navigation { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.nav-proj-btn { background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); color: #38bdf8; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 5px; }
.nav-proj-btn:hover { background: rgba(56, 189, 248, 0.2); transform: translateY(-2px); }
.nav-proj-title { color: #94a3b8; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

/* STYLE CHATS */
.cat-card { text-align: center; }
.cat-frame { width: 100px; height: 100px; border-radius: 50%; border: 3px solid #fed7aa; box-shadow: 0 4px 8px rgba(0,0,0,0.1); overflow: hidden; margin: 0 auto; position: relative; }
.cat-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.cat-img.zoom-img { transform: scale(1.3); }

/* MOBILE */
@media (max-width: 768px) {
    .objet-cliquable { width: 25vw; } 
    .pos-vsav, .pos-caserne { width: 32vw; } 
    .pos-kit { width: 35vw; } 
    .pos-radio { width: 14vw; } 
    .texte-central { width: 88%; padding: 35px 22px; } 
    .intro h1 { font-size: 2.5rem; }
    .cat-tree-container { height: 600px; width: 100%; background-size: cover; }
    .tree-floor { width: 85%; padding: 15px; margin: 0; } 
    .tree-floor:nth-child(1) { bottom: 2%; left: 50%; transform: translateX(-50%); text-align: center; border-radius: 20px; }
    .tree-floor:nth-child(1)::after { display: none; }
    .tree-floor:nth-child(1) .floor-cat { left: 50%; top: -35px; transform: translateX(-50%); }
    .tree-floor:nth-child(2) { top: 40%; left: 50%; transform: translateX(-50%); text-align: center; border-radius: 20px; }
    .tree-floor:nth-child(2)::after { display: none; }
    .tree-floor:nth-child(2) .floor-cat { left: 50%; right: auto; top: -35px; transform: translateX(-50%); }
    .tree-floor:nth-child(3) { top: 5%; left: 50%; transform: translateX(-50%); text-align: center; border-radius: 20px; }
    .tree-floor:nth-child(3)::after { display: none; }
    .tree-floor:nth-child(3) .floor-cat { left: 50%; top: -35px; transform: translateX(-50%); }
    .header-projets { padding-top: 80px; }
    .competences-container { flex-direction: column; align-items: center; gap: 30px; } 
    .tech-group { max-width: 100%; text-align: center; } 
    .tags-wrapper { justify-content: center; } 
    .liste-projets { gap: 40px; align-items: center; } 
    .projet-card { width: 100%; align-self: center !important; margin: 0 !important; text-align: left !important; }
    .projet-card:nth-child(even) .card-tags { justify-content: flex-start; }
    #roller-slalom { display: none; }
    .ligne-route { display: none; }
    .projet-card::before, .projet-card::after { display: none; }
}