/* Import d'une police moderne */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #fff;
    color: #333;
    overflow-x: hidden; /* Évite le défilement horizontal */
}

/* BANNIÈRE RESPONSIVE */
.banniere {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.banniere img {
    width: 100%;
    height: auto;
    min-height: 80px;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

/* HEADER RESPONSIVE */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    flex-wrap: wrap;
    min-height: 70px;
}

.logo {
    color: #FF7626;
    font-size: clamp(20px, 4vw, 30px); /* Taille adaptative */
    font-weight: bold;
    flex-shrink: 0;
}

/* NAVBAR RESPONSIVE */
.navbar {
    background: white;
    border-bottom: 3px solid orange;
    width: 100%;
}

.menu {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    font-weight: bold;
    flex-wrap: wrap;
    justify-content: center;
}

.menu li {
    margin: 0;
}

.menu li a {
    display: block;
    padding: 12px 15px;
    color: orange;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    font-size: clamp(14px, 2vw, 16px);
}

.menu li a i {
    margin-right: 5px;
}

.menu li.active a {
    background-color: orange;
    color: white;
}

.inscription-btn {
    border: 2px solid orange;
    border-radius: 15px;
    padding: 8px 12px;
    color: #0d6e41d0;
    text-decoration: none;
    margin-left: 10px;
    font-size: clamp(12px, 2vw, 14px);
    white-space: nowrap;
}

.profile-icon {
    width: 24px;
    height: 24px;
    background-color: #8BC34A;
    border-radius: 50%;
    margin-left: 15px;
    flex-shrink: 0;
}

/* SECTION EMAIL PITCH RESPONSIVE */
.email-pitch {
    text-align: center;
    padding: 20px 15px;
    background: linear-gradient(to bottom, #fff, #f1f1f1);
}

form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

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

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #e8e8e8;
    font-size: 16px; /* Évite le zoom sur iOS */
    box-sizing: border-box;
}

textarea {
    height: 120px;
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    background-color: #FF7626;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 30px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    font-size: 16px;
    min-width: 120px;
}

/* CONTENEUR PRINCIPAL RESPONSIVE */
.container {
    margin: 10px auto;
    max-width: 95%;
    width: 100%;
    text-align: center;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 10px;
    border: 1px solid orange;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* TITRE RESPONSIVE */
h1 {
    font-size: clamp(16px, 4vw, 24px);
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

/* EFFET VAGUES RESPONSIVE */
.wave-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    margin-bottom: 15px;
    position: relative;
}

.wave {
    width: clamp(3px, 1vw, 4px);
    height: 10px;
    margin: 0 2px;
    background: #00ffea;
    border-radius: 8px;
    animation: wave-animation 1.5s infinite ease-in-out;
    opacity: 0.8;
}

.wave:nth-child(1) { animation-delay: 0s; }
.wave:nth-child(2) { animation-delay: 0.2s; }
.wave:nth-child(3) { animation-delay: 0.4s; }
.wave:nth-child(4) { animation-delay: 0.6s; }
.wave:nth-child(5) { animation-delay: 0.8s; }

@keyframes wave-animation {
    0%, 100% { height: 10px; }
    50% { height: clamp(25px, 6vw, 40px); }
}

/* BOUTONS RESPONSIVE */
.controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

button {
    background: #00ffea;
    border: none;
    padding: 10px 15px;
    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 3px 8px rgba(0, 255, 234, 0.3);
    min-width: 80px;
    margin: 3px;
}

button:disabled {
    background: gray;
    cursor: not-allowed;
}

button:hover:not(:disabled) {
    transform: scale(1.05);
}

button.stop {
    background: #ff4c4c;
    color: white;
    box-shadow: 0 3px 8px rgba(255, 76, 76, 0.3);
}

button.stop:hover:not(:disabled) {
    background: #ff1c1c;
}

button.envoyer {
    background: #4caf50;
    color: white;
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3);
}

button.envoyer:hover:not(:disabled) {
    background: #388e3c;
}

/* SECTION INFORMATION RESPONSIVE */
.information-section {
    margin-top: 20px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: auto;
}

.information-section form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto 1fr;
    gap: 15px;
    margin: 0 auto;
    width: 100%;
    max-width: 700px;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid green;
    box-sizing: border-box;
}

.information-section .modal-title {
    grid-column: span 2;
    text-align: center;
    font-size: clamp(18px, 4vw, 24px);
    margin-bottom: 15px;
    color: #FF7626;
}

.information-section .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.information-section .form-group label {
    font-size: clamp(14px, 2.5vw, 16px);
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.information-section .form-group input,
.information-section .form-group select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.information-section .form-group input:focus,
.information-section .form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.information-section #file {
    grid-column: span 2;
}

.information-section .form-group:last-child {
    grid-column: span 2;
    text-align: center;
    margin-top: 10px;
}

.information-section button.continue-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    min-width: 120px;
    transition: background-color 0.3s;
}

.information-section button.continue-btn:hover {
    background-color: #45a049;
}

/* ZONE DE TRANSCRIPTION RESPONSIVE */
.transcription {
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 400;
    color: #333;
    word-wrap: break-word;
    line-height: 1.4;
    text-align: left;
    margin-top: 15px;
}

