/* =====================================================
   COMING SOON - MIKAËL POSTY
   Style CSS Mobile First pour page de transition
   ===================================================== */

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables CSS */
:root {
    --color-background: #F5F5F5;
    --color-background-footer: #034460;
    --color-overlay: rgba(0, 0, 0, 0.65);
    --color-logo: #FFFFFF;
    --color-text: #333333;
    --text-shadow-strong: 2px 2px 4px rgba(0, 0, 0, 0.3);
    --text-shadow-soft: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* =====================================================
   STYLES MOBILES (BASE)
   ===================================================== */
body {
    font-family: 'Phudu', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background mobile avec overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/background-mobile.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -2;
}

/* Overlay coloré pour la lisibilité */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay);
    z-index: -1;
}

/* =====================================================
   CONTAINER PRINCIPAL - MOBILE
   ===================================================== */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    text-align: center;
    margin: 0 auto;
}

/* =====================================================
   NOUVEAU PAC-MAN GAME - MOBILE
   ===================================================== */
.pacman-game-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.maze {
    position: relative;
    height: 12rem;
    width: 12rem;
    border: 0.15rem solid #1311BC;
    border-radius: 15px;
    box-shadow: 0 0 20px #1311BC, inset 0 0 10px rgba(19, 17, 188, 0.3);
    background: rgba(0, 0, 0, 0.8);
}

.wall_1,
.wall_2 {
    position: absolute;
    height: 0.2rem;
    width: 5rem;
    border: 0.2rem solid #1311BC;
    border-radius: 10px;
    box-shadow: 0 0 8px #1311BC;
}

.wall_1 {
    top: 28%;
    left: 25%;
}

.wall_2 {
    top: 66%;
    left: 25%;
}

.pacman {
    position: absolute;
    animation: pacman_movement 6s ease infinite;
    z-index: 3;
}

.pacman_head {
    position: relative;
    background: #FDFF00;
    height: 2rem;
    width: 2rem;
    border-radius: 50%;
}

.pacman_mouth {
    position: absolute;
    top: 75%;
    left: 50%;
    height: 1.4rem;
    width: 1.4rem;
    background: rgba(0, 0, 0, 0.9);
    animation: eating 0.4s ease infinite;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform: translate(-50%, -50%);
}

.ghost {
    position: absolute;
    top: 10%;
    left: 3%;
    animation: ghost_movement 6s ease infinite;
    animation-delay: 1s;
    z-index: 2;
}

.ghost_head {
    position: relative;
    height: 2rem;
    width: 2rem;
    background: #46bfee;
    border-radius: 50%;
}

.ghost_body {
    position: absolute;
    height: 1.4rem;
    width: 2rem;
    top: 50%;
    background: #46bfee;
    clip-path: polygon(50% 0%, 100% 0, 100% 100%, 85% 79%, 66% 100%, 50% 80%, 33% 100%, 17% 80%, 0 100%, 0 0);
}

.ghost_eye_1,
.ghost_eye_2 {
    position: absolute;
    top: 25%;
    left: 20%;
    height: 0.6rem;
    width: 0.6rem;
    background: #fff;
    border-radius: 50%;
}

.ghost_eye_2 {
    left: 60%;
}

.ghost_eye_1::after,
.ghost_eye_2::after {
    position: absolute;
    top: 25%;
    left: 10%;
    content: "";
    height: 0.4rem;
    width: 0.4rem;
    background: black;
    border-radius: 50%;
}

.coin {
    position: absolute;
    top: 45%;
    left: 45%;
    height: 1.2rem;
    width: 1.2rem;
    animation: eaten_flip 6s ease-in-out infinite;
    border-radius: 50%;
    background: linear-gradient(to bottom, rgb(254, 252, 234) 0%, rgb(241, 218, 54) 100%);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(241, 218, 54, 0.5);
}

/* =====================================================
   ANIMATIONS PAC-MAN
   ===================================================== */
