* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #0ea5e9;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --success: #10b981;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Augmentation légère de la taille globale des polices */
html {
    font-size: 112%; /* ~1.12x la taille par défaut (ajuste les rem) */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    position: relative;
    overflow: visible; /* changed from hidden to visible so 3D items aren't clipped */
    padding: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient);
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    top: -200px;
    right: -200px;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
}

/* --- HERO / WHEEL (remplacement propre des blocs conflictuels) --- */

/* layout du hero : une grille côte texte + roue */
.hero-content {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* zone image : conteneur centré */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

/* --- Ajustements pour rendre la WHEEL visible et fiable --- */

/* autoriser l'affichage 3D complet dans le hero (évite que la roue soit découpée) */
.hero {
    /* ...existing rules... */
    overflow: visible; /* changed from hidden to visible so 3D items aren't clipped */
}

/* wrapper : perspective + priorité d'affichage */
.wheel-wrapper {
    display: none !important;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    width: 100%;
    max-width: 520px;
    z-index: 6;                /* s'assurer que la roue est au-dessus des éléments décoratifs */
    overflow: visible;
}

/* wheel : surface 3D qui tourne autour de l'axe X (sens haut -> bas) */
.wheel {
    display: none !important;
    width: 420px;
    height: 420px;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transform-origin: center center;
    -webkit-transform-origin: center center;
    animation: wheel-spin 12s linear infinite;
    will-change: transform;
    z-index: 7;
    backface-visibility: hidden;
}

/* pause via classe .paused (utilisée par le script) */
.wheel.paused {
    animation-play-state: paused !important;
}

/* items : centrés et projetés sur l'axe Z
   Réduction légère du translateZ pour assurer la bonne visibilité selon la perspective */
.wheel__item {
    display: none !important;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 340px;
    margin-left: -170px;
    margin-top: -130px;
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    pointer-events: auto;
}

/* disposition pour N=3 (angles répartis) – translateZ réduit à 180px pour la lisibilité */
.wheel__item:nth-child(1) { transform: translate(-50%,-50%) rotateX(0deg)   translateZ(180px); }
.wheel__item:nth-child(2) { transform: translate(-50%,-50%) rotateX(120deg) translateZ(180px); }
.wheel__item:nth-child(3) { transform: translate(-50%,-50%) rotateX(240deg) translateZ(180px); }

/* forcer les cards à conserver une bonne visibilité (léger rehaussement quand face) */
.wheel__item .profile-card {
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
    transform-origin: center center;
    filter: drop-shadow(0 12px 30px rgba(0,0,0,0.18));
}

/* animation : rotation autour de X, sens haut -> bas */
@keyframes wheel-spin {
    from { transform: rotateX(0deg); }
    to   { transform: rotateX(-360deg); } /* -360 pour sens haut -> bas */
}

/* fallback / mobile : empiler verticalement et désactiver l'animation */
@media (max-width: 900px) {
    .wheel {
        width: 100%;
        height: auto;
        animation: none;
        transform: none;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .wheel__item {
        position: static;
        margin: 0;
        width: 100%;
        transform: none !important;
    }

    .wheel-wrapper { perspective: none; }
}

/* accessible motion preference */
@media (prefers-reduced-motion: reduce) {
    .wheel { animation: none !important; }
}

/* ajustements de taille des avatars / logos à l'intérieur des cards (réutilise styles existants) */
.profile-card .profile-img,
.utec-card .profile-img,
.paris1-card .profile-img {
    width: 180px;
    height: 180px;
}

/* --- fin bloc HERO / WHEEL --- */

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInLeft 1s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-text h2 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    transform: translateY(0);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Positionnement vertical différencié des trois cards dans le hero :
   - la profile-card par défaut en haut,
   - .utec-card en bas,
   - .paris1-card au centre (hauteur intermédiaire). */
.hero-image {
    display: flex;           /* déjà présent */
    gap: 1.5rem;
    flex-wrap: nowrap;       /* préférer une ligne sur grand écran */
    justify-content: center;
    align-items: stretch;    /* permet aux align-self de jouer */
}

/* forcer la première profile-card (votre carte) en haut */
.profile-card {
    align-self: flex-start;
    min-width: 280px;
    max-width: 320px;
}

/* UTEC : alignée en bas pour créer l'effet décalé */
.utec-card {
    align-self: flex-end;
}

/* Nouvelle carte Paris 1 : alignée au centre (hauteur intermédiaire) */
.paris1-card {
    align-self: center;
}

/* image et conteneur de la carte Paris1 (calqué sur utec-card) */
.paris1-card .profile-img,
.paris1-card .profile-img img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 36px rgba(2,6,23,0.32);
    background: transparent;
}

/* harmoniser le texte */
.paris1-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;

}

