/* === Variables CSS === */
:root {
    --color-red: #c41e3a;
    --color-green: #0f7e3e;
    --color-gold: #ffd700;
    --color-white: #ffffff;
    --color-snow: #f0f8ff;
    --color-dark: #1a1a1a;
    --color-gray: #666666;
    --color-light-gray: #e0e0e0;

    --gradient-christmas: linear-gradient(135deg, var(--color-red) 0%, #8b0000 100%);
    --gradient-santa: linear-gradient(135deg, #d32f2f 0%, #c41e3a 100%);
    --shadow-large: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-small: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Optimisations iOS/Safari */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #0f4c81 0%, #1a5490 50%, #0f4c81 100%);
    min-height: 100vh;
    color: var(--color-dark);
    /* Amélioration du rendu sur iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

/* === Animation des flocons de neige === */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: var(--color-white);
    font-size: 1.5em;
    user-select: none;
    animation: snowfall linear infinite;
    opacity: 0.8;
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 2s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 1s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 3s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 0s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 2s; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 1s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 4s; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 0s; }
.snowflake:nth-child(10) { left: 15%; animation-duration: 11s; animation-delay: 3s; }

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* === Container === */
.container {
    max-width: 1442px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* === Header === */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--gradient-christmas);
    border-radius: 20px;
    box-shadow: var(--shadow-large);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '🌟';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 2em;
    animation: twinkle 2s infinite;
}

.header::after {
    content: '🌟';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2em;
    animation: twinkle 2s infinite 1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.title {
    font-size: 3em;
    color: var(--color-white);
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.santa-icon {
    display: inline-block;
    animation: bounce 2s infinite;
}

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

.subtitle {
    font-size: 1.3em;
    color: var(--color-gold);
    font-weight: 500;
}

/* === Screens === */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

/* === Cards === */
.card {
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: var(--shadow-large);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    background: var(--gradient-santa);
    color: var(--color-white);
    padding: 30px;
    text-align: center;
}

.card-header h2 {
    font-size: 2em;
    margin-bottom: 10px;
}

.card-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.card-body {
    padding: 40px;
}

/* === Input Group === */
.input-group {
    margin-bottom: 30px;
}

.name-input {
    width: 100%;
    padding: 20px;
    font-size: max(16px, 1.5em); /* Empêche le zoom auto sur iOS (min 16px) */
    border: 3px solid var(--color-green);
    border-radius: 15px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
    /* Optimisations iOS/Safari */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.name-input:focus {
    border-color: var(--color-red);
    box-shadow: 0 0 0 5px rgba(196, 30, 58, 0.1);
    transform: scale(1.02);
}

/* Labels pour les champs */
.input-label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--color-green);
    text-align: left;
    padding-left: 5px;
}

/* Conteneur pour le champ âge + "ans" */
.age-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/* Champ âge plus petit */
.age-input {
    flex: 0 1 120px;
    max-width: 120px;
}

/* Suffixe "ans" */
.age-suffix {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-green);
    white-space: nowrap;
}

/* === Buttons === */
.btn {
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Optimisations iOS/Safari */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-christmas);
    color: var(--color-white);
}

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

.btn-large {
    width: 100%;
    padding: 25px;
    font-size: 1.5em;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
    border-radius: 8px;
}

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

/* === Recording Button === */
.btn-record {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--gradient-christmas);
    color: var(--color-white);
    font-size: 1.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.4);
    transition: all 0.3s ease;
    margin: 0 auto;
}

.btn-record:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.6);
}

.btn-record.recording {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    animation: pulse 1s infinite;
}

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

.record-icon {
    font-size: 3em;
}

/* === Voice Controls === */
.voice-controls {
    text-align: center;
    padding: 30px;
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: var(--shadow-large);
}

.recording-status {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--color-light-gray);
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 500;
}

.recording-status.active {
    background: #ffebee;
    color: var(--color-red);
    animation: pulse-bg 1s infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.instructions {
    margin-top: 20px;
    color: var(--color-gray);
    font-size: 1em;
}

/* === Chat - Layout Visiophone === */
.chat-container {
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: var(--shadow-large);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 95vh;
    position: relative;
}

.child-info {
    background: rgba(196, 30, 58, 0.95);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
}

.child-name-display {
    color: var(--color-white);
    font-size: 1.1em;
    font-weight: 600;
}

.chat-messages {
    padding: 20px;
    max-height: 35vh;
    min-height: 200px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f0f8ff 0%, #ffffff 100%);
    flex: 1;
    border-radius: 0 0 20px 20px;
}

.message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease-out;
}

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

.message-santa {
    flex-direction: row;
}

