/* ===============================
   RESET & BASE
=============================== */
body {
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    background:#f9fafb;
    padding:0px;
}

.phrases {
    margin-left:20px;
}
@media (max-width:700px){
    .phrases{
        margin-left:10px;
    }
}

/* Carte générique */

.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 28px;
    margin-top: 22px;
    margin-bottom: 22px;
    box-shadow:
        0 10px 24px rgba(0,0,0,0.04),
        0 2px 6px rgba(0,0,0,0.03);
}

.card.big {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ligne texte + bouton */
.text-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* texte japonais */
.source {
    line-height: 1.8;
    flex: 1;
}

/* bouton audio */
.audio-btn {
    background: #2563eb;
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.2s ease;
}

.audio-btn:hover {
    background: #1e4fd6;
    transform: scale(1.05);
}

.audio-btn:active {
    transform: scale(0.95);
}

.lang-badge {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}
/* ===============================
   FORMULAIRE
=============================== */

.analyser-form form {
    max-width: 700px;
    width: 100%;
    margin: 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-sizing: border-box;
}


/* =========================== ====
   MOBILE

@media (max-width: 700px) {

    form {
        margin: 0;
        border-radius: 0;
        padding: 20px 16px;
        max-width: 100%;
    }

}
=============================== */


.filter-form{
    display:flex;
    align-items:flex-end;
    gap:18px;
    margin-bottom:20px;
    flex-wrap:wrap;
}

.filter-group{
    display:flex;
    flex-direction:column;
    font-size:13px;
    color:#555;
}

.filter-group label{
    margin-bottom:4px;
}

.filter-form select{
    padding:7px 10px;
    border-radius:6px;
    border:1px solid #ddd;
    font-size:14px;
}

.filter-form select:focus{
    outline:none;
    border-color:#4f46e5;
}

.filter-form button{
    padding:8px 14px;
    border:none;
    border-radius:6px;
    background:#4f46e5;
    color:white;
    font-size:14px;
    cursor:pointer;
}

.filter-form button:hover{
    background:#4338ca;
}
/* ===============================
   TITRES & TEXTES
=============================== */
h3 {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #374151;
}
p {
    margin-bottom: 10px;
}

.token {
    position: relative;
    cursor: pointer;
    padding: 2px 4px;
    border-bottom: 1px dotted #198754;
}

.token:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

.tooltip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: pre-line;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    z-index: 10;
}

/* ===============================
   SECTION NOTES
=============================== */
.note {
    display: inline-block;
    background: #e9f5ef;
    color: #198754;
    padding: 4px 8px;
    border-radius: 6px;
    margin: 4px 2px;
    font-size: 0.9rem;
}

.analysis-result {
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.sentence {
    margin-bottom: 10px;
}

.autre-phrase {
    margin-top: 15px;
    padding: 10px;
    border-left: 3px solid #ccc;
    background: #fafafa;
}

.autre-ja {
    font-size: 1.1em;
}

.autre-fr {
    font-style: italic;
    color: #666;
    margin-top: 4px;
}

.reading-romaji {
    font-style: italic;
    color: #666;
    margin-top: 4px;
}

/* boutons */
.btn-analyze {
    background: #4a6cf7;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
}

button[name="save_text"] {
    background: #2ecc71;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
}

.save-block {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sequence-list{
list-style:none;
padding:0;
max-width:900px;
}

.sequence-item{
padding:14px 0px;
border-bottom:1px solid #eee;
cursor:pointer;
}

.sequence-item:hover{
background:#f7f7f7;
}

.seq-header{
display:flex;
gap:12px;
font-size:13px;
color:#666;
margin-bottom:6px;
}

.seq-text{
font-size:15px;
line-height:1.4;
}
.seq-dossier {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

.commentaire_add {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
}


.pagination a{
margin-right:6px;

.layout {
    display: flex;
    gap: 30px;
}
}

/* =============================
   BOUTONS RETOUR MODERNES
============================= */

.back-link,
.mobile-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 16px;
    margin-bottom: 0px;

    background: #f3f4f6;
    color: #111827;

    text-decoration: none;
    font-weight: 600;
    font-size: 14px;

    border-radius: 999px;

    transition: all 0.2s ease;
}

.back-link:hover,
.mobile-back:hover {
    background: #e5e7eb;
    transform: translateX(-2px);
}

/* Version plus visible sur mobile */
@media (max-width: 768px) {
    .mobile-back {
        display: inline-flex;
    }
}

/* Option : effet léger bouton premium */
.back-link::before,
.mobile-back::before {
    content: "←";
    font-size: 14px;
    opacity: 0.8;
}

.commentaire{
    border:1px solid #ddd;
    border-left:4px solid #4a90e2;
    background:#fafafa;
    padding:12px 14px;
    margin:12px 0;
    border-radius:6px;
    transition:background 0.2s ease;
}

.commentaire:hover{
    background:#f3f7ff;
}

.commentaire-date{
    font-size:12px;
    color:#777;
    margin-bottom:6px;
}

.commentaire-auteur{
    font-size:12px;
    color:#777;
    margin-bottom:6px;
}

.card p.comment-hint {
    background-color: #fff3cd;  /* couleur douce type "avertissement" */
    border-left: 4px solid #ffeeba; /* accent sur le côté */
    padding: 10px 14px;
    border-radius: 4px;
    color: #856404; /* texte brun/jaune pour l'avertissement */
    font-size: 14px;
    margin: 12px 0;
    line-height: 1.5;
}
.commentaire-texte{
    font-size:15px;
    line-height:1.5;
    color:#222;
}
.breadcrumb {
    font-size: 14px;
    margin-bottom: 20px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: #555;
}

.breadcrumb a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #357bd8;
}

.breadcrumb .separator {
    margin: 0 0;
    color: #888;
}

.breadcrumb .current {
    font-weight: 600;
    color: #222;
}

.audio-list {
    display: grid;
    gap: 16px;
    margin: 20px 0;
}

/* Carte audio */
.audio-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    transition: all 0.25s ease;
    position: relative;
}

/* Hover élégant */
.audio-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.10);
    border-color: #ddd;
}

/* Meta info */
.audio-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* Badge langue */
.audio-meta span:last-child {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: #444;
}

/* Player audio */
.audio-item audio {
    width: 100%;
    margin: 8px 0 10px;
    border-radius: 8px;
}

/* Lien */
.audio-item a {
    display: inline-block;
    font-size: 13px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.audio-item a:hover {
    color: #3730a3;
    text-decoration: underline;
}

/* Message vide */
.audio-list p {
    color: #888;
    font-style: italic;
}
/* 🎵 Item audio */
.audio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
}

/* ▶️ Boutons */
.audio-item button {
    border: none;
    background: #25d366;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

/* 🗑️ bouton delete spécifique */
.deleteAudioBtn {
    background: #ff4d4d;
}

/* 📊 Barre de progression */

.progress-container {
    width: 100%;
    height: 6px;
    background: #f1f1f1;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4f46e5, #818cf8);
    border-radius: 10px;
    transition: width 0.2s linear;
}

.audio-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.date {
    font-style: italic;
}

.deleteAudioBtn[data-confirm="true"] {
    background: orange;
}

.playBtn {
    transition: transform 0.15s ease;
}
.playBtn:active {
    transform: scale(0.9);
}


