/* ===== VARIABLES ET RESET ===== */
:root {
    --color-primary: #d4a574;      /* Or rose */
    --color-secondary: #87a96b;    /* Vert sauge */
    --color-accent: #f8e5e5;       /* Rose poudré */
    --color-white: #ffffff;
    --color-cream: #faf8f3;
    --color-text: #4a4a4a;
    --color-text-light: #7a7a7a;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #faf8f3 0%, #f8e5e5 100%);
    min-height: 100vh;
    color: var(--color-text);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(212, 165, 116, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(248, 229, 229, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(135, 169, 107, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* ===== CONTAINER ET LAYOUT ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.decorative-frame {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-medium);
    position: relative;
    border: 2px solid var(--color-primary);
    background-image: 
        linear-gradient(45deg, rgba(212, 165, 116, 0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(212, 165, 116, 0.03) 25%, transparent 25%);
    background-size: 30px 30px;
}

/* ===== TYPOGRAPHY ===== */
.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); }
    to { text-shadow: 2px 2px 20px rgba(212, 165, 116, 0.3); }
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 30px;
}

.title-decoration {
    display: inline-block;
    margin: 0 15px;
    animation: float 3s ease-in-out infinite;
}

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

/* ===== FORMULAIRE ===== */
.score-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.label-icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

.form-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--color-cream);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
    transform: translateY(-2px);
}

/* ===== RADIO BUTTONS ===== */
.radio-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 30px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--color-cream);
    position: relative;
}

.radio-label:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked ~ .radio-custom {
    background: var(--color-primary);
}

.radio-label input[type="radio"]:checked ~ .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label input[type="radio"]:checked ~ .radio-text {
    font-weight: 600;
    color: var(--color-primary);
}

.radio-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-icon {
    font-size: 1.3rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #e4b584);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-secondary), #97b97b);
    color: white;
    box-shadow: 0 4px 15px rgba(135, 169, 107, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(135, 169, 107, 0.4);
}

.btn-refresh {
    background: linear-gradient(135deg, #6c757d, #8c959d);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-refresh:hover {
    transform: translateY(-3px) rotate(180deg);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-icon {
    font-size: 1.3rem;
}

.form-actions {
    text-align: center;
    margin-top: 35px;
}

.navigation {
    text-align: center;
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== MESSAGES ===== */
.message {
    padding: 15px 25px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1rem;
    animation: slideDown 0.5s ease;
    transition: opacity 0.5s ease;
}

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

.message.success {
    background: linear-gradient(135deg, #d4f1d4, #e8f5e8);
    color: #2d6a2d;
    border: 2px solid #4caf50;
}

.message.error {
    background: linear-gradient(135deg, #ffd4d4, #ffe8e8);
    color: #6a2d2d;
    border: 2px solid #f44336;
}

/* ===== DECORATIVE ELEMENTS ===== */
.decorative-elements {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    font-size: 1.5rem;
    opacity: 0.5;
}

.decoration-left {
    position: absolute;
    left: 20px;
    animation: sway 4s ease-in-out infinite;
}

.decoration-right {
    position: absolute;
    right: 20px;
    animation: sway 4s ease-in-out infinite reverse;
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ===== FLOATING HEARTS ===== */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.heart {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 15s infinite;
    opacity: 0.3;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.heart:nth-child(2) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.heart:nth-child(3) {
    left: 80%;
    animation-delay: 6s;
    animation-duration: 18s;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ===== SCORES PAGE ===== */
.scores-page {
    background: linear-gradient(135deg, #f8e5e5 0%, #faf8f3 100%);
}

.scores-header {
    text-align: center;
    margin-bottom: 50px;
}

.score-section {
    margin-bottom: 60px;
    animation: fadeIn 0.8s ease;
}

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

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-icon {
    font-size: 1.8rem;
    animation: bounce 2s ease-in-out infinite;
}

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

/* ===== PODIUM ===== */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 40px 0;
    padding: 20px;
}

.podium-place {
    text-align: center;
    position: relative;
    animation: slideUp 0.8s ease;
}

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

.podium-place.first {
    animation-delay: 0.2s;
}

.podium-place.second {
    animation-delay: 0.4s;
}

.podium-place.third {
    animation-delay: 0.6s;
}

.podium-medal {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    animation: shine 2s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.podium-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 5px;
}

.podium-score {
    font-size: 1.2rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.podium-block {
    background: linear-gradient(135deg, var(--color-primary), #e4b584);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 10px 10px 0 0;
    width: 120px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.podium-children .podium-block {
    background: linear-gradient(135deg, var(--color-accent), #ffc0cb);
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.scores-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.scores-table thead {
    background: linear-gradient(135deg, var(--color-primary), #e4b584);
    color: white;
}

.children-table thead {
    background: linear-gradient(135deg, var(--color-accent), #ffc0cb);
    color: var(--color-text);
}

.scores-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
}

.scores-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.score-row {
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.score-row:hover {
    background: var(--color-cream);
    transform: scale(1.02);
}

.score-row.top-three {
    font-weight: 600;
}

.score-row:nth-child(even) {
    background: #fafafa;
}

.position {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}

.name {
    font-size: 1.1rem;
    color: var(--color-text);
}

.points {
    font-size: 1.1rem;
    font-weight: 600;
}

.points-value {
    color: var(--color-primary);
    font-size: 1.3rem;
}

.points-label {
    color: var(--color-text-light);
    margin-left: 5px;
}

/* ===== NO SCORES ===== */
.no-scores {
    text-align: center;
    padding: 40px;
    background: var(--color-cream);
    border-radius: var(--border-radius);
    border: 2px dashed var(--color-primary);
}

.no-scores p {
    font-size: 1.2rem;
    color: var(--color-text-light);
}

/* ===== DECORATIVE FOOTER ===== */
.decorative-footer {
    text-align: center;
    margin-top: 50px;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0.6;
}

.decorative-footer span {
    animation: float 3s ease-in-out infinite;
}

.decorative-footer span:nth-child(2) {
    animation-delay: 0.5s;
}

.decorative-footer span:nth-child(3) {
    animation-delay: 1s;
}

.decorative-footer span:nth-child(4) {
    animation-delay: 1.5s;
}

.decorative-footer span:nth-child(5) {
    animation-delay: 2s;
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    animation: confettiFall 10s linear infinite;
}

.confetti:nth-child(even) {
    background: var(--color-accent);
    width: 8px;
    height: 8px;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: #ff69b4;
}

.confetti:nth-child(2) {
    left: 20%;
    animation-delay: 1s;
}

.confetti:nth-child(3) {
    left: 30%;
    animation-delay: 2s;
    background: #ffd700;
}

.confetti:nth-child(4) {
    left: 40%;
    animation-delay: 3s;
}

.confetti:nth-child(5) {
    left: 50%;
    animation-delay: 4s;
    background: #87ceeb;
}

.confetti:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
}

.confetti:nth-child(7) {
    left: 70%;
    animation-delay: 6s;
    background: #98fb98;
}

.confetti:nth-child(8) {
    left: 80%;
    animation-delay: 7s;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .decorative-frame {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place {
        margin-bottom: 20px;
    }
    
    .podium-block {
        width: 150px;
        height: 80px !important;
    }
    
    .navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
    }
    
    .navigation,
    .floating-hearts,
    .confetti-container,
    .decorative-elements {
        display: none;
    }
    
    .decorative-frame {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
