* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0a0e27;
    --primary-accent: #00d4ff;
    --secondary-accent: rgb(242, 96, 53);
    --tertiary-accent: #f7b801;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-dark: #1a1a2e;
    --text-light: #7a7a8e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a1f4b 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body.page-loaded {
    overflow-x: hidden;
    overflow-y: auto;
}

body.page-loaded main {
    opacity: 1;
    transform: translateY(0);
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: radial-gradient(circle at top, rgba(0, 212, 255, 0.28), rgba(10, 14, 39, 0.98));
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

body.page-loaded .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-accent);
    animation: spin 1s linear infinite;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.35);
}

.loader-text {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Header avec design dynamique */
header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #16213e 100%);
    padding: 30px 20px;
    border-bottom: 3px solid var(--primary-accent);
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-accent), var(--tertiary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 2px;
}

header h1 a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

header p {
    font-size: 1em;
    color: var(--primary-accent);
    margin: 5px 0;
    font-weight: 500;
}

/* Bouton hamburger */
.menu-toggle {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    gap: 5px;
    position: absolute;
    top: 20px;
    right: 20px;
}

.menu-toggle::before {
    content: 'MENU';
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    color: var(--primary-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 3px 8px;
    border: 1px solid rgba(0, 212, 255, 0.45);
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.menu-toggle:hover::before,
.menu-toggle.active::before {
    background: rgba(0, 212, 255, 0.16);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.28);
    transform: translateY(-50%) translateX(-2px);
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-accent);
    border-radius: 2px;
}

/* Navigation menu */
nav {
    background: rgba(10, 14, 39, 0.95);
    padding: 0;
    border-bottom: 2px solid var(--primary-accent);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

nav.active {
    max-height: 600px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

nav li {
    margin: 0;
    padding: 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

nav a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--primary-accent);
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    border-left-color: var(--secondary-accent);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), transparent);
    padding-left: 25px;
}

/* Sous-menu Compétences */
nav li > ul.submenu {
    display: none;
    list-style: none;
    flex-direction: column;
    background: rgba(0, 14, 39, 0.98);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

nav li:hover > ul.submenu {
    display: flex;
    max-height: 300px;
}

nav ul.submenu li {
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
}

nav ul.submenu a {
    padding: 12px 20px 12px 40px;
    color: var(--secondary-accent);
    font-size: 0.95em;
}

nav ul.submenu a:hover {
    border-left-color: var(--tertiary-accent);
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.1), transparent);
    padding-left: 45px;
}

/* Sous-menu actif au clic (mobile) */
nav li > ul.submenu.open {
    display: flex;
    max-height: 300px;
}

/* Indicateur de sous-menu */
nav li:has(> ul.submenu) > a::after {
    content: ' ▼';
    font-size: 0.7em;
    transition: transform 0.3s ease;
}

nav li:has(> ul.submenu.open) > a::after {
    transform: rotate(180deg);
}

/* Contenu principal */
main {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section {
    background: var(--card-bg);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-top: 4px solid var(--primary-accent);
    animation: slideUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.22);
}

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

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

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(15, 139, 141, 0.2);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 0 12px rgba(15, 139, 141, 0);
    }
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes linePulse {
    0%, 100% {
        opacity: 0.88;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.02);
    }
}

section h2 {
    font-size: 2.2em;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--secondary-accent);
    padding-bottom: 15px;
    background: linear-gradient(135deg, var(--text-dark), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

article {
    margin-bottom: 30px;
}

article h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: var(--primary-accent);
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

article h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--secondary-accent), var(--tertiary-accent));
}

article p {
    margin-bottom: 12px;
    text-align: justify;
    color: var(--text-light);
    line-height: 1.8;
}

article ul {
    margin-left: 25px;
    margin-bottom: 15px;
}

article li {
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.6;
}

article li strong {
    color: var(--primary-accent);
}

article li strong a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

article li strong a:hover,
article li strong a:focus-visible {
    color: var(--secondary-accent);
}