/* responsive : sur petits écrans, empiler les trois cartes et annuler les align-self */
@media (max-width: 900px) {
    .hero-image {
        flex-wrap: wrap;
        align-items: center;
    }

    .profile-card,
    .utec-card,
    .paris1-card {
        align-self: center !important;
        width: 100%;
        max-width: 420px;
    }

    .hero-content {
        grid-template-columns: 1fr; /* déjà présent mais réaffirmé pour sécurité */
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-card {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--gradient);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #27275c;
    font-weight: 650;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

/* variante UTEC de la profile-card : réutilise le style de profile-card */
.utec-card .profile-img {
    /* remplacer le cercle dégradé par un conteneur d'image */
    /*background: transparent;*/
    border-radius: 50%;    /* coin arrondi adapté au logo */
    width: 200px;
    height: 200px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;

}

/* image à l'intérieur */
.utec-card .profile-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ajustements texte pour harmoniser avec profile-card */
.utec-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: ;
}

/* responsive : réduire légèrement le logo sur petits écrans */
@media (max-width: 768px) {
    .utec-card .profile-img {
        width: 120px;
        height: 120px;
    }
}

/* Section Commune */
section {
    padding: 10rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Section title + logo (utilisé pour #formation) */
.section-title-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.section-title-with-logo .section-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    padding: 6px;
    box-shadow: 0 6px 18px rgba(2,6,23,0.12);
    flex-shrink: 0;
}

.section-title-with-logo .section-title {
    margin: 0;
    font-size: 2rem;
    padding-bottom: 0;
}

/* Responsive : empiler logo au-dessus du titre sur petits écrans */
@media (max-width: 600px) {
    .section-title-with-logo {
        flex-direction: column;
        text-align: center;
    }

    .section-title-with-logo .section-logo {
        width: 56px;
        height: 56px;
    }

    .section-title-with-logo .section-title {
        font-size: 1.6rem;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    background: var(--dark-light);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-text h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.timeline {
    position: relative;
    padding-top: 5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 5px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--dark);
}

.timeline-item h4 {
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.timeline-item .date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Services Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--text);
    margin-bottom: 0.8rem;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    position: relative;
    z-index: 1;
}

.skill-category {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.8s ease, opacity 0.6s ease, transform 0.3s ease;
    opacity: 0;
    background-color: rgba(30, 41, 59, 0); /* transparent initial */
}

.skill-category.visible {
    opacity: 1;
    background-color: var(--dark-light); /* fade to this color */
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-item {
    margin-bottom: 1.5rem;
    display: block;
    /* garder la structure verticale, espacement clair entre meta et barre */
    margin-bottom: 0.9rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    color: var(--text);
    font-weight: 500;
}

.skill-level {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.skill-bar {
    /* ne pas prendre toute la largeur du container */
    width: min(84%, 520px);     /* largeur maximale raisonnable */
    margin: 0.35rem auto 0;     /* centré horizontalement */
    height: 14px;               /* plus épais */
    background: rgba(255,255,255,0.06);
    border-radius: 12px;        /* arrondi adapté à la hauteur */
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 12px;
    transition: width 1s ease;
    box-shadow: 0 6px 18px rgba(37,99,235,0.12);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.badge {
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.badge:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--dark-light);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card.upcoming {
    background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.005));
    border: 1px dashed rgba(255,255,255,0.06);
    opacity: 0.95;
    transform: none;
    cursor: default;
}

.project-card.upcoming .project-image {
    background: linear-gradient(90deg, rgba(59,130,246,0.12), rgba(14,165,233,0.06));
    color: var(--primary);
}

.project-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-image::after {
    opacity: 1;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: var(--text);
    margin-bottom: 0.8rem;
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--primary);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.project-link:hover {
    color: var(--secondary);
}

/* badge "Bientôt" style pour lien désactivé */
.project-link.disabled {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: default;
    text-decoration: none;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--dark-light);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-form {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    margin-top: 1rem;
}

/* Footer */
footer {
    background: var(--dark-light);
    padding: 3rem 2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* About - ligne supplémentaire pour compétences clés */
.about-extra {
    grid-column: 1 / -1; /* occupe toute la largeur du grid .about-content */
    margin-top: 2.5rem;
}

.key-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* key-skill : affichage avec logo (taille des logos augmentée) */
.key-skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: var(--dark-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* conteneur du logo (fond léger, arrondi) - plus grand */
.skill-logo-wrap {
    width: 96px;               /* augmenté */
    height: 96px;              /* augmenté */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;       /* ajusté */
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    box-shadow: 0 12px 36px rgba(2,6,23,0.45);
    padding: 10px;             /* augmenté */
}

/* image du logo - conserve le ratio et remplit le conteneur */
.skill-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: none;
}

/* titre et texte */
.key-skill h4 {
    color: var(--primary);
    margin: 0;
    font-size: 1.5rem;
}

.key-skill p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* légende sous les logos des key-skills */
.skill-logo-caption {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.2px;
}

/* petit ajustement responsive si nécessaire */
@media (max-width: 768px) {
    .skill-logo-caption {
        font-size: 0.85rem;
    }
}

/* Hover */
.key-skill:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    border-color: rgba(37,99,235,0.12);
}

/* Responsive : logos plus petits sur écrans étroits */
@media (max-width: 768px) {
    .skill-logo-wrap {
        width: 72px;   /* réduit pour petits écrans */
        height: 72px;
        border-radius: 12px;
        padding: 8px;
    }

    .skill-logo-item {
        width: 72px;
    }

    .skill-logo-item .skill-logo-wrap {
        width: 56px;
        height: 56px;
        padding: 6px;
    }

    .key-skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Responsive : très petits écrans */
@media (max-width: 480px) {
    .skill-logo-wrap {
        width: 56px;
        height: 56px;
        padding: 6px;
    }

    .skill-logo-item {
        width: 48px;
    }

    .skill-logo-item .skill-logo-wrap {
        width: 44px;
        height: 44px;
        padding: 5px;
    }

    .skill-logo-item .skill-logo-caption {
        font-size: 0.78rem;
    }
}

/* Ligne de logos pour key-skill */
.skill-logos-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.skill-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 96px; /* largeur fixe augmentée pour alignement */
}

/* Adapter le conteneur logo existant pour s'ajuster dans le petit item (plus grand) */
.skill-logo-item .skill-logo-wrap {
    width: 80px;   /* augmenté depuis 56 */
    height: 80px;  /* augmenté depuis 56 */
    padding: 8px;
    border-radius: 14px;
}

.skill-logo-item .skill-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* légende (déjà existante) — s'assurer qu'elle reste lisible pour les items en ligne */
.skill-logo-item .skill-logo-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.2px;
}

/* Responsive : réduire encore la taille sur petits écrans */
@media (max-width: 480px) {
    .skill-logo-item {
        width: 48px;
    }
    .skill-logo-item .skill-logo-wrap {
        width: 44px;
        height: 44px;
        padding: 5px;
    }
    .skill-logo-item .skill-logo-caption {
        font-size: 0.78rem;
    }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .formation-content {
        grid-template-columns: 1fr;
    }

    .bts-desc {
        margin-top: 1rem;
    }
}

/* Responsive : empilement sur petit écran */
@media (max-width: 768px) {
    .key-skills-grid {
        grid-template-columns: 1fr;
    }

    /* ajustement spacing si nécessaire */
    .about-extra {
        margin-top: 1.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-light);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .about-content,
    .skills-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.bts-desc {
    grid-column: 2 / 3; /* occupe la colonne de droite */
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 1rem;
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);

    /* Limitation visuelle */
    max-height: 320px;        /* hauteur affichée par défaut */
    overflow: hidden;         /* cache le reste */
    position: relative;
    transition: max-height 0.45s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: pointer;          /* indique l'interaction */
}

/* overlay de dégradé en bas pour signaler du contenu caché */
.bts-desc::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4.5rem;
    background: linear-gradient(180deg, rgba(15,23,42,0), rgba(15,23,42,0.95));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Sur hover (desktop) : étendre pour montrer le contenu */
.bts-desc:hover,
.bts-desc.visible:hover,
.bts-desc.expanded {
    max-height: 2000px;      /* assez grand pour révéler le contenu (animation) */
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    transform: translateY(-6px);
}

/* Quand développé, permettre le scroll intérieur si contenu dépasse */
.bts-desc.expanded {
    overflow: auto;
}

/* masquer l'overlay quand la carte est ouverte */
.bts-desc.expanded::after,
.bts-desc:hover::after {
    opacity: 0;
}

/* accessibilité : focus keyboard */
.bts-desc:focus {
    outline: 3px solid rgba(37,99,235,0.12);
}

/* petite adaptation responsive : réduire hauteur par défaut sur petits écrans */
@media (max-width: 900px) {
    .bts-desc {
        max-height: 420px; /* laisser un peu plus sur mobile avant expansion */
    }
}

/* Section divider stylisé — design propre et distinct */
.section-divider {
    width: 100%;
    height: 72px;                 /* hauteur visible */
    position: relative;
    overflow: visible;
    pointer-events: none;
    background: transparent;      /* fond géré par pseudo-éléments */
}

/* forme principale : coupe diagonale douce (skew pour netteté) */
.section-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    /* couleur s'appuyant sur le thème pour une bonne transition entre sections */
    background: linear-gradient(180deg, rgba(30,41,59,1) 0%, rgba(15,23,42,1) 100%);
    transform-origin: left top;
    transform: skewY(-4deg);
    box-shadow: 0 8px 30px rgba(2,6,23,0.45); /* léger relief */
    z-index: 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

/* trait central coloré distinct pour attirer l'œil (gradient thin bar) */
.section-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(50% - 4px);
    width: min(720px, 80%);
    height: 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(102,126,234,1) 0%, rgba(59,130,246,1) 40%, rgba(14,165,233,1) 100%);
    box-shadow: 0 8px 24px rgba(37,99,235,0.12);
    z-index: 1;
    opacity: 0.95;
    pointer-events: none;
}