@keyframes pacman_movement {
    0% {
        top: 20%;
        left: 3%;
        transform: rotate(0deg);
    }

    5% {
        top: 25%;
        left: 3%;
        transform: rotate(0deg);
    }

    10% {
        top: 30%;
        left: 3%;
        transform: rotate(0deg);
    }

    15% {
        top: 35%;
        left: 3%;
        transform: rotate(0deg);
    }

    20% {
        top: 76%;
        left: 3%;
        transform: rotate(-90deg);
    }

    25% {
        top: 76%;
        left: 10%;
        transform: rotate(-90deg);
    }

    30% {
        top: 76%;
        left: 20%;
        transform: rotate(-90deg);
    }

    35% {
        top: 76%;
        left: 30%;
        transform: rotate(-90deg);
    }

    40% {
        top: 76%;
        left: 40%;
        transform: rotate(-90deg);
    }

    45% {
        top: 76%;
        left: 50%;
        transform: rotate(-90deg);
    }

    50% {
        top: 76%;
        left: 78.9%;
        transform: rotate(-180deg);
    }

    55% {
        top: 70%;
        left: 78.9%;
        transform: rotate(-180deg);
    }

    60% {
        top: 60%;
        left: 78.9%;
        transform: rotate(-180deg);
    }

    65% {
        top: 50%;
        left: 78.9%;
        transform: rotate(-180deg);
    }

    70% {
        top: 5.7%;
        left: 78.9%;
        transform: rotate(-270deg);
    }

    75% {
        top: 5.7%;
        left: 70%;
        transform: rotate(-270deg);
    }

    80% {
        top: 5.7%;
        left: 60%;
        transform: rotate(-270deg);
    }

    85% {
        top: 5.7%;
        left: 50%;
        transform: rotate(-270deg);
    }

    90% {
        top: 5.7%;
        left: 40%;
        transform: rotate(-270deg);
    }

    95% {
        top: 5.7%;
        left: 20%;
        transform: rotate(-270deg);
    }

    100% {
        top: 5.7%;
        left: 3%;
        transform: rotate(-360deg);
    }
}

@keyframes ghost_movement {
    0% {
        top: 20%;
        left: 3%;
    }

    5% {
        top: 25%;
        left: 3%;
    }

    10% {
        top: 30%;
        left: 3%;
    }

    15% {
        top: 35%;
        left: 3%;
    }

    20% {
        top: 76%;
        left: 3%;
    }

    25% {
        top: 76%;
        left: 10%;
    }

    30% {
        top: 76%;
        left: 20%;
    }

    35% {
        top: 76%;
        left: 30%;
    }

    40% {
        top: 76%;
        left: 40%;
    }

    45% {
        top: 76%;
        left: 50%;
    }

    50% {
        top: 76%;
        left: 78.9%;
    }

    55% {
        top: 70%;
        left: 78.9%;
    }

    60% {
        top: 60%;
        left: 78.9%;
    }

    65% {
        top: 50%;
        left: 78.9%;
    }

    70% {
        top: 5.7%;
        left: 78.9%;
    }

    75% {
        top: 5.7%;
        left: 70%;
    }

    80% {
        top: 5.7%;
        left: 60%;
    }

    85% {
        top: 5.7%;
        left: 50%;
    }

    90% {
        top: 5.7%;
        left: 40%;
    }

    95% {
        top: 5.7%;
        left: 20%;
    }

    100% {
        top: 5.7%;
        left: 3%;
    }
}

@keyframes eating {
    0% {
        clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    }

    50% {
        clip-path: polygon(50% 0%, 50% 100%, 50% 100%);
    }

    100% {
        clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    }
}

@keyframes eaten_flip {

    0%,
    50% {
        transform: translate(-50%, -50%) rotateY(0);
    }

    25%,
    100% {
        transform: translate(-50%, -50%) rotateY(180deg);
    }
}

/* =====================================================
   TYPOGRAPHIE - MOBILE
   ===================================================== */
.main-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-logo);
    margin-bottom: 1.5rem;
    text-shadow: var(--text-shadow-strong);
    line-height: 1.3;
    text-wrap: balance;
}

.subtitle {
    font-size: 1rem;
    color: var(--color-logo);
    margin-bottom: 1rem;
    font-weight: 400;
    text-shadow: var(--text-shadow-soft);
}

.subtitle:last-of-type {
    margin-bottom: 1.5rem;
}

/* =====================================================
   P.S. RECHERCHE ALTERNANCE
   ===================================================== */
.ps-alternance {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--color-logo);
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-logo);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
    text-align: left;
    line-height: 1.5;
    text-shadow: var(--text-shadow-soft);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ps-icon {
    flex-shrink: 0;
    line-height: 1.5;
}

.ps-content {
    flex: 1;
    min-width: 0;
}

.ps-content p + p {
    margin-top: 0.5rem;
}

.ps-alternance strong {
    font-weight: 700;
}

.ps-alternance a {
    color: var(--color-logo);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.ps-alternance a:hover {
    text-decoration: none;
}

/* =====================================================
   COMPTEUR - MOBILE
   ===================================================== */
.countdown-container {
    background: var(--color-background-footer);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 350px;
}

.countdown-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-logo);
    margin-bottom: 1rem;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    min-width: 60px;
}

.countdown-number {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-logo);
    display: block;
    line-height: 1;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--color-logo);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* =====================================================
   LIENS SOCIAUX - MOBILE
   ===================================================== */
.social-links {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    min-height: 44px;
}

.text-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.social-link i {
    font-size: 1em;
    width: 1em;
    height: 1em;
    line-height: 1;
    flex-shrink: 0;
}

/* Couleurs spécifiques pour les réseaux */
.linkedin:hover {
    color: #0077b5;
}

.linktree:hover {
    color: #42e661;
}