/* Contact info */
.contact-info {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(255, 107, 53, 0.05));
    padding: 20px;
    border-left: 4px solid var(--primary-accent);
    border-radius: 8px;
    margin: 15px 0;
}

.contact-info p {
    margin-bottom: 12px;
    font-size: 1.05em;
}

.contact-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-bottom-color: var(--primary-accent);
    color: var(--secondary-accent);
}

/* Bouton LinkedIn */
.linkedin-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-accent), #00a8cc);
    color: var(--primary-dark);
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
    letter-spacing: 1px;
}

.linkedin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
    background: linear-gradient(135deg, #00a8cc, var(--primary-accent));
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-dark), #16213e);
    padding: 50px 20px;
    text-align: center;
    border-top: 3px solid var(--primary-accent);
    color: var(--primary-accent);
    margin-top: 80px;
    font-weight: 500;
}

/* Images */
img {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    height: auto;
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

video,
iframe {
    max-width: 100%;
    height: auto;
}



/* ============================= */
/* Formules / équations          */
/* ============================= */
.img-formule {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 8px auto;
    object-fit: contain;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    transition: none !important;
}

.img-formule:hover {
    transform: none !important;
    box-shadow: none !important;
}

.formule-container {
    text-align: center;
    margin: 12px 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.formule-large {
    width: auto;
}

/* Formulaire */
form div {
    margin-bottom: 15px;
}

form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    background: white;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

form button {
    background: linear-gradient(135deg, var(--secondary-accent), var(--tertiary-accent));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

/* Bouton de changement de langue */
.language-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(255, 107, 53, 0.15));
    border: 2px solid var(--primary-accent);
    color: var(--primary-accent);
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88em;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    z-index: 101;
}

.language-toggle:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 107, 53, 0.2));
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.language-toggle:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 22px 14px 18px;
    }

    header h1 {
        font-size: 1.75em;
        letter-spacing: 1px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    header p {
        font-size: 0.95em;
    }

    .menu-toggle {
        top: 14px;
        right: 14px;
        padding: 8px;
    }

    .menu-toggle::before {
        right: 40px;
        font-size: 0.68rem;
        letter-spacing: 0.1em;
        padding: 2px 7px;
    }

    nav a {
        padding: 14px 16px;
    }

    nav ul.submenu a {
        padding: 12px 16px 12px 30px;
    }

    main {
        margin: 16px auto;
        padding: 0 12px;
    }

    section {
        padding: 18px;
        margin-bottom: 18px;
        border-radius: 10px;
    }

    section h2 {
        font-size: 1.35em;
        margin-bottom: 16px;
        padding-bottom: 10px;
        line-height: 1.3;
    }

    article h3 {
        font-size: 1.1em;
        line-height: 1.35;
    }

    article p {
        text-align: left;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    article ul {
        margin-left: 18px;
    }

    video {
        width: 100% !important;
        max-width: 100% !important;
    }

    #lightbox-close {
        top: 10px;
        right: 10px;
    }

    #lightbox-caption {
        max-width: 90vw;
        font-size: 0.85em;
        bottom: 14px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.45em;
    }

    section {
        padding: 14px;
    }

    section h2 {
        font-size: 1.2em;
    }
}

/* ============================= */
/* Parcours - ligne graphique    */
/* ============================= */
.parcours-section {
    position: relative;
    animation: fadeSlideIn 0.7s ease-out both;
}

.parcours-header {
    margin-bottom: 35px;
}

.parcours-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 59, 48, 0.10);
    color: #ff3b30;
    font-size: 0.88em;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}


/* ===== LIGHTBOX ===== */
.lightbox-trigger {
    cursor: zoom-in;
}

#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    animation: lightboxFadeIn 0.25s ease;
}

#lightbox-overlay.active {
    display: flex;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 10px;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.4);
    animation: lightboxZoomIn 0.3s ease;
    object-fit: contain;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

#lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95em;
    text-align: center;
    max-width: 80vw;
    background: rgba(0,0,0,0.4);
    padding: 6px 16px;
    border-radius: 20px;
}

#lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

