/* ====================================================== */
/*  LIBRANUX – STYLE.CSS FINAL – PROPRE & ORGANISÉ        */
/*  Thème Synthwave / Néon – Décembre 2025                */
/*  Tout est classé par section – zéro doublon            */
/* ====================================================== */

/* === 1. PALETTE COULEURS === */
:root {
    --primary: #B84A91;         /* rose/violet */
    --primary-dark: #A72382;
    --secondary: #98BFC8;       /* bleu cyan */
    --accent: #E3DFD6;          /* beige clair */
    --bg-dark: #0C1630;
    --bg-dark-2: #031835;
    --bg-panel: #112851;
    --text-light: #E3DFD6;
    --text-muted: #B8B8C6;
}

/* === 2. RESET & BODY === */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

/* === 3. HEADER & NAVIGATION === */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-dark));
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(184,74,145,.3), inset 0 0 20px rgba(184,74,145,.1);
    border-bottom: 3px solid var(--primary);
}
nav { display: inline-block; }
nav a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 8px 16px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}
nav a::before {
    content: ''; position: absolute; bottom: -4px; left: 50%;
    width: 0; height: 2px; background: var(--secondary);
    transition: .3s; transform: translateX(-50%);
}
nav a:hover { color: var(--secondary); text-shadow: 0 0 5px var(--secondary), 0 0 10px var(--secondary); }
nav a:hover::before { width: 80%; }

/* === 4. HERO SECTION === */
.hero {
    background: url('/static/images/libra.png') center/cover no-repeat;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.3); }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }

.hero h1 { font-size: 2.8rem; margin: 0 0 30px; }
.hero h1, #typed-text {
    color: #00ff41;
    text-shadow: 0 0 2px #00ff41, 0 0 6px #00ff41;
}

/* === 5. BOUTONS GÉNÉRAUX (hero + cartes + tarifs) === */
.btn, .btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    margin: 10px 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(184,74,145,.5);
    transition: all .3s;
}
.btn {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
}
.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(184,74,145,.6), 0 0 30px var(--primary);
    border-color: var(--primary-dark);
}
.btn-secondary {
    background: linear-gradient(145deg, var(--secondary), #7ab8c5);
    color: var(--bg-dark);
    border-color: var(--secondary);
}
.btn-secondary:hover {
    box-shadow: 0 10px 30px rgba(152,191,200,.6), 0 0 30px var(--secondary);
}
.btn::before, .btn-secondary::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
    transition: left .6s;
}
.btn:hover::before, .btn-secondary:hover::before { left: 100%; }

/* === 6. CARTES SERVICES & COMPÉTENCES (même style) === */
.services-cards,
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-card,
.skill-item {
    background: var(--bg-panel);
    border: 3px solid var(--secondary);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 0 10px var(--secondary), 0 0 25px var(--secondary), 0 0 45px var(--secondary);
    transition: .3s;
}
.service-card:hover,
.skill-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px var(--secondary), 0 0 40px var(--secondary), 0 0 70px var(--secondary);
}

/* Images des cartes */
.service-card img,
.skill-item img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 20px;
}

/* Titres des cartes – SANS néon */
.service-card h3,
.skill-item h3 {
    color: var(--secondary);
    text-shadow: none;
    text-align: center;
    font-size: 1.4rem;
    margin: 0 0 15px;
}

/* ===== GALERIE ===== */
.gallery {
    text-align: center;
    margin-top: 40px;
}

