body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #0f0f0f;
    color: #f0f0f0;
    overflow-x: hidden;
}

.competences-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
}

.intro {
    text-align: center;
    margin-bottom: 50px;
}

h1.typewriter {
    font-size: 2.5rem;
    overflow: hidden;
    white-space: nowrap;
    border-right: 4px solid #00C9A7;
    width: 0;
    animation: typing 4s steps(40, end) forwards, blink 1s step-end infinite;
}

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink  { 50% { border-color: transparent; } }

.desc {
    font-size: 1.2rem;
    color: #ccc;
    margin-top: 10px;
}

.skills-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 100px;
    transition: background-color 0.6s ease;
}

.skill-card {
    background: #1c1c1c;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,255,255,0.1);
    width: 300px;
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.skill-card:hover {
    box-shadow: 5px 5px 30px rgba(0,201,167,0.4), -5px -5px 30px rgba(0,124,255,0.2);
}

.skill-card h2 {
    color: #00ae97;
    margin-bottom: 15px;
}

.skill-card ul {
    list-style-type: circle;
    padding-left: 20px;
    line-height: 1.6;
}

.mmi-resume {
    margin-top: 60px;
    padding: 40px;
    background: #161616;
    border-left: 5px solid;
    border-image: linear-gradient(to top, #00C9A7, #007CFF) 1;
    opacity: 0;
    transform: translateY(30px);
    transition: background-color 0.6s ease, transform 0.6s ease, opacity 0.6s ease;
    margin-bottom: 300px;
}

.mmi-resume h2 {
    color: #01c1a7;
    margin-bottom: 15px;
}

/* Ici on RETIRE le !important sur transform pour laisser place au responsive */
[data-scroll].visible {
    opacity: 1 !important;
    transform: translateY(0);
}

/* ==== THÈME CLAIR ==== */
body.light .h1.typewriter {
    color: #00C9A7;
}

body.light .section-title {
    color: #007CFF;
}

body.light .section-title::after {
    background: linear-gradient(to right, #007CFF, #00C9A7);
}

body.light .desc {
    color: #a3a3a3;
}

body.light .skill-card h2 {
    color: #007CFF;
}

body.light .skill-card {
    background-color: #d8d8d8;
    box-shadow: 0 0 20px rgba(80, 80, 80, 0.2);
}

body.light .skills-section {
    background-color: #fef9f3;
    color: #111;
}

body.light .skill-block {
    background-color: #d8d8d8;
    color: #b6b6b6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light .skill-block p {
    color: #111;
}

body.light .mmi-resume h2 {
    color: #007CFF;
}

body.light .mmi-resume {
    color: #111;
    background-color: #d8d8d8;
}

/* === Responsive fix for the typewriter title on small screens === */
@media screen and (max-width: 600px) {
    h1.typewriter {
        font-size: 2rem;        /* légèrement plus petit */
        white-space: normal;    /* autorise le retour à la ligne */
        overflow: visible;      /* n’applique plus le masquage */
        width: auto;            /* reprend sa largeur naturelle */
    }
}
