* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Crée la grille de cartes */
    gap: 20px;
    margin-top: 30px;
}

a.service {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #121212;
    border: 1px solid #292929;
    border-radius: 12px;
    padding: 25px;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
}

a.service:hover {
    transform: translateY(-5px);
    border-color: #00ffff;
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.1);
}

a.service h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #ffffff;
}

a.service p {
    color: #a0a0a0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    border-bottom: 1px solid #222222;
}

.nav-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
}

.logo span {
    color: #00ffff;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: #ffffff;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #00ffff;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(13, 13, 13, 0.98);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition:
        transform 0.3s ease-in-out,
        opacity 0.3s ease-in-out,
        visibility 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 8px 14px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu-button:hover {
    border-color: #00ffff;
    color: #00ffff;
}

.overlay-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Caché hors de l'écran par défaut */
    width: 350px;
    max-width: 85%;
    height: 100vh;
    background-color: #0f0f0f;
    border-left: 1px solid #222222;
    z-index: 2000;
    padding: 30px;
    box-sizing: border-box;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.8);
}

.overlay-menu.active {
    right: 0 !important; /* Glisse vers l'écran au clic */
}

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #00ffff;
}

.overlay-content h2 {
    color: #00ffff;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 22px;
}

.overlay-content p {
    color: #aaaaaa;
    font-size: 14px;
    margin-bottom: 20px;
}

.overlay-links {
    list-style: none;
    padding: 0;
}

.overlay-links li {
    margin-bottom: 12px;
}

.overlay-links a {
    color: #ffffff;
    display: block;
    padding: 12px;
    background-color: #151515;
    border: 1px solid #222222;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.overlay-links a:hover {
    border-color: #00ffff;
    color: #00ffff;
}

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 30%, #003c3c 0%, transparent 40%);
}