/* variante retournée pour alterner sens visuel proprement */
.section-divider.invert {
    transform: rotate(180deg);
}

/* réduction et ajustement sur petits écrans pour garder propreté */
@media (max-width: 900px) {
    .section-divider {
        height: 48px;
    }

    .section-divider::before {
        transform: skewY(-3deg);
        box-shadow: 0 6px 18px rgba(2,6,23,0.45);
    }

    .section-divider::after {
        top: calc(50% - 3px);
        height: 6px;
        width: min(420px, 86%);
        border-radius: 5px;
        opacity: 0.95;
    }
}

/* utilitaire : masquer si nécessaire */
.section-divider.hidden {
    display: none;
}

/* Formation : grid layout plus flexible et agencement contrôlé */
.formation-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* colonnes flexibles */
    grid-template-areas:
        "intro details"
        "list   bts";
    gap: 1rem 2rem;             /* row-gap plus petit, column-gap conservé */
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
    grid-auto-flow: dense;
}

/* assignation des zones pour assurer l'ordre voulu */
.formation-intro { grid-area: intro; }
.formation-details { grid-area: details; }
.formation-list {
    grid-area: list;
    align-self: start;
    margin-top: 0;             /* suppression d'espace superflu */
}
.bts-desc {
    grid-area: bts;
    align-self: start;
    margin-top: 0;
}

