/* --- portfolio-laravel/public/css/style.css --- */
/* Polices chargées via <link rel="preconnect"> dans layouts/app.blade.php */

/* =========================================================
   1. VARIABLES
   ========================================================= */
:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color-solid: #00c6ff;
    --main-color-gradient: linear-gradient(45deg, #00c6ff, #0072ff);
    --flipper-height: 5rem;
    --card-bg: rgba(255,255,255,0.05);
    --shadow-color: rgba(0,0,0,0.3);
    --glow: 0 0 0 .3rem rgba(0, 198, 255, 0.25);
}

/* Thème clair */
[data-theme="light"] {
    --bg-color: #f0f4f8;
    --second-bg-color: #dde4ee;
    --text-color: #1f242d;
    --main-color-solid: #0072ff;
    --main-color-gradient: linear-gradient(45deg, #0072ff, #00c6ff);
    --card-bg: rgba(0,0,0,0.04);
    --shadow-color: rgba(0,0,0,0.12);
    --glow: 0 0 0 .3rem rgba(0, 114, 255, 0.2);
}

/* =========================================================
   2. SKIP NAVIGATION (accessibilité clavier)
   ========================================================= */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--main-color-gradient);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 0 0 .8rem .8rem;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 9999;
    transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* =========================================================
   3. STYLES DE BASE
   ========================================================= */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    text-decoration: none; border: none; outline: none;
    font-family: 'Poppins', sans-serif;
}
html { font-size: 62.5%; overflow-x: hidden; scroll-behavior: smooth; }

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: .8rem; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--main-color-solid); border-radius: 1rem; }
::-webkit-scrollbar-thumb:hover { background: #0072ff; }
body { background: var(--bg-color); color: var(--text-color); }
section { min-height: 100vh; padding: 10rem 9% 2rem; }
.alert-success { background: #0072ff; color: white; padding: 1rem; text-align: center; border-radius: .5rem; margin: 0 auto 2rem; max-width: 70rem; font-weight: bold; }

/* =========================================================
   4. HEADER
   ========================================================= */
.header { position: fixed; top: 0; left: 0; width: 100%; padding: 2rem 9%; background: var(--bg-color); display: flex; justify-content: space-between; align-items: center; z-index: 100; transition: all .3s; }
.header.sticky { border-bottom: .1rem solid rgba(0, 0, 0, .2); }
.logo { font-size: 2.5rem; color: var(--text-color); font-weight: 600; cursor: default; }
.navbar a { font-size: 1.7rem; color: var(--text-color); margin-left: 4rem; transition: .3s; }
.navbar a:hover, .navbar a.active { color: var(--main-color-solid); }
#menu-icon { font-size: 3.6rem; color: var(--text-color); display: none; }
.theme-toggle { background: none; border: .2rem solid var(--main-color-solid); border-radius: 50%; width: 4rem; height: 4rem; display: flex; justify-content: center; align-items: center; cursor: pointer; color: var(--main-color-solid); font-size: 1.8rem; transition: all .3s ease; margin-left: auto; margin-right: 2rem; }
.theme-toggle:hover { background: var(--main-color-gradient); color: #fff; border-color: var(--main-color-solid); }

/* =========================================================
   5. SECTION ACCUEIL
   ========================================================= */
section.accueil { display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; gap: 5rem; }
.accueil-content { flex: 1 1 0; min-width: 0; }
.accueil-img { flex: 0 0 38rem; text-align: center; }
.accueil-img img { max-width: 35vw; min-width: 280px; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; border: .7rem solid var(--main-color-solid); box-shadow: var(--glow); animation: floatImage 4s ease-in-out infinite, auraGlow 6s ease-in-out infinite; }
@keyframes auraGlow { 0%, 100% { box-shadow: 0 0 0 .4rem rgba(0, 198, 255, 0.3); } 50% { box-shadow: 0 0 0 .5rem rgba(0, 114, 255, 0.35); } }
@keyframes floatImage { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2rem); } }
.accueil-content h3 { font-size: 3.2rem; font-weight: 700; }
.accueil-content h3:nth-of-type(2) { margin-bottom: 2rem; }
.accueil-content h1 { font-size: 4.8rem; font-weight: 700; line-height: 1.2; margin-bottom: 0.5rem; }
.flipper-prefix { white-space: nowrap; }
.accueil-content p, .accueil-content .description { font-size: 1.4rem; line-height: 1.8; }
.accueil-content .description * { font-size: 1.4rem; line-height: 1.8; }
.social-media a { display: inline-flex; justify-content: center; align-items: center; width: 4rem; height: 4rem; background: transparent; border-radius: 50%; font-size: 2rem; margin: 3rem 1.5rem 3rem 0; transition: .5s ease; border: .2rem solid var(--main-color-solid); color: var(--main-color-solid); }
.social-media a:hover { background: var(--main-color-gradient); color: var(--second-bg-color); }

/* =========================================================
   6. TITRES ANIMÉS (FLIPPER)
   ========================================================= */
.metiers-flipper { display: flex; align-items: center; gap: 1.5rem; font-size: 3.2rem; font-weight: 800; color: var(--text-color); }

.flipper-wrapper { height: var(--flipper-height); overflow: hidden; clip-path: inset(0); display: inline-block; position: relative; }

.flipper-container {
    display: flex;
    flex-direction: column;
    animation: slideInfinite 12s cubic-bezier(0.85, 0, 0.15, 1) infinite;
}

.flipper-item {
    height: var(--flipper-height);
    line-height: var(--flipper-height);
    white-space: nowrap;
    background: linear-gradient(to right, #00c6ff, #0072ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 198, 255, 0.7));
    animation: textShimmer 4s linear infinite;
}

/* Fallback no-JS : hardcodé pour 3 titres. Écrasé dynamiquement par main.js */
@keyframes slideInfinite {
    0%,   18.75% { transform: translateY(0); }
    25%,  43.75% { transform: translateY(-5rem); }
    50%,  68.75% { transform: translateY(-10rem); }
    75%,  93.75% { transform: translateY(-15rem); }
    100%          { transform: translateY(-15rem); }
}

@keyframes textShimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* =========================================================
   7. BOUTON UNIVERSEL
   ========================================================= */
.btn { display: inline-block; padding: 1rem 2.8rem; background: var(--main-color-gradient); border-radius: 4rem; font-size: 1.6rem; color: var(--second-bg-color); letter-spacing: .1rem; font-weight: 600; transition: .5s ease; }
.btn:hover { }

/* =========================================================
   8. TITRES DE SECTION
   ========================================================= */
.titre-section { text-align: center; font-size: 4.5rem; margin-bottom: 5rem; }
.titre-section span { background: var(--main-color-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* =========================================================
   9. SECTION EXPÉRIENCE
   ========================================================= */
.experience { background: var(--second-bg-color); }
.experience-container { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: 2rem; }
.experience-box { flex: 1 1 30rem; background: var(--bg-color); padding: 3rem 2rem 4rem; border-radius: 2rem; text-align: center; border: .2rem solid var(--bg-color); transition: .5s ease; }
.experience-box:hover { border-color: var(--main-color-solid); transform: scale(1.02); }
.experience-box i { font-size: 7rem; background: var(--main-color-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.experience-box h3 { font-size: 2.6rem; }
.experience-box .experience-company { font-size: 1.4rem; color: var(--main-color-solid); font-weight: 600; margin: .5rem 0 0; letter-spacing: .05rem; }
.experience-box p { font-size: 1.6rem; margin: 1rem 0 1.5rem; }
.experience-box p:last-of-type { margin-bottom: 0; }

/* =========================================================
   10. BOUTON CERTIFICAT + MODAL
   ========================================================= */

/* Bouton sur la carte expérience */
.btn-certificate {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    margin-top: 2rem;
    margin-bottom: .5rem;
    padding: .8rem 2rem;
    font-size: 1.4rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--main-color-solid);
    background: transparent;
    border: .2rem solid var(--main-color-solid);
    border-radius: 4rem;
    cursor: pointer;
    transition: all .3s ease;
}
.btn-certificate:hover {
    background: var(--main-color-gradient);
    color: #fff;
    border-color: var(--main-color-solid);
}

/* Modal */
.certificate-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.certificate-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.certificate-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(4px);
}
.certificate-modal-content {
    position: relative;
    z-index: 1;
    background: var(--second-bg-color);
    border-radius: 2rem;
    padding: 3rem;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, .5);
    transform: scale(.9);
    transition: transform .3s ease;
}
.certificate-modal.active .certificate-modal-content {
    transform: scale(1);
}
.certificate-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--main-color-gradient);
    border: none;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    transition: transform .2s ease;
}
.certificate-modal-close:hover { transform: scale(1.15); }
.certificate-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--main-color-solid);
    text-align: center;
    padding-right: 3rem;
}
.certificate-modal-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .3);
}
.certificate-modal-pdf {
    width: 75vw;
    height: 70vh;
    border-radius: 1rem;
    border: none;
}