.hero-content {
    padding: 100px 0;
    text-align: center; /* Centrage des textes */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-small {
    color: #00ffff;
    font-size: 20px;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(50px, 8vw, 90px);
    line-height: 1;
    margin-bottom: 20px;
}

.hero h1 span {
    color: #00ffff;
}

.hero h2 {
    color: #bbbbbb;
    font-size: clamp(22px, 4vw, 35px);
    margin-bottom: 25px;
}

.hero-text {
    max-width: 700px;
    color: #cccccc;
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centrage des boutons */
    gap: 15px;
    margin-top: 35px;
}

.button {
    display: inline-block;
    padding: 13px 25px;
    background-color: #00ffff;
    color: #0f0f0f;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid #00ffff;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-3px);
    background-color: #ffffff;
    border-color: #ffffff;
}

.button-outline {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #00ffff;
}

.button-outline:hover {
    background-color: #00ffff;
    color: #0f0f0f;
}

.section {
    padding: 100px 0;
}

.section-dark {
    background-color: rgba(9, 9, 9, 0.72);
}

.section-small {
    color: #00ffff;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 45px;
    margin-bottom: 40px;
}

.intro-text {
    max-width: 700px;
    color: #bbbbbb;
    font-size: 18px;
    margin-bottom: 40px;
}

.about p {
    color: #cccccc;
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 800px;
}

.skills,
.projects,
.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill,
.service {
    padding: 30px;
    background-color: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.skill:hover,
.service:hover {
    transform: translateY(-5px);
    border-color: #00ffff;
}

.skill h3,
.service h3 {
    color: #00ffff;
    font-size: 24px;
    margin-bottom: 10px;
}

.service h3 {
    color: #ffffff;
}

.skill p,
.service p {
    color: #aaaaaa;
}

.project {
    min-height: 280px;
    display: flex;
    align-items: flex-end;
    background-color: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project:hover {
    transform: translateY(-8px);
    border-color: #00ffff;
}

.project-content {
    padding: 30px;
}

.project-content > p:first-child {
    color: #00ffff;
    font-weight: bold;
}

.project h3 {
    font-size: 25px;
    margin: 10px 0;
}

.project p {
    color: #aaaaaa;
}

.project a {
    display: inline-block;
    margin-top: 20px;
    color: #00ffff;
}

.contact-section {
    text-align: center;
}

.contact-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-section p {
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto 30px;
}

.contact-container,
.legal {
    max-width: 800px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 700px;
}

.contact-form label {
    margin-top: 15px;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background-color: #151515;
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #00ffff;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .button {
    border: none;
    margin-top: 20px;
}

.success-message {
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #00ffff;
    border-radius: 5px;
    color: #00ffff;
}

.error-message {
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #ff5555;
    border-radius: 5px;
    color: #ff5555;
}

.legal h2 {
    color: #00ffff;
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal p {
    color: #bbbbbb;
    margin-bottom: 10px;
}

.footer {
    padding: 40px 0;
    text-align: center;
    background-color: rgba(9, 9, 9, 0.85);
    border-top: 1px solid #222222;
}

.footer p {
    color: #888888;
    margin: 5px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
}

.footer-links a {
    color: #888888;
}

.footer-links a:hover {
    color: #00ffff;
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    /* Une seule colonne sur téléphone */
    .services,
    .projects,
    .skills {
        grid-template-columns: 1fr;
    }

    /* Accueil : les cartes de projets sont empilées sur téléphone */
    .project {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-end;
    }

    .project .project {
        margin-bottom: 20px;
    }

    .hero-content {
        padding: 60px 0;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .button {
        width: 100%;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 32px;
    }
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: #0d0d0d;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: move 20s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #6366f1, transparent);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #a855f7, transparent); /* Violet */
    bottom: -150px;
    right: -100px;
    animation-duration: 25s;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06b6d4, transparent); /* Cyan */
    top: 40%;
    left: 40%;
    animation-duration: 18s;
    animation-delay: -10s;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(120px, -80px) scale(1.2);
    }
    100% {
        transform: translate(-60px, 100px) scale(0.9);
    }
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin-top: 20px;
}

.img-card {
    border-radius: 12px;
    border: 1px solid #292929;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    cursor: pointer;
}

.img-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #00ffff;
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
}

/* ==========================================================
   Pages de détail des langages (JavaScript, PHP, SQL)
   ========================================================== */

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #00ffff;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* Carte de contenu : remplace les <br> et les styles en ligne */
.service-detail {
    margin-bottom: 30px;
}

.service-detail h3 {
    color: #00ffff;
    font-size: 24px;
    margin-bottom: 12px;
}

.service-detail h4 {
    color: #00ffff;
    font-size: 1.1rem;
    margin: 24px 0 8px;
}

.service-detail p,
.service-detail li {
    color: #cccccc;
    font-size: 1rem;
}

.service-detail p {
    margin-bottom: 12px;
}

.service-detail ul {
    list-style: none;
    margin: 0 0 12px;
}

.service-detail ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
}

.service-detail ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #00ffff;
}

.service-detail ol {
    margin: 0 0 12px 22px;
}

.service-detail ol li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.service-detail code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
    color: #00ffff;
    background: #1f1f1f;
    padding: 1px 6px;
    border-radius: 4px;
}

.service-detail .note {
    color: #aaaaaa;
    font-style: italic;
    font-size: 0.95rem;
}

.service-detail .alert {
    padding: 14px 16px;
    border: 1px solid #ffaa33;
    border-radius: 6px;
    color: #ffcc77;
}

.service-detail .button {
    margin-top: 5px;
}

.service-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.service-head h3 {
    margin-bottom: 5px;
}

.service-head p {
    margin: 0;
    color: #aaaaaa;
    font-size: 0.95rem;
}

.page-end {
    margin-top: 40px;
    text-align: center;
}

/* Carte vidéo : la légende est SOUS la miniature, jamais dessus */
.video-card {
    display: block;
    margin-bottom: 25px;
    border: 1px solid #292929;
    border-radius: 12px;
    overflow: hidden;
    background: #181818;
    transition: border-color 0.3s ease;
}

.video-card:hover {
    border-color: #00ffff;
}

.video-thumb {
    position: relative;
}