#lightbox-close:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* ============================= */
/* Passion - montagnes russes    */
/* ============================= */
.passion-intro {
    padding: 28px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(255, 107, 53, 0.08));
    border-left: 4px solid var(--primary-accent);
    border-radius: 12px;
}

.passion-intro h3 {
    margin-top: 0;
}

.passion-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.passion-stat {
    padding: 18px 14px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.24);
    border-radius: 10px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
}

.passion-stat strong {
    display: block;
    margin-bottom: 4px;
    color: var(--secondary-accent);
    font-size: 1.7em;
    line-height: 1;
}

.passion-stat span {
    color: var(--text-light);
    font-size: 0.92em;
}

.passion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.passion-button {
    display: inline-block;
    padding: 11px 18px;
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-accent), #00a8cc);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.passion-button:hover,
.passion-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 212, 255, 0.28);
}

.passion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 24px 0 8px;
}

.passion-card {
    padding: 22px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(255, 107, 53, 0.05));
    border-left: 4px solid var(--primary-accent);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.passion-card:nth-child(2n) {
    border-left-color: var(--secondary-accent);
}

.passion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 25px rgba(0, 212, 255, 0.15);
}

.passion-card h4 {
    margin: 0 0 10px;
    color: var(--primary-accent);
    font-size: 1.12em;
}

.passion-card p {
    margin: 0;
    text-align: left;
    font-size: 0.96em;
}

.passion-icon {
    display: block;
    margin-bottom: 10px;
    font-size: 2em;
    line-height: 1;
}

.coaster-note {
    margin: 18px 0;
    padding: 14px 16px;
    background: rgba(247, 184, 1, 0.09);
    border-left: 4px solid var(--tertiary-accent);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.94em;
}

.coaster-list {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
}

.coaster-park {
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.04), rgba(255, 107, 53, 0.035));
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-left: 4px solid var(--primary-accent);
    border-radius: 9px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.coaster-park:hover,
.coaster-park[open] {
    border-left-color: var(--secondary-accent);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
}

.coaster-park summary {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 15px 18px;
    color: var(--primary-accent);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.coaster-park summary::-webkit-details-marker {
    display: none;
}

.coaster-park summary::after {
    content: "+";
    color: var(--secondary-accent);
    font-size: 1.35em;
    line-height: 1;
}

.coaster-park[open] summary::after {
    content: "−";
}

.coaster-count {
    color: var(--text-light);
    font-size: 0.86em;
    font-weight: 500;
    white-space: nowrap;
}

.coaster-park ul {
    margin: 0 22px 18px 42px;
    columns: 2;
    column-gap: 38px;
}

.coaster-park li {
    break-inside: avoid;
    margin-bottom: 6px;
}

.manufacturer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.manufacturer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 230px;
    padding: 20px;
    text-align: center;
    background: #f4f7ff;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
}

.manufacturer-card img {
    width: auto;
    max-width: 180px;
    height: 78px;
    margin-bottom: 16px;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}

.manufacturer-card img:hover {
    transform: none;
    box-shadow: none;
}

.manufacturer-card h4 {
    margin: 0 0 8px;
    color: var(--primary-accent);
    font-size: 1.05em;
}

.manufacturer-card p {
    margin: 0;
    text-align: center;
    font-size: 0.92em;
}

.passion-conclusion {
    margin-bottom: 0;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.07), rgba(247, 184, 1, 0.07));
    border-left: 4px solid var(--secondary-accent);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .passion-intro {
        padding: 20px;
    }

    .passion-stats {
        grid-template-columns: 1fr;
    }

    .coaster-park summary {
        grid-template-columns: 1fr auto;
    }

    .coaster-count {
        grid-column: 1 / -1;
        grid-row: 2;
        white-space: normal;
    }

    .coaster-park summary::after {
        grid-column: 2;
        grid-row: 1;
    }

    .coaster-park ul {
        columns: 1;
        margin-left: 34px;
    }

    .passion-actions {
        flex-direction: column;
    }

    .passion-button {
        text-align: center;
    }
}