/* =========================================================
   11. SECTION TECHNOLOGIES
   ========================================================= */
.technologies { background: var(--bg-color); }

.technologies-group { margin-bottom: 5rem; }
.technologies-group:last-child { margin-bottom: 0; }

.technologies-category {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: .2rem;
    background: var(--main-color-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.technologies-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

.technologies-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: .2rem solid transparent;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    width: 12rem;
    transition: all .3s ease;
    cursor: default;
}

.technologies-item:hover {
    border-color: var(--main-color-solid);
    transform: translateY(-6px);
    box-shadow: 0 .8rem 2rem var(--shadow-color);
}

.technologies-item img {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
}

.technologies-item span {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
}

/* =========================================================
   12. SECTION PROJETS
   ========================================================= */
.projets { background: var(--second-bg-color); }

.projets-box.hidden { display: none; }
.projets-sous-titre { font-size: 2.8rem; color: var(--text-color); margin-bottom: 3rem; margin-top: 1rem; padding-left: 1rem; border-left: 4px solid var(--main-color-solid); }
.projets-sous-titre span { background: var(--main-color-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.projets-sous-titre--data { margin-top: 6rem; }
.projets-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(40rem, 1fr)); gap: 3rem; }
.projets-box { position: relative; border-radius: 2rem; overflow: hidden; display: flex; box-shadow: 0 1rem 3rem rgba(0,0,0,0.2); transition: transform .3s ease, box-shadow .3s ease; }
.projets-box:hover { transform: translateY(-6px); box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.35); }
.projets-box img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.projets-box:hover img { transform: scale(1.05); }
.projets-box .projets-layer { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; padding: 2.5rem; opacity: 0; transition: opacity .5s ease; }
.projets-box:hover .projets-layer { opacity: 1; }
.projets-layer .project-title-link { text-decoration: none; }
.projets-layer .project-title-link h4 { font-size: 2.8rem; color: white; font-weight: 700; transition: color .3s ease; }
.projets-layer .project-title-link:hover h4 { color: var(--main-color-solid); }
.projets-layer .project-links { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.projets-layer .project-links a { display: inline-flex; justify-content: center; align-items: center; width: 5rem; height: 5rem; background: var(--main-color-gradient); border-radius: 50%; transition: all .4s ease; }
.projets-layer .project-links a:hover { transform: scale(1.1); }
.projets-layer .project-links a i { font-size: 2.2rem; color: var(--second-bg-color); }
.projets-voir-plus { text-align: center; margin-top: 4rem; }

/* =========================================================
   11. SECTION CONTACT
   ========================================================= */
.contact { background: var(--bg-color); }
.contact-container { display: flex; gap: 6rem; align-items: flex-start; }

/* Colonne gauche — infos + carte */
.contact-info { flex: 0 0 42rem; display: flex; flex-direction: column; gap: 2rem; }
.contact-details { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-detail-item { display: flex; align-items: center; gap: 2rem; background: var(--second-bg-color); padding: 1.8rem 2rem; border-radius: 1rem; border-left: .4rem solid var(--main-color-solid); transition: transform .3s ease; }
.contact-detail-item:hover { transform: translateX(.5rem); }
.contact-detail-item i { font-size: 2.6rem; color: var(--main-color-solid); min-width: 3rem; text-align: center; }
.contact-detail-item h4 { font-size: 1.4rem; font-weight: 700; color: var(--main-color-solid); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .05rem; }
.contact-detail-item p { font-size: 1.5rem; word-break: break-all; }
.contact-map { border-radius: 1.5rem; overflow: hidden; border: .2rem solid var(--main-color-solid); box-shadow: 0 .5rem 2rem var(--shadow-color); }
.contact-map iframe { width: 100%; height: 30rem; display: block; }

/* Colonne droite — formulaire */
.contact-form { flex: 1; }
.contact-form form { text-align: center; }
.contact-form .input-box { display: flex; justify-content: space-between; flex-wrap: wrap; }
.contact-form .input-box input, .contact-form textarea { width: 100%; padding: 1.5rem; font-size: 1.6rem; color: var(--text-color); background: var(--second-bg-color); border-radius: .8rem; margin: .7rem 0; }
.contact-form textarea { resize: none; }
.input-group { width: 49%; display: flex; flex-direction: column; }
.input-group input { width: 100% !important; }
.form-error { color: #ff6b6b; font-size: 1.2rem; margin-top: .3rem; margin-bottom: .5rem; }

/* =========================================================
   12. FOOTER
   ========================================================= */
.footer { background: var(--second-bg-color); padding: 2.5rem 9%; }

.footer-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--main-color-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-social-icons { display: flex; gap: 1.2rem; }
.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    border: .2rem solid var(--main-color-solid);
    color: var(--main-color-solid);
    font-size: 1.6rem;
    transition: all .3s ease;
}
.footer-social-icons a:hover {
    background: var(--main-color-gradient);
    color: #fff;
    border-color: var(--main-color-solid);
}

.footer-copy { font-size: 1.3rem; opacity: .55; }

/* =========================================================
   13. BOUTONS FLOTTANTS CONTACT
   ========================================================= */
.floating-contact { position: fixed; bottom: 9rem; left: 2.5rem; display: flex; flex-direction: column; gap: 1.2rem; z-index: 999; }
.floating-btn { display: flex; justify-content: center; align-items: center; width: 5rem; height: 5rem; border-radius: 50%; font-size: 2.4rem; color: #fff; box-shadow: 0 .4rem 1.5rem rgba(0,0,0,.35); transition: transform .3s ease, box-shadow .3s ease; }
.floating-btn:hover { transform: scale(1.15); box-shadow: 0 .6rem 2rem rgba(0,0,0,.45); }
.floating-whatsapp { background: #25D366; }
.floating-email { background: var(--main-color-solid); }

/* =========================================================
   14. BOUTON RETOUR EN HAUT
   ========================================================= */
.back-to-top { position: fixed; bottom: 2.5rem; right: 2.5rem; background: var(--main-color-gradient); color: var(--bg-color); width: 4.5rem; height: 4.5rem; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2rem; z-index: 1000; opacity: 0; pointer-events: none; transition: all .4s ease; }
.back-to-top.active { opacity: 1; pointer-events: auto; bottom: 4rem; }
.back-to-top:hover { }

/* =========================================================
   14. PAGE DÉTAIL PROJET
   ========================================================= */
body.project-detail-page { background: var(--second-bg-color); }
.project-detail .project-detail-container { display: flex; flex-wrap: wrap; gap: 5rem; padding-top: 5rem; max-width: 120rem; margin: 0 auto; }
.project-detail .project-header { flex: 1 1 50rem; }
.project-detail .project-content { flex: 1 1 60rem; }
.project-detail h1 { font-size: 4.5rem; color: var(--text-color); margin-bottom: 1rem; line-height: 1.2; }
.project-detail .tags-container { margin-bottom: 1.5rem; }
.project-views { font-size: 1.4rem; color: var(--main-color-solid); margin-bottom: 2rem; display: flex; align-items: center; gap: .6rem; }
.project-detail .tag { font-size: 1.2rem; background: var(--main-color-gradient); color: var(--bg-color); padding: 0.5rem 1rem; border-radius: 0.5rem; margin-right: 1rem; display: inline-block; margin-bottom: .5rem; font-weight: 600; }
.project-detail .project-header img { width: 100%; border-radius: 1.5rem; box-shadow: 0 1rem 3rem rgba(0,0,0,0.3); margin-bottom: 3rem; }
.project-detail .cta-buttons { display: flex; gap: 2rem; }
.project-detail .project-content h3 { font-size: 2.8rem; color: var(--main-color-solid); margin-top: 2rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid rgba(128,128,128,0.3); }
.project-video { margin-bottom: 3rem; }
.project-video h3 { margin-top: 0; }
.project-video video { width: 100%; border-radius: 1.2rem; box-shadow: 0 1rem 3rem rgba(0,0,0,0.35); display: block; }
.project-detail .project-content .prose { font-size: 1.6rem; line-height: 1.8; color: var(--text-color); }
.project-detail .project-content .prose ul { list-style-position: inside; padding-left: 1.5rem; }
.project-detail .project-content .prose ul li { margin-bottom: 1rem; }
.project-detail .project-content .prose strong { color: var(--main-color-solid); font-weight: 700; }

/* =========================================================
   15. PAGES D'ERREUR
   ========================================================= */
.error-section { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.error-container { text-align: center; padding: 4rem 2rem; }
.error-code { font-size: 12rem; font-weight: 800; background: var(--main-color-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.error-container h2 { font-size: 3.6rem; margin: 1rem 0 2rem; }
.error-container p { font-size: 1.8rem; color: #aaa; line-height: 1.8; margin-bottom: 3rem; }

/* =========================================================
   16. RESPONSIVE — du plus large au plus étroit
   ========================================================= */

/* --- Tablette large (≤1200px) --- */
@media (max-width: 1200px) {
    html { font-size: 55%; }
}

/* --- Tablette (≤991px) --- */
@media (max-width: 991px) {
    .header, section, .footer { padding-left: 3%; padding-right: 3%; }
    .titre-section { font-size: 3.8rem; }
    .experience-container { gap: 1.5rem; }
    .project-detail h1 { font-size: 3.6rem; }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
    .header, section, .footer { padding-left: 4%; padding-right: 4%; }

    /* ---- Header ---- */
    .logo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 1rem; }
    #menu-icon { display: block; }
    .theme-toggle { margin-right: 1.5rem; }
    .navbar { position: absolute; top: 100%; left: 0; width: 100%; padding: 1rem 4%; background: var(--bg-color); border-top: .1rem solid rgba(0,0,0,.2); box-shadow: 0 .5rem 1rem rgba(0,0,0,.2); display: none; }
    .navbar.active { display: block; }
    .navbar a { display: block; font-size: 2rem; margin: 2rem 0; }

    /* ---- Titres de section ---- */
    .titre-section { font-size: 3.5rem; margin-bottom: 4rem; }

    /* ---- Section Accueil ---- */
    section.accueil { flex-direction: column-reverse; text-align: center; align-items: stretch; justify-content: flex-start; gap: 3rem; }
    .accueil-content { width: 100%; flex: none; display: flex; flex-direction: column; align-items: stretch; }
    .accueil-content h3 { font-size: 2.6rem; }
    .accueil-content h1 { font-size: 4.5rem; word-break: break-word; }
    .accueil-content p { word-break: break-word; }
    .social-media { display: flex; justify-content: center; flex-wrap: wrap; }
    .social-media a { margin: 1.5rem 1rem; }
    .accueil-img { width: 100%; flex: none; display: flex; justify-content: center; }
    .accueil-img img { width: 55vw; max-width: 30rem; min-width: auto; margin-top: 0; aspect-ratio: 1 / 1; object-fit: cover; }

    /* Flipper → titres statiques empilés verticalement */
    .metiers-flipper { flex-direction: column; text-align: center; gap: 0.3rem; }
    .flipper-wrapper { height: auto; overflow: visible; clip-path: none; display: block; }
    .flipper-container { animation: none; flex-direction: column; flex-wrap: nowrap; }
    .flipper-item { height: auto; line-height: 1.6; white-space: normal; }
    .flipper-item ~ .flipper-item::before { content: ''; }
    .flipper-item:last-child { display: none; }

    /* ---- Section Expérience ---- */
    .experience-box { flex: 1 1 100%; }

    /* ---- Section Technologies ---- */
    .technologies-grid { gap: 1.5rem; }
    .technologies-item { width: 10rem; padding: 2rem 1.5rem; }
    .technologies-item img { width: 4rem; height: 4rem; }

    /* ---- Section Projets ---- */
    .projets-container { grid-template-columns: 1fr; }
    /* Layer projet toujours visible sur touch (pas de hover) */
    .projets-box .projets-layer { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,0.88), rgba(0,0,0,0.15)); }

    /* ---- Section Contact ---- */
    .contact-container { flex-direction: column; }
    .input-group { width: 100%; }

    /* ---- Footer ---- */
    .footer { padding: 2rem 4%; }
    .footer-simple { flex-direction: column; align-items: center; text-align: center; gap: 1.2rem; }

    /* ---- Page détail projet ---- */
    .project-detail .project-detail-container { flex-direction: column; gap: 3rem; }
    .project-detail h1 { font-size: 3.5rem; }
    .project-detail .cta-buttons { flex-wrap: wrap; gap: 1.5rem; }
}

/* --- Mobile portrait (≤500px) --- */
@media (max-width: 500px) {
    :root { --flipper-height: 4rem; }
    html { font-size: 50%; }
    section { padding: 10rem 4% 2rem; min-height: auto; }

    /* ---- Titres ---- */
    .titre-section { font-size: 3rem; margin-bottom: 3rem; }

    /* ---- Section Accueil ---- */
    section.accueil { gap: 2rem; }
    .accueil-content h3 { font-size: 2.4rem; }
    .accueil-content h1 { font-size: 3.8rem; }
    .metiers-flipper { font-size: 2rem; }
    .accueil-img img { width: 60vw; max-width: 26rem; }

    /* ---- Section Expérience ---- */
    .experience-box h3 { font-size: 2.2rem; }
    .experience-box p { font-size: 1.5rem; }

    /* ---- Section Technologies ---- */
    .technologies-item { width: 9rem; padding: 1.5rem 1rem; }
    .technologies-item img { width: 3.5rem; height: 3.5rem; }
    .technologies-item span { font-size: 1.2rem; }

    /* ---- Section Projets ---- */
    .projets-layer .project-title-link h4 { font-size: 2.2rem; }

    /* ---- Section Contact ---- */
    .input-group { width: 100%; }

    /* ---- Boutons flottants ---- */
    .floating-contact { bottom: 7rem; left: 1.5rem; }
    .floating-btn { width: 4.5rem; height: 4.5rem; font-size: 2rem; }

    /* ---- Bouton retour en haut ---- */
    .back-to-top { width: 4rem; height: 4rem; font-size: 1.8rem; right: 1.5rem; }


    /* ---- Page détail projet ---- */
    .project-detail h1 { font-size: 2.8rem; }
    .project-detail .cta-buttons { flex-direction: column; align-items: stretch; }
    .project-detail .cta-buttons .btn { text-align: center; }
}
