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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 226, 0.2), transparent 50%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #1d1d1f;
    line-height: 1.6;
    background-attachment: fixed;
}

/* Header Apple-style (identique au menustyle.css) */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.ticker {
    flex: 1;
    text-align: center;
    margin: 0 40px;
    overflow: hidden;
}

.ticker-content {
    font-size: 0.9rem;
    font-weight: 500;
    color: #007AFF;
    animation: ticker 20s linear infinite;
    white-space: nowrap;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.auth-buttons a {
    padding: 8px 16px;
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.auth-buttons a:hover {
    background: #007AFF;
    color: white;
    transform: translateY(-1px);
}

/* Main Content */
main {
    margin-top: 80px;
    position: relative;
}

main::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="100" cy="100" r="50" fill="url(%23a)"/><circle cx="900" cy="200" r="30" fill="url(%23a)"/><circle cx="200" cy="800" r="40" fill="url(%23a)"/><circle cx="800" cy="900" r="35" fill="url(%23a)"/><circle cx="500" cy="300" r="25" fill="url(%23a)"/><circle cx="300" cy="600" r="45" fill="url(%23a)"/></svg>') no-repeat,
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    background-size: 100% 100%, 200px 200px;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

/* Bubble Container */
.bubble-container {
    display: flex;
    justify-content: space-between;
    padding: 40px;
    min-height: calc(100vh - 80px);
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
}

/* Base Bubble Styles */
.bubble {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bubble:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Animation sur l'image au hover comme dans menustyle.css */
.bubble:hover .overlay {
    opacity: 1;
}

/* Overlay comme dans menustyle.css */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.7), rgba(52, 199, 89, 0.7));
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 3;
    border-radius: 20px;
}

.view-project {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.view-project:hover {
    background: white;
    color: #007AFF;
}

.bubble a {
    text-decoration: none;
    color: white;
    /* Changé de #1d1d1f à white */
    font-weight: 600;
    font-size: 1.1rem;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Large Bubble (CV) */
.bubble.large {
    flex: 0 0 35%;
    height: 500px;
    min-width: 300px;
    border-left: 4px solid #007AFF;
}

.bubble.large img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(1.1) contrast(1.05);
    border-radius: 20px;
    transition: transform 0.4s ease;
}

.bubble.large:hover img {
    transform: scale(1.05);
}

.bubble.large a {
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 1;
}

.bubble.large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.3), rgba(0, 122, 255, 0.1));
    z-index: 1;
    border-radius: 20px;
}

/* Small Bubbles Container */
.small-bubbles-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.small-bubbles-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.small-bubbles-row:first-child {
    margin-top: 0;
}

/* Small Bubbles */
.bubble.small {
    flex: 1;
    height: 180px;
    position: relative;
}

.small-bubbles-row:first-child .bubble.small:first-child {
    border-left: 4px solid #34C759;
    /* Vert pour programmation */
}

.small-bubbles-row:first-child .bubble.small:last-child {
    border-left: 4px solid #FF9500;
    /* Orange pour expériences internationales */
}

.small-bubbles-row:last-child .bubble.small {
    border-left: 4px solid #FF3B30;
    /* Rouge pour sport */
}

.bubble.small img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(1.1) contrast(1.05);
    border-radius: 20px;
    transition: transform 0.4s ease;
}

.bubble.small:hover img {
    transform: scale(1.08);
}

.bubble.small a {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 15px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bubble.small::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    z-index: 1;
    border-radius: 20px;
}

/* Minecraft Bubble */
.bubble.minecraft {
    width: 100%;
    height: 220px;
    margin-top: 0;
    border-left: 4px solid #AF52DE;
    /* Violet pour Minecraft */
}

.bubble.minecraft img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(1.1) contrast(1.05);
    border-radius: 20px;
    transition: transform 0.4s ease;
}

.bubble.minecraft:hover img {
    transform: scale(1.08);
}

.bubble.minecraft a {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bubble.minecraft::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(175, 82, 222, 0.3), rgba(175, 82, 222, 0.1));
    z-index: 1;
    border-radius: 20px;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.popup.active {
    display: flex;
    opacity: 1;
}

