/* ==========================================================================
   Design System "Swiss Style" + Gamification
   Palette:
   - Rouge Suisse : #FF0000 -> #D52B1E (Rouge officiel drapeau suisse)
   - Blanc : #FFFFFF
   - Dark/Texte : #1D1D1B
   - Gris clair : #F2F2F2
   - Accent (Or/Points) : #FFC107
   Typography:
   - Helvetica Neue, Arial (Très Suisse, sans-serif propre)
   ========================================================================== */

:root {
    --swiss-red: #D52B1E;
    --swiss-white: #FFFFFF;
    --text-dark: #1D1D1B;
    --bg-light: #F9F9F9;
    --gray: #E0E0E0;
    --gold: #FFC107;
    --green-success: #4CAF50;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Typographie --- */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }

/* --- Header / Navigation --- */
header {
    background-color: var(--swiss-red);
    color: var(--swiss-white);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(213, 43, 30, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.user-stats .points {
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- Layout Principal --- */
main {
    flex: 1;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.card {
    background: var(--swiss-white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    text-align: center;
}

/* --- Boutons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--swiss-red);
    color: white;
    box-shadow: 0 4px 0 #A31F14;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #A31F14;
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #A31F14;
}

.btn-secondary {
    background-color: #EEE;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #DDD;
}

/* Boutons de Sondage (Oui/Non) géants pour mobile */
.survey-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn-survey {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-yes {
    color: var(--green-success);
    border-color: var(--green-success);
}
.btn-yes:hover {
    background: var(--green-success);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.btn-no {
    color: var(--swiss-red);
    border-color: var(--swiss-red);
}
.btn-no:hover {
    background: var(--swiss-red);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* --- Formulaires --- */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--swiss-red);
}

/* --- Badges / Confiance Suisse --- */
.trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
}

.trust-badge img {
    height: 24px;
}

/* --- Animations de Gamification --- */
@keyframes coinCollect {
    0% { transform: scale(0.5) translateY(50px); opacity: 0; }
    50% { transform: scale(1.2) translateY(-20px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 0; }
}

.coin-animation {
    position: fixed;
    pointer-events: none;
    font-size: 2rem;
    animation: coinCollect 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.points-added {
    color: var(--green-success);
    font-weight: bold;
    font-size: 1.2rem;
    position: absolute;
    animation: fadeUp 1s forwards;
    pointer-events: none;
}

@keyframes fadeUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-30px); opacity: 0; }
}

/* --- Mascotte --- */
.mascot-container {
    margin-bottom: -20px;
    position: relative;
    z-index: 10;
}

.mascot-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background-color: white;
    object-fit: cover;
}

.mascot-bubble {
    position: absolute;
    top: -20px;
    right: 20%;
    background: white;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    font-weight: bold;
    border: 2px solid var(--swiss-red);
}
.mascot-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: var(--swiss-red) transparent;
    display: block;
    width: 0;
}
.mascot-bubble::before {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 22px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: white transparent;
    display: block;
    width: 0;
    z-index: 1;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 0.9rem;
    background: white;
    margin-top: auto;
}
