/* ========================================
   PYRÉNÉES HAND CHALLENGE 2026 - CSS
   ======================================== */

/* Polices personnalisées */
@font-face {
    font-family: 'Fantasm and Secrets';
    src: url('../fonts/Fantasm-and-Secrets.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Almarose';
    src: url('../fonts/Almarose-Bold.OTF') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

/* Reset & Variables */
:root {
    --color-primary: #FF1493;
    --color-primary-light: #FF69B4;
    --color-dark: #1a0a2e;
    --color-dark-alt: #2a1a3e;
    --color-text: #1a1a1a;
    --color-gray: #666;
    --color-light-gray: #f5f5f5;
    --font-main: 'Inter', sans-serif;
    --font-title: 'Almarose', Arial, sans-serif;
    --font-special: 'Fantasm and Secrets', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-text);
    background: #fff;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    transition: box-shadow 0.3s ease;
    padding: 5px 0;
}

header.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-header {
    height: 50px;
    transition: opacity 0.5s ease;
}

/* Sur la page d'accueil, le logo est transparent mais garde exactement sa place */
body.homepage .logo-header {
    opacity: 0;
}

/* Le logo apparaît au scroll sur la page d'accueil */
body.homepage header.scrolled .logo-header {
    opacity: 1;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    padding: 0 15px;
    border-radius: 5px;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 50px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 80%;
}

nav a:hover,
nav a.active {
    color: var(--color-primary);
}

.btn-billeterie {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: 12px 25px !important;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4);
    color: #1a0a2e !important;
}

.btn-billeterie::after {
    display: none;
}

.btn-billeterie:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 20, 147, 0.6);
}

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 50%, #3a2a4e 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    opacity: 0.2;
    border-radius: 50%;
    transform: rotate(45deg);
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    opacity: 0.1;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-30px) rotate(45deg); }
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 100%;
    padding: 40px 20px;
}

.hero-logo {
    max-width: 600px;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease;
}

.hero-tagline {
    max-height: 80px;
    max-width: 100%;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease 0.3s backwards;
}

.hero-subtitle {
    font-size: 3em;
    margin-bottom: 30px;
    color: var(--color-primary-light);
    font-family: var(--font-special);
    animation: fadeInUp 1s ease 0.5s backwards;
}

.hero-dates {
    background: rgba(255, 20, 147, 0.9);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.4em;
    font-weight: 700;
    margin: 30px auto;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.4);
    animation: fadeInUp 1s ease 0.7s backwards;
}

.hero-location {
    font-size: 1.3em;
    color: #e0e0e0;
    margin-top: 20px;
    animation: fadeInUp 1s ease 0.9s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    color: white;
    font-size: 2em;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* ========================================
   COUNTDOWN
   ======================================== */

.countdown-section {
    background: linear-gradient(to right, var(--color-light-gray) 0%, white 100%);
    padding: 60px 20px;
    text-align: center;
}

.countdown-title {
    font-size: 2.5em;
    color: var(--color-dark);
    margin-bottom: 40px;
    font-family: var(--font-title);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px 35px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 120px;
    border: 2px solid rgba(255, 20, 147, 0.3);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 40px rgba(255, 20, 147, 0.4);
    background: white;
}

.countdown-number {
    font-size: 3em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.countdown-label {
    font-size: 0.95em;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    font-weight: 600;
}

/* ========================================
   SECTIONS COMMUNES
   ======================================== */

section {
    padding: 80px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--color-dark);
    font-family: var(--font-title);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.3em;
    text-align: center;
    color: var(--color-gray);
    margin-top: -30px;
    margin-bottom: 50px;
    font-style: italic;
}

/* ========================================
   CARDS & GRIDS
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.stat-card {
    background: white;
    padding: 40px 30px;
    text-align: center;
    border: 2px solid var(--color-light-gray);
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 40px rgba(255, 20, 147, 0.25);
}

.stat-number {
    font-size: 3.5em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1em;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
    font-weight: 600;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 20, 147, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 20, 147, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-alt) 100%);
    color: white;
    padding: 60px 20px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.footer-section p,
.footer-section a {
    color: #e0e0e0;
    line-height: 1.8;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #1a0a2e !important;
}

.social-links a:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
    color: white !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-dark);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        z-index: 999;
    }

    nav ul.active {
        display: flex;
    }

    nav li {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hero optimisé mobile */
    .hero {
        min-height: 100vh;
        padding: 90px 15px 30px;
    }

    .hero-content {
        padding: 15px 10px;
    }

    .hero-logo {
        max-width: 260px;
        width: 85%;
        margin-bottom: 15px;
    }

    .hero-tagline {
        max-height: 45px;
        max-width: 95%;
        width: 95%;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .hero-dates {
        font-size: 1em;
        padding: 12px 20px;
        line-height: 1.4;
    }

    .hero-location {
        font-size: 1em;
    }

    /* Compte à rebours mobile */
    .countdown-hero-title {
        font-size: 1.2em !important;
        margin-bottom: 15px !important;
    }

    .countdown {
        gap: 8px !important;
        margin-bottom: 20px !important;
        padding: 0 5px;
        max-width: 100%;
    }

    .countdown-item {
        min-width: 70px;
        max-width: 75px;
        padding: 10px 6px;
        flex: 0 1 auto;
    }

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

    .countdown-label {
        font-size: 0.75em;
        margin-top: 5px;
    }

    /* Titres sections mobile */
    .section-title {
        font-size: 1.8em;
    }

    .section-subtitle {
        font-size: 1em;
    }

    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 25px 15px;
    }

    .stat-number {
        font-size: 2.5em;
    }

    .stat-label {
        font-size: 0.85em;
    }

    /* Équipes mobile - 1 colonne */
    #equipes > .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        max-width: 450px !important;
    }

    .team-card {
        padding: 25px 20px;
    }

    /* Sections */
    section {
        padding: 50px 15px;
    }

    .container {
        padding: 0 10px;
    }

    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* Très petits écrans (< 480px) */
