body {
    margin: 0;
    font-family: Arial;
    background-color: #0d1117;
    color: white;
    transition: all 0.5s ease;
}
    /* l'entete */
header {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 80px 20px;
    transition: all 0.5s ease;
}

header h1 {
    font-size: 40px;
    margin: 0;
}

header p {
    font-size: 18px;
    margin-top: 40px;
    margin-right: 40px;
    opacity: 0.8;
}

.contact {
    background-color: #007bff;
    padding: 10px;
    margin-top: 20px;
    width: 250px;
    text-decoration: none;
    border-radius: 10px;
    font-family: Arial;
    font-size: 18px;
    color: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}
      /*section competences*/
section {
    padding: 60px 20px;
    margin: auto;
    width: auto;
}

.card{
    width: 400px;
    background-color: #161b22;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-top: 20px; 
    transition: all 0.3s ease;
}

.dark {
    width: 400px;
    height: 16px;
    border-radius: 10px;
    background-color: #007bff;
}

.paar {
    width: 360px;
    height: 16px;
    border-radius: 10px;
    background-color: #007bff;
}

.lopo {
    width: 180px;
    height: 16px;
    border-radius: 10px;
    background-color: #007bff;
}

.ooo {
    width: 150px;
    height: 16px;
    border-radius: 10px;
    background-color: #007bff;
}

.lll {
    width: 310px;
    height: 16px;
    border-radius: 10px;
    background-color: #007bff;
}

.merde {
    width: 80px;
    height: 16px;
    border-radius: 10px;
    background-color: #007bff;
}

.skill {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.faar {
    width: 400px;
    background-color: #161b22;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-top: 20px; 
    transition: all 0.3s ease;
}

span {
    padding-left: 20px;
    opacity: 0.5;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

footer {
    padding: 20px;
    text-align: center;
    background: #007bff;
    margin-top: 20px;
    transition: all 0.5s ease;
}

/* ========== MODE LIGHT ========== */
body.light-mode {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #0d1117;
}

.light-mode header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.light-mode .card,
.light-mode .faar {
    background-color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e4e8;
}

.light-mode .card:hover,
.light-mode .faar:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.light-mode .contact {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.light-mode .contact:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.light-mode footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========== SWITCH TOGGLE ========== */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(22, 27, 34, 0.8);
    padding: 8px 15px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid #30363d;
}

.light-mode .theme-switch-wrapper {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e1e4e8;
}

.theme-switch {
    display: inline-block;
    height: 26px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #007bff;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 18px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 18px;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-icon {
    font-size: 20px;
    color: white;
}

.light-mode .theme-icon {
    color: #0d1117;
}

/* ========== TECH BACKGROUND ANIMATION ========== */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    pointer-events: none;
}

.tech-grid {
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 123, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 123, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

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

.tech-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.3) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.code-float {
    position: absolute;
    color: rgba(0, 123, 255, 0.3);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: float 15s linear infinite;
    opacity: 0;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ========== ANIMATIONS POUR LES ÉLÉMENTS ========== */
.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

