/* --- VARIABLES --- */
:root {
    --primary: #4a90e2;
    --primary-dark: #357abd;
    --bg: #f0f2f5;
    --text: #1c1e21;
    --text-light: #606770;
    --card-bg: #ffffff;
    --border: #dddfe2;
    --success-bg: #d4edda;
    --success-text: #155724;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 15px; /* Padding réduit sur mobile */
}

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

h1 { 
    font-size: clamp(1.4rem, 5vw, 1.8rem); 
    margin-top: 0;
    color: #000;
    text-align: center;
}

p { 
    color: var(--text-light); 
    text-align: center;
    margin-bottom: 25px;
}

/* --- FORMULAIRE --- */
textarea {
    width: 100%;
    height: 140px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px; /* Évite le zoom auto sur iOS */
    resize: none;
    background: #f5f6f7;
    transition: all 0.2s;
    margin-bottom: 20px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.1s;
}

button:hover { background-color: var(--primary-dark); }
button:active { transform: scale(0.98); }

/* --- OPTIONS & SWITCH --- */
.public-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
}

.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 24px;
}
input:checked + .slider { background-color: var(--primary); }
.slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider:before { transform: translateX(20px); }

/* --- FEEDBACK ITEMS (Lectures) --- */
.feedback-item {
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.feedback-item small {
    display: block;
    color: #999;
    margin-bottom: 5px;
}

/* --- COMPTEUR & VERROU --- */
.glass-lock {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 30px 15px;
    border-radius: 20px;
    text-align: center;
}

.locked-icon { font-size: 3.5rem; margin-bottom: 15px; display: block; }

.countdown-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 25px 0;
}

.countdown-box {
    background: #1c1e21;
    color: #fff;
    padding: 12px 5px;
    border-radius: 12px;
}

.countdown-box span {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.countdown-box label {
    font-size: 0.6rem;
    text-transform: uppercase;
    opacity: 0.6;
}

/* --- MESSAGES D'ÉTAT --- */
.status-msg {
    background-color: var(--success-bg);
    color: var(--success-text);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- RESPONSIVE TABLETTE/PC --- */
@media (min-width: 480px) {
    .container { padding: 40px 20px; }
    .card { padding: 40px; }
    .countdown-box span { font-size: 1.8rem; }
    .countdown-box { padding: 15px; }
    .countdown-container { gap: 15px; }
}
/* --- OPTIMISATIONS IPAD / TABLETTES --- */

@media (min-width: 768px) {
    .container {
        max-width: 90%; /* On élargit un peu pour les tablettes */
    }

    /* Sur iPad, on peut afficher les feedbacks côte à côte */
    .feedback-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .card {
        padding: 40px;
    }

    h1 {
        font-size: 2.2rem;
    }

    /* On centre le formulaire pour ne pas qu'il soit trop large et illisible */
    form {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Le compteur est plus aéré sur tablette */
    .countdown-box {
        min-width: 100px;
    }
}

/* Pour le format iPad Pro ou paysage */
@media (min-width: 1024px) {
    .container {
        max-width: 900px;
    }
    
    .feedback-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    border: 3px solid white;
}

.logo-text {
    color: white;
    font-size: 2rem;
    font-weight: 900;
    font-family: serif; /* Pour un look un peu plus "Édition/Journal" */
}