.message-child {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 2em;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-content {
    flex: 1;
    max-width: 75%;
}

.message-santa .message-content {
    background: var(--gradient-christmas);
    color: var(--color-white);
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
}

.message-child .message-content {
    background: var(--color-green);
    color: var(--color-white);
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    text-align: right;
}

.message-text {
    font-size: 1em;
    line-height: 1.4;
}

/* === Transcription === */
.transcription-display {
    padding: 20px;
    background: #e8f5e9;
    border-radius: 15px;
    margin: 20px 30px;
    animation: fadeIn 0.3s ease-in-out;
}

.transcription-label {
    font-weight: 600;
    color: var(--color-green);
    margin-bottom: 10px;
}

.transcription-text {
    font-size: 1.2em;
    color: var(--color-dark);
}

/* === Loading Indicator === */
.loading-indicator {
    text-align: center;
    padding: 30px;
    animation: fadeIn 0.3s ease-in-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--color-light-gray);
    border-top-color: var(--color-red);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2em;
    color: var(--color-red);
    font-weight: 600;
}

/* === Services Status === */
.services-status {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-medium);
}

.status-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--color-dark);
    text-align: center;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: var(--shadow-small);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-gray);
    transition: background 0.3s ease;
}

.status-item.online .status-dot {
    background: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.status-item.offline .status-dot {
    background: #f44336;
}

.status-label {
    font-size: 0.9em;
    color: var(--color-dark);
}

/* === Hint === */
.hint {
    text-align: center;
    color: var(--color-gray);
    font-size: 0.9em;
    margin-top: 15px;
    font-style: italic;
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--color-white);
    font-size: 1.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* === Responsive === */
@media (max-width: 768px) {
    .title {
        font-size: 2em;
    }

    .btn-large {
        font-size: 1.2em;
    }

    .btn-record {
        width: 150px;
        height: 150px;
    }

    .record-icon {
        font-size: 2em;
    }

    .message-text {
        font-size: 1em;
    }

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

/* === Onglets === */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 10px;
    box-shadow: var(--shadow-medium);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-gray);
}

.tab-btn:hover {
    background: rgba(196, 30, 58, 0.1);
}