@media (max-width: 480px) {
    .hero {
        padding: 85px 10px 25px;
    }

    .hero-content {
        padding: 10px 5px;
    }

    .hero-logo {
        max-width: 220px;
        margin-bottom: 12px;
    }

    .hero-tagline {
        max-height: 35px;
        max-width: 100%;
        width: 100%;
        margin-bottom: 12px;
    }

    .hero-dates {
        font-size: 0.9em;
        padding: 10px 15px;
    }

    .countdown-hero-title {
        font-size: 1em !important;
        margin-bottom: 12px !important;
    }

    .countdown {
        gap: 5px !important;
        margin-bottom: 15px !important;
        padding: 0 2px;
    }

    .countdown-item {
        min-width: 68px;
        max-width: 72px;
        padding: 8px 4px;
        flex: 0 1 auto;
    }

    .countdown-number {
        font-size: 1.4em;
    }

    .countdown-label {
        font-size: 0.58em;
    }

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

    .section-title {
        font-size: 1.5em;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.9em;
    }
}

/* Portrait mobile - Hauteur limitée (paysage) */
@media (max-width: 480px) and (max-height: 740px) {
    .hero {
        padding: 80px 10px 20px;
    }

    .hero-content {
        padding: 8px 5px;
    }

    .hero-logo {
        max-width: 200px;
        margin-bottom: 10px;
    }

    .hero-tagline {
        max-height: 32px;
        margin-bottom: 10px;
    }

    .countdown-hero-title {
        font-size: 0.95em !important;
        margin-bottom: 10px !important;
    }

    .countdown {
        gap: 4px !important;
        margin-bottom: 12px !important;
    }

    .countdown-item {
        min-width: 66px;
        max-width: 70px;
        padding: 7px 3px;
    }

    .countdown-number {
        font-size: 1.3em;
    }

    .countdown-label {
        font-size: 0.55em;
    }

    .hero-dates {
        font-size: 0.85em;
        padding: 8px 12px;
    }
}

/* Portrait mobile - Mode portrait (orientation verticale) */
@media (max-width: 480px) and (orientation: portrait) {
    .hero {
        padding: 100px 15px 40px;
        min-height: auto;
    }

    .hero-content {
        padding: 20px 10px;
    }

    .hero-logo {
        max-width: 240px;
        margin-bottom: 25px;
    }

    .hero-tagline {
        max-height: 50px;
        margin-bottom: 25px;
    }

    .countdown-hero-title {
        font-size: 1.1em !important;
        margin-bottom: 18px !important;
    }

    .countdown {
        gap: 8px !important;
        margin-bottom: 25px !important;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .countdown-item {
        min-width: 70px;
        max-width: 75px;
        padding: 10px 5px;
    }

    .countdown-number {
        font-size: 1.8em;
    }

    .countdown-label {
        font-size: 0.65em;
    }

    .hero-dates {
        font-size: 1em;
        padding: 12px 20px;
    }

    .hero .btn {
        padding: 14px 30px;
        font-size: 1em;
    }

    /* Sections après le hero */
    section {
        padding: 60px 15px !important;
    }

    .container {
        padding: 0 15px !important;
    }

    /* Grilles responsive */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Cards équipes */
    .team-card {
        padding: 30px 20px !important;
    }

    /* Programme - forcer une colonne */
    #programme [style*="minmax(450px"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}

/* Très petite hauteur (iPhone SE, etc.) */
@media (max-width: 400px) and (max-height: 680px) {
    .hero {
        padding: 75px 8px 15px;
        min-height: auto;
    }

    .hero-logo {
        max-width: 180px;
        margin-bottom: 8px;
    }

    .hero-tagline {
        max-height: 28px;
        margin-bottom: 8px;
    }

    .countdown-hero-title {
        font-size: 0.9em !important;
        margin-bottom: 8px !important;
    }

    .countdown {
        gap: 3px !important;
        margin-bottom: 10px !important;
    }

    .countdown-item {
        min-width: 64px;
        max-width: 68px;
        padding: 6px 2px;
    }

    .countdown-number {
        font-size: 1.2em;
    }

    .countdown-label {
        font-size: 0.52em;
    }

    .hero-dates {
        font-size: 0.8em;
        padding: 7px 10px;
    }
}