.video-thumb img {
    width: 100%;
    margin: 0;
    border-radius: 0;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-thumb img {
    opacity: 1;
}

/* Bouton lecture dessiné en CSS (le caractère ▶ devient un emoji sur iPhone) */
.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.video-play::after {
    content: "";
    margin-left: 4px;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #ffffff;
}

.video-info {
    padding: 14px 16px;
}

.video-info strong {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.3;
}

.video-info span {
    display: block;
    margin-top: 4px;
    color: #00ffff;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .service-detail {
        padding: 22px;
    }

    .service-detail h3 {
        font-size: 21px;
    }
}

/* ==========================================================
   Effets « vivants » (animations, survols, apparitions)
   ========================================================== */

::selection {
    background: rgba(0, 255, 255, 0.3);
    color: #ffffff;
}

[id] {
    scroll-margin-top: 90px;
}

/* ---------- En-tête ---------- */
.header.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
    border-bottom-color: rgba(0, 255, 255, 0.25);
}

.nav a {
    position: relative;
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: #00ffff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav a:hover::after {
    transform: scaleX(1);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #a855f7);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 1500;
    pointer-events: none;
}

/* ---------- Lueur qui suit la souris (PC uniquement) ---------- */
.cursor-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 520px;
    height: 520px;
    margin: -260px 0 0 -260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.11), transparent 65%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    will-change: transform;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
}

/* quadrillage discret qui s'efface vers les bords */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 65%);
    mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 65%);
    pointer-events: none;
}

.hero-content {
    position: relative;
}

/* les éléments du hero arrivent les uns après les autres */
.hero-content > * {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.hero-content > :nth-child(1) {
    animation-delay: 0.1s;
}
.hero-content > :nth-child(2) {
    animation-delay: 0.25s;
}
.hero-content > :nth-child(3) {
    animation-delay: 0.4s;
}
.hero-content > :nth-child(4) {
    animation-delay: 0.55s;
}
.hero-content > :nth-child(5) {
    animation-delay: 0.7s;
}
.hero-content > :nth-child(6) {
    animation-delay: 0.85s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.wave {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: wave 2.6s ease-in-out 1.2s infinite;
}

@keyframes wave {
    0%,
    60%,
    100% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(14deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(10deg);
    }
}

/* « Bonte » : dégradé qui bouge */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hero h1 span {
        background: linear-gradient(90deg, #00ffff, #a5f3fc, #818cf8, #00ffff);
        background-size: 300% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation: gradientShift 6s linear infinite;
    }
}

@keyframes gradientShift {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 300% 50%;
    }
}

/* ligne « terminal » qui écrit les mots */
.hero-typing {
    min-height: 1.8em;
    margin-bottom: 25px;
    font-family: Consolas, "Courier New", monospace;
    font-size: clamp(14px, 2.4vw, 18px);
    color: #00ffff;
}

.hero-typing .prompt {
    color: #7a7a7a;
    margin-right: 6px;
}

.hero-typing .caret {
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: text-bottom;
    background: #00ffff;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* flèche en bas du hero */
.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 28px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333333;
    border-radius: 50%;
    color: #00ffff;
    font-size: 20px;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
    transition:
        border-color 0.3s ease,
        background-color 0.3s ease;
}

.scroll-cue:hover {
    border-color: #00ffff;
    background-color: rgba(0, 255, 255, 0.1);
}

@keyframes bounce {
    0%,
    100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 8px);
    }
}

/* ---------- Boutons : reflet au survol ---------- */
.button {
    position: relative;
    overflow: hidden;
}

.button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

.button:hover::after {
    animation: sweep 0.7s ease;
}

@keyframes sweep {
    to {
        left: 130%;
    }
}

/* ---------- Cartes : halo qui suit la souris ---------- */
.skills .skill,
.services .service,
article.project {
    position: relative;
}

.skills .skill::before,
.services .service::before,
article.project::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        rgba(0, 255, 255, 0.13),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.skills .skill:hover::before,
.services .service:hover::before,
article.project:hover::before {
    opacity: 1;
}

.skills .skill > *,
.services .service > *,
article.project > * {
    position: relative;
}

/* compétences cliquables */
a.skill {
    display: block;
}

