/* Version mobile header - v2.0 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0510 0%, #130820 50%, #1f0b2e 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 60px;
    /* Espace pour le footer */
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(189, 153, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 40%, rgba(255, 108, 178, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 179, 103, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    min-height: 100vh;
}

.main-content {
    display: flex;
    flex-direction: column;
}

.header {
    background: rgba(19, 8, 32, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(189, 153, 255, 0.2);
    box-shadow: 0 8px 32px rgba(189, 153, 255, 0.1);
}

.header h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(189, 153, 255, 0.3);
    background: linear-gradient(135deg, #BD99FF, #FF6CB2, #FFB367);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 400;
}

.header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo-container {
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(189, 153, 255, 0.3));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 20px rgba(189, 153, 255, 0.5));
}

.header-content {
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Augmenté l'espacement entre les icônes */
    margin-left: 1rem;
    flex: 0 0 auto;
}

.header-admin-btn {
    background: rgba(189, 153, 255, 0.1);
    border: 1px solid rgba(189, 153, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    width: 3rem;
    height: 3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(189, 153, 255, 0.2);
}

.header-admin-btn:hover {
    background: rgba(189, 153, 255, 0.2);
    border-color: rgba(189, 153, 255, 0.5);
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(189, 153, 255, 0.35);
}

.header-admin-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(189, 153, 255, 0.25);
}

.login-icon {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 108, 178, 0.1);
    border: 1px solid rgba(255, 108, 178, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
}

.login-icon:hover {
    background: rgba(255, 108, 178, 0.2);
    border-color: rgba(255, 108, 178, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 108, 178, 0.3);
}

.login-icon,
.header-admin-btn {
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    flex: 0.6;
}