.popup-contenu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-contenu h2 {
    color: #1d1d1f;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cv-pdf {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.popup .fermer {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
}

.popup .fermer:hover {
    transform: scale(1.2);
    color: #007AFF;
}

/* Expandable Section */
.expandable-container {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 40px auto;
}

.expandable {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.expandable-header {
    padding: 20px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.expandable-header:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

.expandable-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1d1d1f;
    font-weight: 600;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.expandable-content p {
    margin: 0;
    padding: 20px 0;
    line-height: 1.7;
    color: #1d1d1f;
    font-size: 1rem;
}

.indicator {
    font-size: 1rem;
    color: #007AFF;
    transition: transform 0.3s ease;
    font-weight: 300;
}

.expandable.active .indicator {
    transform: rotate(180deg);
}

.expandable.active .expandable-content {
    max-height: 600px;
    padding: 0 30px 20px;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 30px 20px;
    margin-top: 60px;
    text-align: center;
}

footer p {
    color: #6e6e73;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bubble-container {
        padding: 30px 20px;
    }

    .bubble.large {
        flex: 0 0 40%;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }

    .ticker {
        margin: 0;
        width: 100%;
    }

    main {
        margin-top: 120px;
    }

    .bubble-container {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .bubble.large {
        flex: none;
        height: 300px;
        width: 100%;
        margin: 0;
    }

    .small-bubbles-container {
        gap: 15px;
    }

    .small-bubbles-row {
        flex-direction: column;
        gap: 15px;
    }

    .bubble.small {
        width: 100%;
        height: 150px;
        margin: 0;
    }

    .bubble.minecraft {
        height: 180px;
    }

    .expandable-container {
        padding: 20px 15px;
    }

    .expandable-header {
        padding: 15px 20px;
    }

    .expandable-header h2 {
        font-size: 1.3rem;
    }

    .expandable-content {
        padding: 0 20px;
    }

    .expandable.active .expandable-content {
        padding: 0 20px 15px;
    }
}

@media (max-width: 480px) {
    .bubble-container {
        padding: 15px 10px;
    }

    .bubble.large {
        height: 250px;
    }

    .bubble.small {
        height: 120px;
    }

    .bubble.minecraft {
        height: 150px;
    }

    .cv-pdf {
        height: 400px;
    }

    .popup-contenu {
        padding: 20px;
        margin: 10px;
    }
}

/* Animation d'apparition */
.bubble {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.bubble:nth-child(1) {
    animation-delay: 0.1s;
}

.bubble:nth-child(2) {
    animation-delay: 0.2s;
}

.bubble:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === OVERRIDE : forcer le texte au-dessus des images dans les bulles === */
/* Colle ce bloc à la fin du fichier CSS réellement chargé (css/accueilstyle.css ou style.css selon ton choix) */

.bubble,
.bubble.large,
.bubble.small,
.bubble.minecraft {
    position: relative !important;
    overflow: hidden !important;
}

/* image en fond, derrière tout */
.bubble img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: -1 !important;
    /* laisse la place au contenu texte */
    pointer-events: none !important;
    /* clique passe à l'élément parent */
    filter: brightness(0.75) !important;
    /* assombrir l'image pour le contraste */
}

/* overlay léger pour garantir la lisibilité */
.bubble::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25));
    z-index: 0;
    pointer-events: none;
}

/* texte / lien en premier plan */
.bubble a {
    position: relative !important;
    z-index: 2 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    text-decoration: none !important;
    width: 100% !important;
    height: 100% !important;
    padding: 16px !important;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.75) !important;
    font-weight: 700 !important;
}

/* ajustements spécifiques */
.bubble.small a {
    font-size: 1rem !important;
}

.bubble.large a {
    font-size: 1.15rem !important;
}

.bubble.minecraft a {
    font-size: 1.05rem !important;
}

/* debug (si tu veux voir les zones) : retire en production */
/* .bubble { outline: 1px dashed rgba(255,255,255,0.2); } */