/* Module Interpeller les députés — styles spécifiques */

.interpel-etape button:disabled,
.interpel-etape .bouton-principal:disabled,
.interpel-etape .bouton-secondaire:disabled {
    background: #d8d8d8 !important;
    border-color: #d8d8d8 !important;
    color: #8a8a8a !important;
    cursor: not-allowed;
    opacity: 1;
}

.interpel-etape {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.interpel-choix-source {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 700px) {
    .interpel-choix-source {
        grid-template-columns: 1fr;
    }
}

.interpel-carte-choix {
    padding: 1.25rem;
    border: 1px dashed #ccc;
    border-radius: 6px;
    text-align: center;
}

.interpel-carte-choix h3 {
    margin-top: 0;
}

.interpel-zone-upload {
    display: block;
    padding: 1rem;
    margin: 0.75rem 0;
    border: 2px dashed #999;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
}

.interpel-zone-upload input[type="file"] {
    display: block;
    margin-top: 0.5rem;
    width: 100%;
}

.interpel-apercu-destinataires {
    margin: 1rem 0;
}

.interpel-note {
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

.interpel-liste-lignes-ignorees {
    margin: 0.25rem 0 1rem;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: #7a5c00;
}

.alerte-attention {
    background: #fff8e6;
    border: 1px solid #f0d97a;
    color: #7a5c00;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.interpel-champ-sujet,
.interpel-champ-pj,
.interpel-champ-email,
.interpel-champ-public {
    margin: 1.25rem 0;
}

.interpel-champ-sujet label,
.interpel-champ-pj label,
.interpel-champ-email label,
.interpel-bloc-code label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.interpel-champ-sujet input[type="text"],
.interpel-champ-email input[type="email"],
.interpel-bloc-code input[type="text"] {
    width: 100%;
    max-width: 420px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.interpel-champ-public label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

/* --- Éditeur WYSIWYG --- */

.interpel-editeur {
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

.interpel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #f5f5f5;
    border-bottom: 1px solid #ccc;
}

.interpel-toolbar button {
    min-width: 2rem;
    padding: 0.35rem 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.interpel-toolbar button:hover {
    background: #e8e8e8;
}

.interpel-separateur {
    width: 1px;
    height: 1.5rem;
    background: #ccc;
    margin: 0 0.25rem;
}

.interpel-label-couleur {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.interpel-couleur-texte {
    width: 2rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.interpel-zone-edition {
    min-height: 220px;
    padding: 1rem;
    outline: none;
    line-height: 1.6;
}

.interpel-zone-edition:empty::before {
    content: attr(data-placeholder);
    color: #999;
}

.interpel-zone-edition h1 { font-size: 1.8rem; margin: 0.6em 0 0.4em; }
.interpel-zone-edition h2 { font-size: 1.5rem; margin: 0.6em 0 0.4em; }
.interpel-zone-edition h3 { font-size: 1.25rem; margin: 0.6em 0 0.4em; }
.interpel-zone-edition h4 { font-size: 1.1rem; margin: 0.6em 0 0.4em; }

/* --- Statuts / messages --- */

.interpel-message-statut {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.interpel-message-statut.interpel-succes {
    color: #1b7a1b;
}

.interpel-message-statut.interpel-erreur {
    color: #b3261e;
}

.interpel-bloc-code {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #ccc;
}

.alerte-info {
    background: #e8f0fe;
    border: 1px solid #a8c7fa;
    color: #1a3c6e;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

/* --- Étape 4 : récapitulatif --- */

.interpel-recap {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.interpel-recap-bloc {
    margin-top: 0.75rem;
}

.interpel-recap-contenu {
    margin-top: 0.35rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.interpel-champ-responsabilite {
    margin: 1.25rem 0;
    padding: 1rem;
    background: #fff8e6;
    border: 1px solid #f0d97a;
    border-radius: 6px;
}

.interpel-champ-responsabilite label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.5;
}

.interpel-actions-recap {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* --- Étape 5 : progression et rapport --- */

.interpel-barre-progression-conteneur {
    width: 100%;
    height: 1.5rem;
    background: #eee;
    border-radius: 999px;
    overflow: hidden;
    margin: 1rem 0 0.5rem;
}

.interpel-barre-progression {
    height: 100%;
    background: linear-gradient(90deg, #4a90d9, #2c6fb8);
    transition: width 0.3s ease;
}

.interpel-barre-progression.interpel-barre-indeterminee {
    width: 40% !important;
    background: linear-gradient(90deg, #4a90d9, #2c6fb8);
    animation: interpel-glissement 1.2s ease-in-out infinite;
}

@keyframes interpel-glissement {
    0%   { margin-left: 0%; }
    50%  { margin-left: 60%; }
    100% { margin-left: 0%; }
}

.interpel-journal-envoi {
    max-height: 260px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 0.75rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
}

.interpel-journal-ligne {
    padding: 0.15rem 0;
}

.interpel-journal-ligne.interpel-succes {
    color: #1b7a1b;
}

.interpel-journal-ligne.interpel-erreur {
    color: #b3261e;
}

.interpel-rapport-final {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f0f7f0;
    border: 1px solid #b8dab8;
    border-radius: 8px;
}

.interpel-rapport-final .interpel-succes {
    color: #1b7a1b;
    font-weight: 600;
}

.interpel-rapport-final .interpel-erreur {
    color: #b3261e;
    font-weight: 600;
}

/* --- Mode public : champ titre --- */

.interpel-champ-titre-public {
    margin-top: 0.75rem;
    padding-left: 1.6rem;
}

.interpel-champ-titre-public input[type="text"] {
    width: 100%;
    max-width: 420px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* --- Page lettre publique --- */

.interpel-compteur-lettre {
    color: #555;
    font-size: 0.95rem;
    margin: 0.5rem 0 1rem;
}

.interpel-contenu-lettre-publique {
    max-height: none;
}

.interpel-partage-reseaux {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e0e0e0;
}

.interpel-boutons-partage {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.interpel-bouton-partage {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
}

.interpel-partage-facebook { background: #1877f2; }
.interpel-partage-twitter { background: #000; }
.interpel-partage-linkedin { background: #0a66c2; }
.interpel-partage-whatsapp { background: #25d366; }
.interpel-partage-copier { background: #666; }

/* --- Grille de lettres publiques --- */

.interpel-grille-lettres {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.interpel-carte-lettre {
    display: block;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
}

.interpel-carte-lettre:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.interpel-carte-lettre h3 {
    margin-top: 0;
    color: #2c6fb8;
}

.interpel-extrait-lettre {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.interpel-compteur-lettre-carte {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

/* --- Admin : modération des lettres publiques --- */

.bloc-lettre-moderation {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.bloc-lettre-moderation h3 {
    margin-top: 0;
}

.bloc-actions-moderation {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.champ-motif-rejet {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.stat-carte-active {
    outline: 2px solid #2c6fb8;
}