/* Nouvelle règle : conserver explicitement les backgrounds des éléments de la grille */
.formation-content > .formation-intro,
.formation-content > .formation-details,
.formation-content > .formation-list,
.formation-content > .bts-desc {
    /* même look que les "cartes" du site */
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1.75rem;
    border-radius: 12px;
    color: var(--text);
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

/* garder la réduction visuelle / overlay de .bts-desc (règles existantes non modifiées) */

/* Section Entreprise — grille empilée : éléments à la suite (une colonne) */
.entreprise-content {
    display: grid;
    grid-template-columns: 1fr;     /* une colonne : les div s'empilent */
    /* suppression des grid-template-areas multi-colonnes */
    gap: 1.25rem;                   /* espacement vertical constant */
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
    grid-auto-flow: row;
}

/* zones : on peut garder les sélecteurs mais ils ne forcent plus de positionnement */
.entreprise-intro { /* ...existing code... */ }
.entreprise-details { /* ...existing code... */ }
.role-desc { /* ...existing code... */ }

/* garder explicitement les backgrounds / bordures / padding des cartes */
.entreprise-content > .entreprise-intro,
.entreprise-content > .entreprise-details,
.entreprise-content > .role-desc {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1.5rem;
    border-radius: 12px;
    color: var(--text);
    box-shadow: 0 12px 36px rgba(2,6,23,0.18);
}

/* responsive : conserve l'empilement et réduit les paddings sur petits écrans */
@media (max-width: 900px) {
    .entreprise-content {
        gap: 1rem;
    }

    .entreprise-content > .entreprise-intro,
    .entreprise-content > .entreprise-details,
    .entreprise-content > .role-desc {
        padding: 1.25rem;
    }
}

/* Couleur des titres dans les différentes grilles (Services / Projets / Skills / Formation / Entreprise) */
.services-grid h3,
.service-card h3,
.projects-grid h3,
.project-card h3,
.project-content h3,
.skills-container h3,
.skill-category h3,
.key-skill h4,
.formation-content h3,
.formation-content h4,
.formation-list h4,
.formation-details h4,
.entreprise-content h3,
.entreprise-content h4,
.entreprise-list h4 {
    color: var(--primary); /* uniformisé avec les autres titres */
}

/* 2) Numérotation pour les listes importantes */

/* key-figures (déjà utilisées dans plusieurs endroits) — badge numéroté */
.key-figures {
    counter-reset: kf; /* réinitialise le compteur */
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.key-figures li {
    counter-increment: kf;
    position: relative;
    padding-left: 3.2rem; /* espace pour le badge numérique */
}

/* badge numérique à gauche */
.key-figures li::before {
    content: counter(kf) ".";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(37,99,235,0.12);
    font-size: 0.95rem;
}

/* variante visuelle plus sobre si .formation-list garde style différent (déjà stylée) */
.formation-list .key-figures li::before {
    background: var(--secondary);
}

/* 2b) Numérotation pour la liste générique dans .bts-desc (plain <ul>) */
.bts-desc ul {
    counter-reset: btsList;
    list-style: none;
    padding-left: 0;
    margin: 0.6rem 0 0 0;
}

.bts-desc ul li {
    counter-increment: btsList;
    position: relative;
    padding-left: 3.2rem;
    margin-bottom: 0.6rem;
}

.bts-desc ul li::before {
    content: counter(btsList) ".";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(37,99,235,0.12);
    font-size: 0.95rem;
}

/* Responsive : adapter l'espace pour le badge sur petits écrans */
@media (max-width: 600px) {
    .key-figures li,
    .bts-desc ul li {
        padding-left: 2.6rem;
    }

    .key-figures li::before,
    .bts-desc ul li::before {
        min-width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
}

/* Remplacement : utiliser des marqueurs (puces) au lieu des badges numériques */
.key-figures,
.bts-desc ul,
.formation-details .key-figures,
.formation-list .key-figures {
    list-style: disc inside; /* puces intégrées */
    padding-left: 1rem;
    margin: 0.5rem 0;
}

/* harmoniser les éléments de liste : pas d'espace réservé pour les badges */
.key-figures li,
.bts-desc ul li,
.formation-details .key-figures li,
.formation-list .key-figures li {
    position: relative;
    padding-left: 0;
    margin-bottom: 0.5rem;
}

/* neutraliser tous les pseudo-éléments ::before qui ajoutaient les numéros */
.key-figures li::before,
.bts-desc ul li::before,
.formation-details .key-figures li::before,
.formation-list .key-figures li::before {
    content: none !important;
    display: none !important;
}

/* Responsive : ajuster simplement le padding sur petits écrans */
@media (max-width: 600px) {
    .key-figures,
    .bts-desc ul,
    .formation-details .key-figures,
    .formation-list .key-figures {
        padding-left: 0.8rem;
    }
}

/* Override pour placer role-desc sous les deux autres éléments et supprimer l'effet hover/expansion */
.role-desc {
    grid-column: 1 / -1;      /* occupe toute la largeur de la grille entreprise-content */
    align-self: start;
    margin-top: 0;
    /* afficher tout le contenu normalement (plus d'effets d'agrandissement au hover) */
    max-height: none !important;
    overflow: visible !important;
    cursor: default;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12); /* même style que les autres cartes */
    transition: none;
}

/* masquer l'overlay de dégradé et neutraliser le ::after spécifique à .bts-desc */
.role-desc::after {
    display: none !important;
    content: none !important;
}

/* neutraliser toute règle hover/expanded appliquée via .bts-desc */
.role-desc:hover,
.role-desc.expanded,
.role-desc:focus {
    transform: none !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12) !important;
    max-height: none !important;
    overflow: visible !important;
    outline: none !important;
}

/* Nouveau : container unique des compétences triées par genre */
.skills-single-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* chaque genre = carte */
.skill-genre {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1.5rem;
    border-radius: 12px;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* titre des genres */
.skill-genre h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.15rem;
}

/* liste interne */
.skill-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* item */
.skill-item {
    display: block;
    /* garder la structure verticale, espacement clair entre meta et barre */
    margin-bottom: 0.9rem;
}

/* meta ligne : nom + pourcentage */
.skill-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.skill-name {
    color: var(--text);
    font-weight: 600;
}

.skill-level {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* reuse existing .skill-bar .skill-progress styling */
.skill-bar {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    transition: width 1s ease;
}

/* hover léger sur la carte genre */
.skill-genre:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.20);
    border-color: rgba(37,99,235,0.08);
}