.tab-btn.active {
    background: var(--gradient-christmas);
    color: var(--color-white);
    box-shadow: var(--shadow-small);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* === Paramètres === */
.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.setting-select {
    width: 100%;
    padding: 15px;
    font-size: max(16px, 1em); /* Empêche le zoom auto sur iOS (min 16px) */
    border: 2px solid var(--color-light-gray);
    border-radius: 10px;
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
    /* Optimisations iOS/Safari */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.setting-select:hover {
    border-color: var(--color-green);
}

.setting-select:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

/* === Zone de saisie texte - Style Visiophone === */
.text-input-controls {
    padding: 15px 20px;
    background: var(--color-white);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.input-status {
    display: none; /* Caché dans le mode visiophone pour gagner de l'espace */
}

.text-input-area {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-textarea {
    flex: 1;
    padding: 12px 15px;
    font-size: max(16px, 1em); /* Empêche le zoom auto sur iOS (min 16px) */
    border: 2px solid var(--color-green);
    border-radius: 20px;
    resize: none;
    font-family: inherit;
    transition: all 0.3s ease;
    max-height: 80px;
    min-height: 44px;
    /* Optimisations iOS/Safari */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.message-textarea:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.btn-mic {
    padding: 0;
    background: var(--color-green);
    color: var(--color-white);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 36px; /* Emoji plus gros */
}

.btn-mic:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(15, 126, 62, 0.4);
}

.btn-mic.recording {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    animation: pulse-mic 1s infinite;
}

@keyframes pulse-mic {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
}

.btn-send {
    padding: 12px 24px;
    background: var(--gradient-christmas);
    color: var(--color-white);
    min-width: 110px;
    border-radius: 20px;
    height: 44px;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.text-input-controls .instructions {
    display: none; /* Caché dans le mode visiophone */
}

/* === Animation du Père Noël avec Lipsync === */
.santa-animation {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.santa-avatar {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.santa-base {
    font-size: 140px;
    animation: idle-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

/* États de la bouche - superposés */
.santa-mouth {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 140px;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

/* Animation au repos */
@keyframes idle-bounce {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Animation bounce quand il parle */
.santa-animation.speaking .santa-base {
    animation: speaking-bounce 0.3s ease-in-out infinite;
}

@keyframes speaking-bounce {
    0%, 100% {
        transform: scale(0.98) rotate(-1deg);
    }
    50% {
        transform: scale(1.05) rotate(1deg);
    }
}

/* Séquence de lipsync - cycle rapide de 0.6s */
.santa-animation.speaking .santa-mouth-closed {
    animation: mouth-closed-cycle 0.6s steps(1) infinite;
}

.santa-animation.speaking .santa-mouth-open {
    animation: mouth-open-cycle 0.6s steps(1) infinite;
}

.santa-animation.speaking .santa-mouth-mid {
    animation: mouth-mid-cycle 0.6s steps(1) infinite;
}

@keyframes mouth-closed-cycle {
    0%, 20% { opacity: 1; }
    20.01%, 100% { opacity: 0; }
}

@keyframes mouth-open-cycle {
    0%, 20% { opacity: 0; }
    20.01%, 60% { opacity: 1; }
    60.01%, 100% { opacity: 0; }
}

@keyframes mouth-mid-cycle {
    0%, 60% { opacity: 0; }
    60.01%, 100% { opacity: 1; }
}

/* Variations visuelles pour le lipsync avec emojis différents */
.santa-mouth-closed::before {
    content: '😊';
    display: block;
}

.santa-mouth-open::before {
    content: '😮';
    display: block;
}

.santa-mouth-mid::before {
    content: '🙂';
    display: block;
}

/* Bulle de parole */
.santa-speaking {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.santa-animation.speaking .santa-speaking {
    opacity: 1;
}

.speech-bubble {
    background: white;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    animation: pulse 1s ease-in-out infinite;
    white-space: nowrap;
}

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

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

/* === Boutons de questions rapides === */
.quick-questions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding: 0;
}

.quick-btn {
    background: linear-gradient(135deg, #2c7a3f 0%, #1d5c2e 100%);
    color: white;
    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.quick-btn:hover {
    background: linear-gradient(135deg, #35904d 0%, #256838 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
    border-color: #ffed4e;
}

.quick-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* === Écran d'appel téléphonique === */
.call-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #1a5490 0%, #0f4c81 100%);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.call-screen.active {
    display: flex;
    opacity: 1;
}

.call-overlay {
    text-align: center;
    color: white;
}

.call-avatar {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    font-size: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(196, 30, 58, 0.5);
    animation: call-vibrate 0.5s ease-in-out infinite;
}

.call-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: ring-pulse 1.5s ease-out infinite;
}

.ring:nth-child(2) {
    animation-delay: 0.5s;
}

.ring:nth-child(3) {
    animation-delay: 1s;
}

@keyframes call-vibrate {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-3px) rotate(-1deg);
    }
    75% {
        transform: translateX(3px) rotate(1deg);
    }
}

@keyframes ring-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.call-name {
    font-size: 3em;
    margin: 0 0 15px 0;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.call-status {
    font-size: 1.5em;
    margin: 0 0 20px 0;
    opacity: 0.9;
    animation: call-blink 1.5s ease-in-out infinite;
}

.call-timer {
    font-size: 2em;
    font-weight: 300;
    opacity: 0.8;
    font-family: monospace;
}

@keyframes call-blink {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.5;
    }
}

/* === Responsive - Mode Visiophone Mobile === */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }

    .container {
        padding: 10px;
    }

    .chat-container {
        max-height: 100vh;
    }

    .child-info {
        padding: 8px 10px;
        font-size: 0.8em;
        gap: 8px;
    }

    .child-name-display {
        font-size: 0.9em;
    }

    .btn-small {
        padding: 5px 10px;
        font-size: 0.75em;
    }

    .chat-messages {
        max-height: 18vh;
        padding: 8px;
        font-size: 0.8em;
        overflow-y: auto;
    }

    .message-avatar {
        font-size: 1.5em;
        width: 32px;
        height: 32px;
    }

    .message-text {
        font-size: 0.95em;
    }

    /* Écran d'appel adapté mobile - même taille que la vidéo */
    .call-overlay {
        max-width: 380px;
        margin: 0 auto;
        padding: 20px;
    }

    .call-avatar {
        width: 180px;
        height: 180px;
        font-size: 100px;
        margin: 0 auto 20px;
    }

    .call-rings .ring {
        width: 200px;
        height: 200px;
    }

    .call-name {
        font-size: 2em;
    }

    .call-status {
        font-size: 1.2em;
    }

    .call-timer {
        font-size: 1.5em;
    }

    .text-input-area {
        gap: 8px;
    }

    .message-textarea {
        font-size: 0.95em;
        padding: 10px 12px;
        min-height: 40px;
    }

    .btn-mic {
        width: 40px;
        height: 40px;
    }

    .btn-send {
        min-width: 90px;
        padding: 10px 16px;
        font-size: 0.9em;
        height: 40px;
    }

    .text-input-controls {
        padding: 12px 15px;
    }

    .santa-animation {
        bottom: 10px;
        right: 10px;
    }

    .santa-avatar {
        width: 120px;
        height: 120px;
    }

    .santa-base {
        font-size: 100px;
    }

    .santa-mouth {
        font-size: 100px;
    }

    .speech-bubble {
        font-size: 18px;
        padding: 8px 15px;
    }

    .quick-questions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        margin-top: 8px;
    }

    .quick-btn {
        padding: 8px 10px;
        font-size: 0.75em;
        border-radius: 8px;
    }

    .text-input-controls {
        padding: 8px 10px;
    }

    .input-status {
        margin-bottom: 8px;
        font-size: 0.85em;
    }

    .instructions {
        display: none; /* Caché sur mobile pour gagner de l'espace */
    }
}
