:root {
    /* Couleurs */
    --primary: #ff7a00;
    --primary-hover: #e66d00;
    --bg-main: #0f867caf;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-dark: #111111;
    --text-light: #ffffff;
    --text-muted: #444444;
    
    /* Ombres (Box Shadows) */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.2);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
}

/* =========================================
   RESET & BASES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    overflow-x: hidden; 
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-main); 
    color: var(--text-main);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* --- HEADER & NAV --- */
header {
    padding: 20px 5%;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky; 
    top: 0;
    z-index: 1000;
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
    justify-content: center; 
    flex-wrap: wrap; 
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 18px;
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a:focus-visible::after {
    width: 100%;
}

/* --- BOUTONS --- */
.btn {
    display: inline-block;
    margin-top: 35px;
    padding: 16px 45px;
    background: var(--text-dark);
    color: var(--text-light);
    border-radius: 40px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 122, 0, 0.3);
}

/* --- CARDS (Projets, etc.) --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-dark);
    text-align: center;
    padding: 25px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.card-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto; 
    flex-wrap: wrap;
}

.card-links a {
    padding: 8px 14px;
    background: var(--text-dark);
    color: var(--text-light);
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.card-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* --- HERO SECTION --- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 5%; 
    flex: 1;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 54px;
    margin-bottom: 30px;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.hero-img {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-img img {
    width: 100%;
    max-width: 320px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* --- SECTIONS GLOBALES --- */
.competences, .parcours, .contact-section {
    padding: 80px 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.competences h2 {
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-light); 
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.parcours h1, .contact-section h1 {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-light);
}

/* --- TIMELINE --- */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 30px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border-left: 6px solid var(--primary);
}

.timeline-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-item .date {
    display: block;
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.timeline-item h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* --- CONTACT --- */
.contact-section > p { 
    font-size: 18px;
    margin-bottom: 40px;
    color: #f0f0f0;
    text-align: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.contact-info {
    padding-left: 20px;
    border-left: 2px solid #eee;
}

.contact-info h3 {
    margin-bottom: 25px;
    font-size: 24px;
    color: var(--text-dark);
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 17px;
}

.contact-info a {
    color: #0f867c;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all; 
}

.social-icons-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.social-icons-contact img {
    width: 35px;
    height: 35px;
    transition: transform 0.3s;
}

.social-icons-contact img:hover {
    transform: translateY(-5px);
}

/* --- FOOTER --- */
footer {
    background: #000;
    color: var(--text-light);
    text-align: center;
    padding: 30px 5%;
    margin-top: auto;
    font-size: 16px;
}

.socials {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 20px;
}

.socials img {
    width: 32px;
    height: 32px;
    transition: var(--transition-normal);
}

.socials img:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

/* --- SKILLS GRID --- */
.skills-grid-container {
    margin-top: 60px;
}

.main-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.skill-header h3 {
    font-size: 22px;
    color: var(--text-dark);
    font-weight: 700;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap; 
    gap: 10px;
}

.tag {
    background: #f4f6f8; 
    color: var(--text-muted); 
    padding: 8px 16px;
    border-radius: 50px; 
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.tag:hover {
    background: var(--primary); 
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 122, 0, 0.3);
}


/* Tablette et petits ordinateurs */
@media screen and (max-width: 900px) {
    nav ul {
        gap: 20px;
    }

    .hero {
        flex-direction: column; 
        text-align: center;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-img {
        margin-top: 20px;
        width: 100%;
    }

    .timeline-item {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }

    .timeline-item img {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 30px;
    }

    .contact-info {
        padding-left: 0;
        border-left: none;
        border-top: 2px solid #eee;
        padding-top: 30px;
        text-align: center;
    }
    
    .contact-action {
        align-items: center;
        text-align: center;
    }
    
    .social-icons-contact {
        justify-content: center;
    }
}

/* =========================================
   NOUVEAU : Téléphones 
   ========================================= */
@media screen and (max-width: 600px) {
    header {
       
        padding: 15px 0; 
    }

    nav ul {
        /* Horizontal et défilant  */
        flex-direction: row; 
        flex-wrap: nowrap; 
        justify-content: flex-start;
        overflow-x: auto; /* Permet le scroll au doigt */
        gap: 25px;
        padding: 0 5%; /* On remet les marges ici */
        -webkit-overflow-scrolling: touch; /* Scroll fluide sur téléphone */
        
        
        scrollbar-width: none; 
        -ms-overflow-style: none; 
    }
    nav ul::-webkit-scrollbar {
        display: none; 
    }

    nav a {
        font-size: 15px;
        display: block;
        white-space: nowrap; 
        padding: 5px 0; 
    }

   
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .parcours h1, .contact-section h1 {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .competences h2, .main-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .timeline-item {
        padding: 20px 15px; 
    }

    .timeline-item img {
        width: 80px; 
        height: 80px;
    }

    .timeline-item h3 {
        font-size: 20px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 16px;
    }

    .hero, .competences, .parcours, .contact-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .card {
        padding: 20px 15px;
    }

    .skill-card {
        padding: 20px;
    }

    .contact-container {
        padding: 25px 15px;
    }
}

/* Très petits écrans */
@media screen and (max-width: 380px) {
    .cards, .skills-grid {
        grid-template-columns: 1fr; 
    }

    .hero h1 {
        font-size: 28px;
    }
}