/* responsive : empilement et espacement réduit */
@media (max-width: 900px) {
    .skills-single-container {
        grid-template-columns: 1fr;
    }
}

/* Formation header : logo + titre */
.formation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.logo-utec {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    padding: 8px;
    box-shadow: 0 8px 22px rgba(2,6,23,0.12);
    flex-shrink: 0;
}

/* ajustement du titre à côté du logo */
.formation-intro h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary);
}

/* responsive : empiler logo au-dessus du titre sur petits écrans */
@media (max-width: 600px) {
    .formation-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo-utec {
        width: 72px;
        height: 72px;
    }

    .formation-intro h3 {
        font-size: 1.15rem;
    }
}

/* --- Remplacement : neutraliser la WHEEL 3D et afficher les cards côte à côte --- */

/* masquer les anciens helpers wheel (sécurité si restaient ailleurs) */
.wheel-wrapper,
.wheel,
.wheel__item {
    display: none !important;
    animation: none !important;
}

/* nouveau conteneur pour les trois cards dans le hero */
.hero-cards {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* forcer largeur cohérente des cards dans la rangée */
.hero-cards .profile-card {
    width: 320px;
    max-width: calc(100% - 2rem);
    box-sizing: border-box;
}

/* ajuster légèrement l'apparence des avatars/logos pour la rangée */
.hero-cards .profile-img,
.hero-cards .profile-img img {
    width: 160px;
    height: 160px;
}

/* override : annuler toute transform liée à la wheel */
.hero-cards .profile-card {
    transform: none !important;
}

/* responsive : empiler les cards sur mobile */
@media (max-width: 900px) {
    .hero-cards {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .hero-cards .profile-card {
        width: 100%;
        max-width: 720px;
    }

    .hero-cards .profile-img,
    .hero-cards .profile-img img {
        width: 140px;
        height: 140px;
    }
}

/* --- Nouvelle animation : faire apparaître les cards l'une après l'autre dans le même emplacement --- */

/* conteneur compact centré : fixe la largeur pour empiler correctement */
.hero-cards {
    position: relative;
    width: 260px;                /* largeur du conteneur : adapte selon la taille des cards */
    height: 360px;               /* hauteur suffisante pour la card */
    margin: 0 auto;
    display: block;              /* plus de flex row */
    overflow: visible;
    pointer-events: none;        /* laisser pointer-events aux cartes elles‑mêmes */
}

/* chaque carte est positionnée au centre du conteneur et superposée */
.hero-cards .profile-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;                /* largeur de la carte (doit être <= .hero-cards width) */
    max-width: 100%;
    transform: translate(-50%, -50%) scale(0.98);
    margin: 0;
    opacity: 0;
    pointer-events: auto;        /* rend la carte cliquable/interactable */
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    will-change: opacity, transform;
    /* animation : 3 cartes × 3s chacune => total 9s ; boucle infinie */
    animation-name: cardCycle;
    animation-duration: 9s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

/* décalages pour chaque carte (ordre d'apparition) */
.hero-cards .profile-card:nth-child(1) { animation-delay: 0s;  }
.hero-cards .profile-card:nth-child(2) { animation-delay: 3s;  }
.hero-cards .profile-card:nth-child(3) { animation-delay: 6s;  }

/* animation keyframes : fade in -> visible -> fade out */
@keyframes cardCycle {
    0%   { opacity: 0; transform: translate(-50%,-50%) translateY(12px) scale(0.98); }
    6%   { opacity: 1; transform: translate(-50%,-50%) translateY(0)    scale(1); }
    30%  { opacity: 1; transform: translate(-50%,-50%) translateY(0)    scale(1); }
    36%  { opacity: 0; transform: translate(-50%,-50%) translateY(-12px) scale(0.98); }
    100% { opacity: 0; transform: translate(-50%,-50%) translateY(-12px) scale(0.98); }
}

/* mettre pause quand l'utilisateur survole ou focus la zone, pour lecture/accessibilité */
.hero-cards:hover .profile-card,
.hero-cards:focus-within .profile-card {
    animation-play-state: paused !important;
    cursor: default;
}

/* léger highlight pour la carte active (visible) via filtre lors de son cycle naturel */
.hero-cards .profile-card:where(:not([aria-hidden="true"])) {
    /* noop — placeholder si besoin d'amélioration JS. */
}

/* Responsive : sur petits écrans, revenir à un empilement classique (pas d'overlay) */
@media (max-width: 900px) {
    .hero-cards {
        position: static;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cards .profile-card {
        position: relative;
        transform: none;
        opacity: 1;
        animation: none;
        width: 100%;
        max-width: 720px;
    }

    .hero-cards .profile-img,
    .hero-cards .profile-img img {
        width: 140px;
        height: 140px;
    }
}

/* OVERRIDES : forcer les cartes du hero à être côte à côte */
.hero-image {
    /* garantir que le conteneur parent permette une ligne stable */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0;
    gap: 0;
}

/* conteneur des cartes : ligne unique sur grand écran */
.hero-cards {
    display: flex !important;
    flex-direction: row;
    gap: 1.5rem;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;            /* aucune rupture sur grand écran */
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* chaque carte a une largeur fixe / flexible pour rester en ligne */
.hero-cards .profile-card {
    flex: 0 0 320px;              /* fixe mais permet réduction si besoin */
    max-width: 320px;
    box-sizing: border-box;
    align-self: stretch !important; /* annule les align-self hérités */
    margin: 0;
}

/* logos / avatars : taille légèrement réduite pour tenir côte à côte */
.hero-cards .profile-img,
.hero-cards .profile-img img {
    width: 160px;
    height: 160px;
}

/* si l'espace horizontal manque, laisser le conteneur défiler horizontalement */
.hero-cards {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem; /* petit espace pour le scroll */
}

/* masquer scrollbar esthétique (optionnel, conserve scroll) */
.hero-cards::-webkit-scrollbar { height: 8px; }
.hero-cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 8px; }

/* Override : retirer la scrollbar visible pour .hero-cards tout en conservant le scrolling tactile */
.hero-cards {
    overflow-x: auto !important;       /* conserve le scroll si nécessaire (touch) */
    -webkit-overflow-scrolling: touch; /* inertial scroll sur iOS */
    -ms-overflow-style: none;          /* Internet Explorer / Edge */
    scrollbar-width: none;             /* Firefox */
}

/* masquer la scrollbar pour WebKit (Chrome, Safari) */
.hero-cards::-webkit-scrollbar {
    height: 0;
    background: transparent;
}

/* Si vous préférez totalement supprimer le comportement de scroll (aucun overflow), décommentez :
.hero-cards { overflow-x: visible !important; }
*/

/* Responsive : sur petits écrans, empiler verticalement */
@media (max-width: 900px) {
    .hero-cards {
        flex-wrap: wrap;
        flex-direction: column;
        gap: 1.25rem;
        overflow: visible;
    }

    .hero-cards .profile-card {
        flex: 0 0 auto;
        max-width: 720px;
        width: 100%;
    }

    .hero-cards .profile-img,
    .hero-cards .profile-img img {
        width: 140px;
        height: 140px;
    }
}

/* OVERRIDES — rendre les cartes du hero plus compactes */
.hero {
    min-height: 80vh;               /* moins haute que 100vh */
    padding: 1.25rem;               /* moins d'espace vertical */
}

.hero-content {
    gap: 2rem;                      /* réduire l'écart texte/image */
}

/* Conteneur des cartes : serrer l'espacement */
.hero-cards {
    gap: 1rem;                      /* espacement horizontal réduit */
    overflow-x: hidden;             /* éviter scroll horizontal par défaut */
}

/* Cartes : largeur et padding réduits pour prendre moins de place */
.hero-cards .profile-card,
.hero-cards .profile-card.utec-card,
.hero-cards .profile-card.paris1-card {
    flex: 0 0 240px;                /* largeur fixe plus compacte */
    max-width: 240px;
    padding: 1rem;                  /* padding réduit */
    border-radius: 14px;            /* légèrement plus petit */
    box-shadow: 0 14px 40px rgba(0,0,0,0.22); /* ajuster l'ombre pour compacité */
}

/* Avatars / logos : plus petit pour économiser de l'espace */
.profile-card .profile-img,
.hero-cards .profile-img,
.hero-cards .profile-img img,
.utec-card .profile-img,
.paris1-card .profile-img {
    width: 120px;
    height: 120px;
    margin-bottom: 0.9rem;
    font-size: 3rem;                /* réduire texte avatar */
}

/* Texte dans les cartes : taille légèrement réduite pour compacité */
.hero-cards .profile-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.hero-cards .profile-card p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

/* annuler align-self qui pouvait décaler les cartes verticalement */
.profile-card,
.utec-card,
.paris1-card {
    align-self: center !important;
    transform: none !important;
}

/* Responsive : garder empilement propre sur petits écrans */
@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding: 1rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hero-cards {
        flex-direction: column;
        gap: 1rem;
        overflow-x: visible;
    }

    .hero-cards .profile-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 720px;
        padding: 1rem;
    }

    .profile-card .profile-img,
    .hero-cards .profile-img,
    .hero-cards .profile-img img {
        width: 110px;
        height: 110px;
    }

    .hero-cards .profile-card h3 { font-size: 1.05rem; }
    .hero-cards .profile-card p  { font-size: 0.95rem; }
}

/* OVERRIDE: centrer la colonne image et remonter légèrement les cards du hero */
.hero-image {
    align-items: center !important; /* s'assurer que la colonne image est centrée verticalement */
}

/* remonter légèrement le bloc .hero-cards pour qu'il soit un peu plus haut que le texte */
.hero-cards {
    transform: translateY(-6%) !important; /* ajuste la valeur pour monter/descendre */
    align-self: center !important;         /* assurer le centrage par rapport à la grille */
}

/* Sur petits écrans : annuler la translation pour éviter débordement/recouvrement */
@media (max-width: 900px) {
    .hero-cards {
        transform: none !important;
        margin-top: 0;
    }
}

/* Veille informatique */
#veille {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(18,24,38,0.98) 100%);
}

.veille-content {
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    text-align: left;
}

.veille-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

/* carte veille */
.veille-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    padding: 1.25rem;
    border-radius: 12px;
    color: var(--text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 160px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.veille-card h4 {
    margin: 0;
    color: var(--primary);
    font-size: 1.05rem;
}

.veille-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.veille-card .veille-meta {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

/* hover léger */
.veille-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(2,6,23,0.18);
}

/* responsive adjustments */
@media (max-width: 900px) {
    #veille { padding: 3rem 1rem; }
    .veille-grid { gap: 0.9rem; }
    .veille-card { padding: 1rem; min-height: auto; }
}

/* Logo UTEC placé sous le titre de section : même hauteur que le titre, sans background */
.formation-title-logo {
    display: block;
    margin: 0.6rem auto 1.25rem;
    height: 2.5rem;               /* même taille que .section-title (rem) */
    width: auto;
    object-fit: contain;
    background: transparent !important;  /* aucun fond */
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* Ajustement responsive : réduire la hauteur du logo sur petits écrans */
@media (max-width: 600px) {
    .formation-title-logo {
        height: 1.9rem;
        margin-bottom: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem; /* cohérence si titre réduit sur mobile */
    }
}