/* Styles pour le drag & drop */
.app-card {
    background: rgba(19, 8, 32, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0.75rem;
    border: 1px solid rgba(189, 153, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(189, 153, 255, 0.1);
    user-select: none;
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(189, 153, 255, 0.2);
    background: rgba(19, 8, 32, 0.85);
    border: 1px solid rgba(189, 153, 255, 0.4);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(189, 153, 255, 0.1) 0%, rgba(255, 108, 178, 0.1) 50%, rgba(255, 179, 103, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover::before {
    opacity: 1;
}

/* En-tête des cartes avec icône et titre sur la même ligne - v4 */
.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #BD99FF, #FF6CB2);
    box-shadow: 0 4px 15px rgba(189, 153, 255, 0.4);
    flex-shrink: 0;
    /* Empêche l'icône de rétrécir */
}

.app-card:nth-child(2n) .app-icon {
    background: linear-gradient(135deg, #FF6CB2, #FFB367);
    box-shadow: 0 4px 15px rgba(255, 108, 178, 0.4);
}

.app-card:nth-child(3n) .app-icon {
    background: linear-gradient(135deg, #FFB367, #BD99FF);
    box-shadow: 0 4px 15px rgba(255, 179, 103, 0.4);
}

.app-card:nth-child(4n) .app-icon {
    background: linear-gradient(135deg, #BD99FF, #FFB367);
    box-shadow: 0 4px 15px rgba(189, 153, 255, 0.4);
}

.app-card:nth-child(5n) .app-icon {
    background: linear-gradient(135deg, #FF6CB2, #BD99FF);
    box-shadow: 0 4px 15px rgba(255, 108, 178, 0.4);
}

.app-card:nth-child(6n) .app-icon {
    background: linear-gradient(135deg, #FFB367, #FF6CB2);
    box-shadow: 0 4px 15px rgba(255, 179, 103, 0.4);
}

.app-header h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    /* Supprime les marges pour le flexbox */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex: 1;
    /* Le titre prend l'espace restant */
    line-height: 1.2;
    /* Améliore l'alignement vertical */
}

.app-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.4;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-widget {
    background: rgba(19, 8, 32, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(189, 153, 255, 0.3);
    box-shadow: 0 8px 32px rgba(189, 153, 255, 0.1);
}

.news-widget h2 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(189, 153, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-toggle-icon {
    display: none;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.news-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(189, 153, 255, 0.2);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.news-item:last-child {
    border-bottom: none;
}

.news-content {
    flex: 1;
    margin-right: 0.5rem;
}

.news-item h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.news-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    line-height: 1.3;
}

.news-date {
    color: rgba(255, 179, 103, 0.8);
    font-size: 0.7rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #BD99FF, #FF6CB2);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 25px rgba(189, 153, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    opacity: 0.9;
}

.chatbot-button img {
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.chatbot-button:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 15px 35px rgba(189, 153, 255, 0.7);
    opacity: 1;
}

.chatbot-button::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #BD99FF, #FF6CB2, #FFB367, #BD99FF);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chatbot-button:hover::before {
    opacity: 0.8;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-card {
    animation: fadeInUp 0.6s ease forwards;
}

.app-card:nth-child(1) {
    animation-delay: 0.1s;
}

.app-card:nth-child(2) {
    animation-delay: 0.2s;
}

.app-card:nth-child(3) {
    animation-delay: 0.3s;
}

.app-card:nth-child(4) {
    animation-delay: 0.4s;
}

.app-card:nth-child(5) {
    animation-delay: 0.5s;
}

.app-card:nth-child(6) {
    animation-delay: 0.6s;
}

.app-card:nth-child(7) {
    animation-delay: 0.7s;
}

.app-card:nth-child(8) {
    animation-delay: 0.8s;
}

/* Footer */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(30, 15, 50, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(189, 153, 255, 0.15);
    padding: 0.75rem 1rem;
    text-align: center;
    z-index: 100;
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .sidebar {
        order: -1;
    }

    .header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1rem;
    }

    .header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header p {
        font-size: 1rem;
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        justify-items: center;
    }

    .app-card {
        width: 100%;
        max-width: 200px;
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .app-header {
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .app-icon {
        width: 96px;
        height: 96px;
        border-radius: 20px;
        font-size: 2.4rem;
    }

    .app-header h3 {
        font-size: 1.15rem;
    }

    /* Masquer les descriptions des app-cards sur mobile */
    .app-card p {
        display: none;
    }

    .news-widget {
        padding: 1.2rem;
    }

    /* Styles pour le repliage des news sur mobile */
    .news-toggle-icon {
        display: inline-block;
    }

    .news-widget h2 {
        cursor: pointer;
        user-select: none;
        transition: all 0.3s ease;
    }

    .news-widget h2:hover {
        color: rgba(255, 108, 178, 0.9);
    }

    .news-widget h2:active {
        transform: scale(0.98);
    }

    /* Par défaut, les news sont repliées sur mobile */
    .news-widget.news-collapsed #newsContainer {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease;
    }

    .news-widget:not(.news-collapsed) #newsContainer {
        max-height: 2000px;
        opacity: 1;
        transition: max-height 0.4s ease, opacity 0.3s ease;
    }

    .chatbot-button {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .app-card {
        max-width: 180px;
        padding: 0.85rem;
        border-radius: 16px;
    }

    .app-card h3 {
        font-size: 1.05rem;
    }

    .app-card p {
        font-size: 0.85rem;
    }

    .app-header {
        gap: 0.65rem;
    }

    .app-icon {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }

    .app-header h3 {
        font-size: 1.08rem;
    }

    .news-widget {
        padding: 1rem;
    }

    .news-widget h2 {
        font-size: 1.1rem;
    }

    .news-item {
        padding: 0.75rem 0;
    }

    .chatbot-button {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0.5rem;
    }

    .header {
        padding: 0.75rem;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .apps-grid {
        gap: 0.65rem;
    }

    .app-card {
        max-width: 160px;
        padding: 0.75rem;
    }

    .app-header {
        gap: 0.55rem;
    }

    .app-icon {
        width: 82px;
        height: 82px;
        font-size: 2rem;
    }

    .app-header h3 {
        font-size: 1rem;
    }

    .news-widget {
        padding: 0.75rem;
    }
}

/* Styles pour les modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(20, 10, 35, 0.95);
    border: 1px solid rgba(189, 153, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(189, 153, 255, 0.4);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(189, 153, 255, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    opacity: 1;
    background: rgba(255, 105, 180, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 105, 180, 0.3);
    border-radius: 8px;
    background: rgba(30, 15, 50, 0.6);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(189, 153, 255, 0.6);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #BD99FF 0%, #FF6CB2 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(189, 153, 255, 0.4);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Voice modal styles */
.voice-modal-content {
    max-width: 580px;
    max-height: 85vh;
    background: linear-gradient(135deg, rgba(20, 10, 35, 0.98), rgba(30, 15, 50, 0.95));
    box-shadow: 0 25px 70px rgba(114, 9, 183, 0.5);
    overflow: hidden;
}

.voice-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: calc(85vh - 190px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.voice-intro {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
}

/* Visualisation audio */
.audio-visualizer-container {
    position: relative;
    width: 100%;
    height: 160px;
    background: rgba(20, 10, 35, 0.8);
    border: 2px solid rgba(255, 105, 180, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.3);
}

.audio-visualizer-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.audio-visualizer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.audio-visualizer-container:hover .audio-visualizer-overlay {
    opacity: 0.5;
}

.audio-mic-icon {
    font-size: 4rem;
    filter: drop-shadow(0 4px 15px rgba(255, 105, 180, 0.6));
}

.voice-record-button {
    align-self: center;
    background: linear-gradient(135deg, #ff69b4, #8a2be2);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 20px rgba(114, 9, 183, 0.3);
}

.voice-record-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(114, 9, 183, 0.45);
}

.voice-record-button:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
}

.voice-record-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.voice-record-button.is-recording {
    background: linear-gradient(135deg, #ff4500, #ff69b4);
    box-shadow: 0 12px 30px rgba(255, 69, 0, 0.5);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

.record-btn-icon {
    font-size: 1.3rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.record-btn-text {
    font-size: 1rem;
    white-space: nowrap;
}

.voice-record-button.is-recording .record-btn-icon {
    animation: pulseIcon 1s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 12px 30px rgba(255, 69, 0, 0.5);
    }

    50% {
        box-shadow: 0 12px 40px rgba(255, 69, 0, 0.7), 0 0 0 15px rgba(255, 105, 180, 0);
    }
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.voice-status {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 105, 180, 0.1);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid rgba(255, 105, 180, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.voice-status--idle {
    background: rgba(255, 105, 180, 0.1);
    border-color: rgba(255, 105, 180, 0.25);
}

.voice-status--recording {
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 140, 0, 0.5);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.2);
}

.voice-status--ready {
    background: rgba(0, 173, 181, 0.15);
    border-color: rgba(0, 173, 181, 0.5);
    box-shadow: 0 4px 15px rgba(0, 173, 181, 0.2);
}

.voice-status--loading {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(118, 75, 162, 0.5);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.voice-status--error {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.6);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
}

.voice-status--success {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.6);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.voice-transcript {
    width: 100%;
    min-height: 130px;
    padding: 1.25rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 105, 180, 0.3);
    background: rgba(20, 10, 35, 0.7);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.voice-transcript:focus {
    outline: none;
    border-color: rgba(189, 153, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.1);
}

.voice-transcript[readonly] {
    cursor: default;
}

.voice-transcript::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Conteneur de transcription avec transition */
.voice-transcript-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.voice-transcript-container.voice-transcript-visible {
    max-height: 180px;
    opacity: 1;
    margin: 1.5rem 0;
    padding: 0;
}

.voice-transcript-container.voice-transcript-hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive pour la modale vocale sur mobile */
@media (max-width: 480px) {
    .voice-modal-content {
        max-width: 95%;
        padding: 1.5rem;
    }

    .audio-visualizer-container {
        height: 150px;
    }

    .audio-mic-icon {
        font-size: 3rem;
    }

    .voice-record-button {
        padding: 0.85rem 1.75rem;
        font-size: 1rem;
        gap: 0.5rem;
    }

    .record-btn-icon {
        font-size: 1.1rem;
    }

    .record-btn-text {
        font-size: 0.9rem;
    }

    .voice-status {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .voice-transcript {
        min-height: 120px;
        padding: 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .voice-modal-content {
        padding: 1rem;
    }

    .voice-intro {
        font-size: 0.9rem;
    }

    .audio-visualizer-container {
        height: 120px;
    }

    .audio-mic-icon {
        font-size: 2.5rem;
    }

    .voice-record-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .record-btn-icon {
        font-size: 1rem;
    }

    .record-btn-text {
        font-size: 0.85rem;
    }
}