.github:hover {
    color: #666666;
}

.instagram:hover {
    color: #e4405f;
}

/* =====================================================
   FOOTER - MOBILE
   ===================================================== */
.footer {
    background: var(--color-background-footer);
    color: var(--color-logo);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    margin-top: auto;
}

.footer a {
    color: var(--color-logo);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* =====================================================
   TRÈS PETITS MOBILES - MAX-WIDTH: 360px
   ===================================================== */
@media (max-width: 360px) {
    .countdown-container {
        max-width: 100%;
    }

    .countdown {
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: 50px;
    }

    .main-title {
        font-size: 1.5rem;
    }

    .social-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* =====================================================
   TABLETTES - MIN-WIDTH: 768px
   ===================================================== */
@media (min-width: 768px) {
    .container {
        padding: 2rem 1rem;
        max-width: 600px;
    }

    .maze {
        height: 16rem;
        width: 16rem;
        border: 0.2rem solid #1311BC;
        border-radius: 20px;
    }

    .wall_1,
    .wall_2 {
        height: 0.25rem;
        width: 7rem;
        border: 0.25rem solid #1311BC;
    }

    .pacman_head {
        height: 2.5rem;
        width: 2.5rem;
    }

    .pacman_mouth {
        height: 1.8rem;
        width: 1.8rem;
    }

    .ghost_head {
        height: 2.5rem;
        width: 2.5rem;
    }

    .ghost_body {
        height: 1.8rem;
        width: 2.5rem;
    }

    .ghost_eye_1,
    .ghost_eye_2 {
        height: 0.8rem;
        width: 0.8rem;
    }

    .ghost_eye_1::after,
    .ghost_eye_2::after {
        height: 0.5rem;
        width: 0.5rem;
    }

    .coin {
        height: 1.5rem;
        width: 1.5rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
        margin-bottom: 2.5rem;
    }

    .countdown-container {
        padding: 1.5rem;
        max-width: 500px;
    }

    .countdown-title {
        font-size: 1.1rem;
    }

    .countdown {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 70px;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.9rem;
    }

    .social-links {
        gap: 1rem;
        margin-bottom: 3rem;
    }

    .social-link {
        padding: 0.7rem 1.1rem;
        font-size: 0.9rem;
        min-height: 48px;
    }

    .footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* =====================================================
   DESKTOP - MIN-WIDTH: 1024px
   ===================================================== */
@media (min-width: 1024px) {

    /* Background desktop */
    body::before {
        background-image: url('./images/background.webp');
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .container {
        max-width: 800px;
    }

    .maze {
        height: 20rem;
        width: 20rem;
        border: 0.2rem solid #1311BC;
        border-radius: 25px;
    }

    .wall_1,
    .wall_2 {
        height: 0.3rem;
        width: 9rem;
        border: 0.3rem solid #1311BC;
    }

    .pacman_head {
        height: 3.5rem;
        width: 3.5rem;
    }

    .pacman_mouth {
        height: 2.5rem;
        width: 2.5rem;
    }

    .ghost_head {
        height: 3.5rem;
        width: 3.5rem;
    }

    .ghost_body {
        height: 2.5rem;
        width: 3.5rem;
    }

    .ghost_eye_1,
    .ghost_eye_2 {
        height: 1rem;
        width: 1rem;
    }

    .ghost_eye_1::after,
    .ghost_eye_2::after {
        height: 0.6rem;
        width: 0.6rem;
    }

    .coin {
        height: 2rem;
        width: 2rem;
    }

    .main-title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.3rem;
        max-width: 600px;
    }

    .countdown-container {
        padding: 2rem;
    }

    .countdown-title {
        font-size: 1.2rem;
    }

    .countdown {
        gap: 1.5rem;
    }

    .countdown-number {
        font-size: 2rem;
    }

    .social-links {
        gap: 1.5rem;
    }

    .social-link {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }

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

/* =====================================================
   TRÈS GRANDS ÉCRANS - MIN-WIDTH: 1440px
   ===================================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1000px;
    }

    .main-title {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.4rem;
        max-width: 700px;
    }
}

/* =====================================================
   OPTIMISATIONS PERFORMANCE
   ===================================================== */
.pacman,
.ghost,
.coin {
    will-change: transform;
}

.social-link:hover {
    will-change: transform;
}

/* Pause des animations quand l'onglet est en arrière-plan (classe ajoutée par JS) */
body.is-hidden .pacman,
body.is-hidden .pacman_mouth,
body.is-hidden .ghost,
body.is-hidden .coin {
    animation-play-state: paused;
}

/* =====================================================
   PRÉFÉRENCES D'ACCESSIBILITÉ
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    .pacman,
    .pacman_mouth {
        animation: none;
    }

    .ghost,
    .coin {
        display: none;
    }

    .social-link:hover {
        transform: none;
    }
}