a.skill h3::after {
    content: " →";
    display: inline-block;
    opacity: 0;
    transform: translateX(-8px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

a.skill:hover h3::after {
    opacity: 1;
    transform: none;
}

/* ---------- Apparition au défilement (classes ajoutées par script.js) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
    transition-delay: var(--d, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (max-width: 768px) {
    .scroll-cue {
        display: none;
    }
}

/* Respect des personnes qui réduisent les animations */
@media (prefers-reduced-motion: reduce) {
    .hero-content > * {
        opacity: 1;
        animation: none;
    }

    .wave,
    .scroll-cue,
    .orb,
    .hero h1 span,
    .hero-typing .caret {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================
   Pages complètes : compte, carrousel, tarifs, projets, légal
   ========================================================== */

/* ---------- Message flash (confirmation / erreur) ---------- */
.flash {
    position: fixed;
    top: 92px;
    right: 20px;
    z-index: 1600;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(420px, calc(100vw - 40px));
    padding: 14px 16px;
    background: #101010;
    border: 1px solid;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: flashIn 0.4s ease;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.flash-success {
    border-color: #00ffff;
    color: #00ffff;
}
.flash-error {
    border-color: #ff5555;
    color: #ff8888;
}
.flash.hide {
    opacity: 0;
    transform: translateX(20px);
}

.flash-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

@keyframes flashIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Bouton Connexion / Mon compte dans le menu ---------- */
.nav a.nav-login,
.nav a.nav-account {
    padding: 6px 14px;
    border: 1px solid #00ffff;
    border-radius: 6px;
    color: #00ffff;
}

.nav a.nav-login:hover,
.nav a.nav-account:hover {
    background: #00ffff;
    color: #0f0f0f;
}

.nav a.nav-login::after,
.nav a.nav-account::after {
    display: none;
}

/* ---------- Halo de souris : classe réutilisable ---------- */
.glow-card {
    position: relative;
}

.glow-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        320px circle at var(--mx, 50%) var(--my, 50%),
        rgba(0, 255, 255, 0.13),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glow-card:hover::before {
    opacity: 1;
}

.glow-card > :not(.price-badge) {
    position: relative;
}

/* ---------- Formulaires ---------- */
.form-hint {
    font-size: 0.9rem;
    color: #9a9a9a;
}

.form-hint a,
.form-switch a,
.inline-link,
.price-note a,
.faq-item p a,
.legal a {
    color: #00ffff;
}

.form-hint a:hover,
.form-switch a:hover,
.inline-link:hover,
.price-note a:hover,
.faq-item p a:hover,
.legal a:hover {
    text-decoration: underline;
}

.form-switch {
    margin-top: 12px;
    color: #bbbbbb;
}

.contact-form .checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    font-weight: normal;
    color: #cccccc;
}

.contact-form .checkbox-row input {
    width: auto;
    margin-top: 5px;
    padding: 0;
}

.pass-field {
    position: relative;
}

.pass-field input {
    padding-right: 52px;
}

.pass-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 6px 8px;
    background: transparent;
    border: none;
    color: #888888;
    font-size: 18px;
    cursor: pointer;
}

.pass-toggle:hover,
.pass-toggle.on {
    color: #00ffff;
}

.strength {
    height: 6px;
    background: #222222;
    border-radius: 4px;
    overflow: hidden;
}

.strength span {
    display: block;
    width: 0;
    height: 100%;
    background: #ff5555;
    transition:
        width 0.3s ease,
        background-color 0.3s ease;
}

/* ---------- Connexion sur l'accueil ---------- */
.auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
}

.auth-text p {
    color: #cccccc;
    font-size: 18px;
    margin-bottom: 20px;
}

.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    color: #cccccc;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00ffff;
    font-weight: bold;
}

.auth-card {
    padding: 30px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.auth-card:hover {
    border-color: #00ffff;
}

.auth-card h3 {
    color: #00ffff;
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-card p {
    color: #cccccc;
    margin-bottom: 20px;
}

.auth-card.contact-form {
    gap: 8px;
}

.auth-card .form-switch {
    margin-bottom: 0;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Page « Mon compte » ---------- */
.info-list {
    display: grid;
    gap: 4px;
    margin-top: 6px;
}

.info-list div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 10px 0;
    border-bottom: 1px solid #222222;
}

.info-list dt {
    width: 170px;
    color: #00ffff;
    font-weight: bold;
}

.info-list dd {
    color: #cccccc;
    word-break: break-word;
}

.service-detail .message-list {
    margin: 10px 0;
}

.service-detail .message-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid #222222;
}

.service-detail .message-list li::before {
    content: none;
}

.message-list small {
    color: #888888;
}

.danger-zone {
    border-color: #5a2020;
}

.danger-zone h3 {
    color: #ff6b6b;
}

.button-danger {
    background: #ff5555;
    border-color: #ff5555;
    color: #ffffff;
}

.button-danger:hover {
    background: #ff7777;
    border-color: #ff7777;
}

.button-disabled {
    background: transparent;
    border: 1px dashed #444444;
    color: #888888;
    cursor: default;
}

.button-disabled:hover {
    transform: none;
    background: transparent;
    border-color: #444444;
}

/* ---------- Carrousel de logos ---------- */
.logo-carousel {
    position: relative;
    overflow: hidden;
    margin: 10px 0 50px;
    padding: 20px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.logo-track {
    display: flex;
    width: max-content;
    animation: marquee 32s linear infinite;
}

.logo-carousel:hover .logo-track,
.logo-carousel:focus-within .logo-track {
    animation-play-state: paused;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 150px;
    margin-right: 28px;
    padding: 22px 10px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 12px;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.logo-item img {
    width: 64px;
    height: 64px;
    margin: 0;
    border-radius: 0;
}

.logo-item span {
    font-weight: bold;
    color: #dddddd;
}

.logo-item:hover {
    transform: translateY(-6px) scale(1.05);
    border-color: #00ffff;
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
}

/* 4 copies de la liste : on avance de la moitié = 2 copies, la boucle est invisible */
@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

/* ---------- Pages de langages ---------- */
.lang-head {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 30px;
}

.lang-head .section-title {
    margin-bottom: 0;
}

.lang-logo {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    margin: 0;
    border-radius: 0;
    filter: drop-shadow(0 0 18px rgba(0, 255, 255, 0.25));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.lang-card-logo,
.skill-logo {
    display: inline-block;
    margin: 0 10px 0 0;
    border-radius: 0;
    vertical-align: middle;
}

.lang-card-logo {
    width: 36px;
    height: 36px;
}
.skill-logo {
    width: 28px;
    height: 28px;
}

.lang-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
}

.lang-nav .button {
    align-self: center;
}

.lang-nav-link {
    display: flex;
    flex-direction: column;
    min-width: 130px;
    padding: 12px 18px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 8px;
    font-weight: bold;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.lang-nav-link small {
    color: #888888;
    font-weight: normal;
    font-size: 0.8rem;
}

.lang-nav-link:hover {
    transform: translateY(-3px);
    border-color: #00ffff;
    color: #00ffff;
}

.lang-nav-next {
    text-align: right;
}

.code-block {
    margin: 12px 0;
    padding: 16px 18px;
    background: #0b0b0b;
    border: 1px solid #292929;
    border-left: 3px solid #00ffff;
    border-radius: 8px;
    overflow-x: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e5e7eb;
}

.service-detail .code-block code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

/* ---------- Page Projets ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat {
    padding: 20px;
    text-align: center;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
}

.stat strong {
    display: block;
    color: #00ffff;
    font-size: 42px;
    line-height: 1.1;
}

.stat span {
    color: #aaaaaa;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
    overflow: hidden;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #00ffff;
}

.project-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    font-size: 56px;
    transition: transform 0.5s ease;
}

.project-card:hover .project-cover {
    transform: scale(1.08);
}

.cover-cyan {
    background: linear-gradient(135deg, #003c3c, #0b3b5c);
}
.cover-violet {
    background: linear-gradient(135deg, #2e1065, #6d28d9);
}

.project-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.project-number {
    color: #00ffff;
    font-weight: bold;
}

.project-body h3 {
    margin: 6px 0 10px;
    font-size: 24px;
}

.project-body p {
    color: #aaaaaa;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    list-style: none;
}

.tags li {
    padding: 3px 10px;
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid #333333;
    border-radius: 999px;
    color: #00ffff;
    font-size: 0.8rem;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.project-actions .button {
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* ---------- Page Services : tarifs, étapes, FAQ ---------- */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: stretch;
}

.price-card {
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 12px;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}

.price-card:hover {
    transform: translateY(-6px);
    border-color: #00ffff;
}

.price-card-featured {
    border-color: #00ffff;
    box-shadow:
        0 0 0 1px rgba(0, 255, 255, 0.3),
        0 15px 40px rgba(0, 255, 255, 0.12);
}

.price-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    background: #00ffff;
    color: #0f0f0f;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 999px;
}

.price-card h3 {
    font-size: 26px;
}

.price-for {
    margin: 4px 0 18px;
    color: #aaaaaa;
}

.price {
    margin-bottom: 20px;
}

.price small {
    display: block;
    color: #888888;
}

.price strong {
    color: #00ffff;
    font-size: 38px;
}

.price-card .check-list {
    flex: 1;
    margin-bottom: 26px;
}

.price-card .button {
    align-self: flex-start;
}

.price-note {
    max-width: 760px;
    margin-top: 30px;
    color: #aaaaaa;
}

.price-chip {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid #00ffff;
    border-radius: 999px;
    color: #00ffff;
    font-size: 0.85rem;
    font-weight: bold;
}

.timeline {
    display: grid;
    gap: 16px;
    max-width: 800px;
    margin-top: 10px;
    list-style: none;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
    transition:
        transform 0.3s ease,
        border-color 0.3s ease;
}

.step-card:hover {
    transform: translateX(6px);
    border-color: #00ffff;
}

.step-number {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #00ffff;
    border-radius: 50%;
    color: #0f0f0f;
    font-size: 20px;
    font-weight: bold;
}

.step-card h3 {
    margin-bottom: 4px;
    font-size: 20px;
}

.step-card p {
    color: #bbbbbb;
}

.step-card code {
    padding: 1px 6px;
    background: #1f1f1f;
    border-radius: 4px;
    color: #00ffff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}

.faq-item {
    margin-bottom: 12px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item:hover,
.faq-item[open] {
    border-color: #00ffff;
}

.faq-item summary {
    position: relative;
    padding: 18px 50px 18px 22px;
    font-weight: bold;
    list-style: none;
    cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 22px;
    transform: translateY(-50%);
    color: #00ffff;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
    padding: 0 22px 20px;
    color: #cccccc;
}

/* ---------- Page légale ---------- */
.legal-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.legal-toc a {
    padding: 8px 16px;
    border: 1px solid #333333;
    border-radius: 999px;
    transition:
        border-color 0.3s ease,
        color 0.3s ease;
}

.legal-toc a:hover {
    border-color: #00ffff;
    color: #00ffff;
}

.legal .todo {
    margin-bottom: 30px;
    padding: 14px 16px;
    border: 1px dashed #ffaa33;
    border-radius: 6px;
    color: #ffcc77;
}

.legal-block {
    margin-bottom: 30px;
    padding: 30px;
    background: #151515;
    border: 1px solid #292929;
    border-radius: 10px;
}

.legal-block > h2:first-child {
    margin-top: 0;
}

.legal h3 {
    margin: 22px 0 8px;
    font-size: 1.1rem;
}

.legal ul {
    margin: 8px 0 12px 20px;
    color: #bbbbbb;
}

.legal li {
    margin-bottom: 6px;
}

.legal strong {
    color: #e5e5e5;
}

/* ---------- Adaptations écran ---------- */
@media (max-width: 1000px) {
    .nav {
        gap: 16px;
        font-size: 15px;
    }
}

@media (max-width: 900px) {
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .nav a[href*="github"] {
        display: none;
    }
}

@media (max-width: 768px) {
    .flash {
        top: 90px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .lang-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .lang-logo {
        width: 56px;
        height: 56px;
    }

    .legal-block {
        padding: 22px;
    }

    .info-list dt {
        width: 100%;
    }

    .logo-item {
        width: 120px;
    }

    .step-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-track,
    .lang-logo {
        animation: none;
    }

    .logo-carousel {
        overflow-x: auto;
    }

    .logo-item[aria-hidden="true"] {
        display: none;
    }
}

/* ==========================================================
   Cookies, diagnostic, tableaux
   ========================================================== */

.cookie-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 1700;
    max-width: 760px;
    margin: 0 auto;
    padding: 24px;
    background: rgba(12, 12, 12, 0.97);
    border: 1px solid #00ffff;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    animation: flashIn 0.5s ease;
}

.cookie-banner[hidden],
.cookie-panel[hidden] {
    display: none;
}

.cookie-banner h2 {
    margin-bottom: 8px;
    color: #00ffff;
    font-size: 20px;
}

.cookie-banner p {
    margin-bottom: 16px;
    color: #cccccc;
    font-size: 0.95rem;
}

.cookie-banner a {
    color: #00ffff;
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-actions .button {
    padding: 11px 20px;
    font-size: 0.95rem;
}

.cookie-panel {
    margin-top: 18px;
    padding-top: 6px;
    border-top: 1px solid #292929;
}

.cookie-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid #222222;
    cursor: pointer;
}

.cookie-row small {
    display: block;
    margin-top: 2px;
    color: #999999;
    font-size: 0.85rem;
}

.cookie-row input {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    accent-color: #00ffff;
}

.cookie-panel .cookie-actions {
    margin-top: 16px;
}

.link-button {
    padding: 0;
    background: none;
    border: none;
    color: #888888;
    font: inherit;
    cursor: pointer;
}

.link-button:hover {
    color: #00ffff;
}

.video-placeholder {
    padding: 28px;
    text-align: center;
}

.video-placeholder:hover {
    border-color: #292929;
}

.placeholder-icon {
    display: block;
    margin-bottom: 8px;
    font-size: 42px;
}

.video-placeholder strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.video-placeholder p {
    max-width: 520px;
    margin: 0 auto 18px;
    color: #aaaaaa;
}

.video-placeholder .project-actions {
    justify-content: center;
}

.table-wrap {
    margin: 12px 0 18px;
    overflow-x: auto;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table-wrap th,
.table-wrap td {
    padding: 12px 14px;
    border: 1px solid #292929;
    text-align: left;
    vertical-align: top;
}

.table-wrap th {
    background: #1b1b1b;
    color: #00ffff;
}

.table-wrap td {
    color: #cccccc;
}

.legal code {
    padding: 1px 6px;
    background: #1f1f1f;
    border-radius: 4px;
    color: #00ffff;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}

.alert-box {
    margin-bottom: 25px;
    padding: 14px 16px;
    border: 1px solid #ffaa33;
    border-radius: 6px;
    color: #ffcc77;
}

.diag-list {
    margin: 10px 0 !important;
}

.service-detail .diag-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #222222;
}

.service-detail .diag-item::before {
    content: none;
}

.diag-item p {
    margin: 4px 0 0;
    color: #bbbbbb;
}

@media (max-width: 768px) {
    .cookie-banner {
        right: 10px;
        bottom: 10px;
        left: 10px;
        padding: 18px;
    }

    .cookie-actions .button {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* Menu lateral : defilement interne, y compris sur Safari mobile. */
#overlayMenu.overlay-menu {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
    scrollbar-width: thin;
    scrollbar-color: #00aaaa #102026;
}
#overlayMenu .overlay-content {
    min-height: 0;
    padding-bottom: 16px;
}
#overlayMenu .close-button {
    position: sticky;
    top: 0;
    right: auto;
    display: block;
    margin-left: auto;
    width: 44px;
    height: 44px;
    line-height: 1;
    z-index: 2;
    border: 1px solid #31515a;
    border-radius: 10px;
    background: #102026;
}

/* Les deux projets présentés occupent toute la largeur disponible. */
@media (min-width: 769px) {
    .page-index #projets .projects,
    .page-projets .projects-detailed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