.transcription::-webkit-scrollbar {
    width: 6px;
}

.transcription::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

/* FOOTER RESPONSIVE */
.footer {
    background-color: #f3efed;
    font-family: sans-serif;
    color: #333;
    margin-top: 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
    gap: 15px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin: 10px 0;
}

.footer-column h3 {
    background: orange;
    color: white;
    padding: 8px;
    margin: 0 0 10px 0;
    font-size: clamp(14px, 3vw, 18px);
    border-radius: 3px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin: 8px 0;
    line-height: 1.4;
}

.footer a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.footer a:hover {
    text-decoration: underline;
    color: #FF7626;
}

.social-icons img {
    width: 30px;
    margin-right: 10px;
    vertical-align: middle;
}

.playstore {
    width: 40px;
    margin-top: 5px;
}

.footer-bottom {
    background: #000;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: clamp(12px, 2vw, 14px);
}

/* MODAL RESPONSIVE */
.modal-confirmation {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    box-sizing: border-box;
}

.contenu-modal-confirmation {
    background-color: #fff;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.fermer-modal-confirmation {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.fermer-modal-confirmation:hover,
.fermer-modal-confirmation:focus {
    color: black;
}

#btnOkModalConfirmation {
    background-color: #4CAF50;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    min-width: 100px;
}

#btnOkModalConfirmation:hover {
    background-color: #45a049;
}

/* SELECT2 RESPONSIVE */
.select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

/* STYLES UTILITAIRES */
.required {
    color: red;
    font-weight: bold;
}

.required-star {
    color: red;
    font-size: 16px;
    margin-left: 3px;
}

a {
    text-decoration: none;
}

/* MEDIA QUERIES POUR DIFFÉRENTES TAILLES D'ÉCRAN */

/* Tablettes en portrait (768px et moins) */
@media (max-width: 768px) {
    .container {
        margin: 5px;
        padding: 10px;
        max-width: 98%;
    }
    
    header {
        flex-direction: column;
        padding: 10px 15px;
        text-align: center;
        gap: 10px;
    }
    
    .menu {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .menu li a {
        padding: 10px 15px;
        text-align: center;
    }
    
    .information-section form {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }
    
    .information-section .modal-title,
    .information-section #file,
    .information-section .form-group:last-child {
        grid-column: span 1;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .controls button {
        width: 80%;
        max-width: 200px;
        margin: 5px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-column {
        min-width: 100%;
        margin: 15px 0;
    }
    
    .wave-container {
        height: 30px;
    }
    
    .transcription {
        font-size: 15px;
        padding: 10px;
        max-height: 150px;
    }
}

/* Smartphones (480px et moins) */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .container {
        margin: 2px;
        padding: 8px;
        border-radius: 5px;
    }
    
    header {
        padding: 8px 10px;
        min-height: 60px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .banniere img {
        height: 80px;
    }
    
    .information-section {
        padding: 10px;
    }
    
    .information-section form {
        padding: 12px;
        gap: 10px;
    }
    
    .information-section .form-group input,
    .information-section .form-group select,
    input, textarea, select {
        padding: 10px;
        font-size: 16px; /* Important pour éviter le zoom sur iOS */
    }
    
    button {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 70px;
    }
    
    .controls button {
        width: 90%;
        max-width: 250px;
        padding: 12px;
        font-size: 15px;
    }
    
    .wave-container {
        height: 25px;
        margin-bottom: 10px;
    }
    
    .wave {
        width: 3px;
        margin: 0 1px;
    }
    
    .transcription {
        min-height: 60px;
        max-height: 120px;
        font-size: 14px;
        padding: 8px;
    }
    
    .modal-confirmation {
        padding: 10px;
    }
    
    .contenu-modal-confirmation {
        width: 95%;
        padding: 15px;
    }
    
    .footer-content {
        padding: 15px 10px;
    }
    
    .footer-bottom {
        padding: 10px;
    }
}

/* Très petits écrans (320px et moins) */
@media (max-width: 320px) {
    .container {
        margin: 1px;
        padding: 5px;
    }
    
    .information-section form {
        padding: 8px;
        gap: 8px;
    }
    
    .controls button {
        width: 95%;
        font-size: 13px;
        padding: 10px;
    }
    
    h1 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .transcription {
        font-size: 13px;
        min-height: 50px;
        max-height: 100px;
        padding: 6px;
    }
}

/* Écrans larges (1200px et plus) */
@media (min-width: 1200px) {
    .container {
        max-width: 800px;
    }
    
    .information-section form {
        max-width: 800px;
        gap: 20px;
        padding: 25px;
    }
    
    .footer-content {
        padding: 30px 50px;
    }
    
    header {
        padding: 20px 50px;
    }
}

/* Mode paysage pour smartphones */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        margin: 5px auto;
    }
    
    .wave-container {
        height: 20px;
        margin: 10px 0;
    }
    
    .information-section {
        min-height: auto;
        padding: 10px;
    }
    
    .transcription {
        max-height: 80px;
    }
    
    .modal-confirmation {
        padding: 5px;
    }
    
    .contenu-modal-confirmation {
        top: 20%;
        transform: translateY(-20%);
    }
}