.gallery h2 {
    color: var(--secondary);
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-grid figure {
    background: var(--bg-panel);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: 0.3s;
}

.gallery-grid figure:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px var(--shadow);
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.gallery-grid figcaption {
    padding: 10px;
    font-size: 0.95rem;
    background: var(--bg-dark-2);
    color: var(--text-light);
}

/* Bouton "Voir plus" dans les cartes */
.service-card .btn,
.skill-item .btn {
    margin-top: 12px;
}

/* === 7. PAGES DE DÉTAIL SERVICES (MySQL, Dev Web, etc.) === */
.service-detail h1,
.service-detail h2,
.service-detail h3,
.service-detail .service-title {
    color: var(--secondary) !important;
    text-shadow: none !important;
    text-align: left !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    margin: 30px 0 15px 5px !important;
}

/* Si jamais la classe .service-detail n’est pas présente */
body h1, body h2, body h3 {
    color: var(--secondary);
    text-shadow: none;
    text-align: left;
}

/* === 8. PAGE TARIFS === */
main section h3 {
    color: var(--secondary);
    text-shadow: none;
    font-size: 1.6rem;
    margin: 40px 0 15px 0;
    text-align: left;
}

/* === 9. SECTIONS GÉNÉRALES & MAIN === */
main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}
section {
    background: var(--bg-panel);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,.4);
}

/* Titres principaux des pages (Mes compétences, Mes tarifs…) – sans néon */
section h2 {
    color: var(--secondary);
    text-shadow: none;
    font-size: 1.8rem;
    text-align: center;
    margin: 0 0 40px;
}

/* === 10. FOOTER === */
footer {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 20px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* === 11. FORMULAIRE CONTACT & MESSAGES === */
form {
    display: flex;
    flex-direction: column;
}

form label {
    margin: 10px 0 5px 0;
    font-weight: bold;
    color: var(--secondary);
}

form input, form textarea {
    padding: 10px;
    border: 1px solid var(--primary);
    background-color: var(--bg-dark-2);
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

form textarea {
    resize: vertical;
    min-height: 100px;
}

form button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

form button:hover {
    background-color: var(--primary-dark);
}

.flash-messages li {
    background: rgba(152,191,200,.15);
    color: var(--secondary);
    border: 1px solid var(--secondary);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* === 12. RESPONSIVE === */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.4rem; }
    nav a { margin: 0 8px; font-size: .95rem; }
    .services-cards, .skills-grid { grid-template-columns: 1fr; }
}

/* === MISE EN PAGE IMAGE + TEXTE – VERSION PARFAITE === */
.service-block {
    display: flex;
    align-items: center;
    justify-content: space-between; /* pousse le contenu aux extrémités */
    gap: 50px;
    margin: 60px 0;
    flex-wrap: wrap;
}

/* On inverse l’ordre : texte d’abord le texte, ensuite l’image */
.service-text {
    flex: 1;
    min-width: 300px;
    order: 1;                     /* texte en premier */
}

.service-img {
    flex: 0 0 200px;              /* un peu plus large */
    text-align: center;
    order: 2;                     /* image en second */
}

.service-img img {
    width: 240px;                 /* ← image plus grande */
    height: 240px;
    object-fit: contain;
    padding: 20px;
    background: rgba(152,191,200,.1);
    border: 3px solid var(--secondary);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(152,191,200,.4);
}

/* Mobile : image au-dessus et centrée */
@media (max-width: 768px) {
    .service-block {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .service-img {
        flex: none;
        margin-bottom: 0 auto 30px;
    }
}

/* === LIGHTBOX PERMET D'OUVRIR L'IMAGE === */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay::after {
    content: "✕";
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* === BLOC COORDONNÉES AVEC LOGO À DROITE === */
.contact-info-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.contact-text {
    flex: 1;
    min-width: 300px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-links a img {
    width: 150px;
    height: 150px;
    transition: transform 0.3s;
}

.social-links a:hover img {
    transform: scale(1.15);
}

/* Responsive : logo au-dessus sur mobile */
@media (max-width: 768px) {
    .contact-info-block {
        flex-direction: column;
        text-align: center;
    }
    .contact-logo { order: -1; margin-bottom: 30px; }
}

.flash-messages {
    text-align: center;
    margin: 20px 0;
}
.flash-messages .success {
    color: var(--secondary);
    background: rgba(152,191,200,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--secondary);
    font-weight: bold;
}
.flash-messages .error {
    color: #ff6b6b;
    background: rgba(255,107,107,0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ff6b6b;
    font-weight: bold;
}
