/* Reset léger */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 40px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
}

.app-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.app-header {
    text-align: left;
    margin-bottom: 24px;
}

.app-header h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    color: #1f2933;
}

.app-header .subtitle {
    margin: 0;
    color: #617080;
    font-size: 14px;
}

.app-main {
    margin-bottom: 24px;
}

.app-footer {
    text-align: center;
    font-size: 12px;
    color: #9aa5b1;
    padding-top: 8px;
}

/* Card */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 24px 28px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 22px;
    color: #1f2933;
}

.card-intro {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 14px;
    color: #4b5563;
}

/* Formulaire */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2933;
}

.form-group input,
.form-group textarea {
    border-radius: 8px;
    border: 1px solid #d0d7e2;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.hint {
    font-size: 12px;
    color: #6b7280;
}

.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .form-columns {
        grid-template-columns: 1fr;
    }

    body {
        padding: 24px 12px;
    }
}

/* Boutons */
.form-actions {
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    text-decoration: none;
}

.btn-primary {
    background: #f90;
    color: #fff;
}

.btn-primary:hover {
    background: #d78202;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Résultats / mapping */
.default-redirects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .default-redirects {
        grid-template-columns: 1fr;
    }
}

.mapping-section {
    margin-top: 24px;
}

.mapping-section h3 {
    margin-bottom: 12px;
    font-size: 18px;
    color: #111827;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mapping-table thead {
    background: #f3f4f6;
}

.mapping-table th,
.mapping-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.mapping-table code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
}

.mapping-table th,
.mapping-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

/* Largeurs cohérentes entre FR et EN */
.mapping-table th:nth-child(1),
.mapping-table td:nth-child(1) {
    width: 45%;
}

.mapping-table th:nth-child(2),
.mapping-table td:nth-child(2) {
    width: 40%;
}

.mapping-table th:nth-child(3),
.mapping-table td:nth-child(3) {
    width: 15%;
    text-align: center;
}

.default-col {
    text-align: center;
}


#loader-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(255,255,255,0.95);
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    z-index:9999;
    font-family:Arial, sans-serif;
    opacity:0;
    pointer-events:none;
    transition: opacity .3s;
}

#loader-overlay.active {
    opacity:1;
    pointer-events:auto;
}

.loader-bar {
    width:60%;
    height:10px;
    background:#eee;
    border-radius:5px;
    overflow:hidden;
    margin-top:20px;
}

.loader-bar-fill {
    height:100%;
    width:0%;
    background:#f90;
    animation: loader-animation 3s infinite;
}

@keyframes loader-animation {
    0% { width:5%; }
    50% { width:80%; }
    100% { width:30%; }
}

.loader-text {
    font-size:18px;
    color:#333;
    margin-top:15px;
}

.needs-redirect {
    background-color: #fff7c2 !important;
}

.url-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}

.status-badge-ok {
    background-color: #e6f7e9;
    color: #1f7a30;
    border: 1px solid #b6e2bf;
}

.status-badge-warning {
    background-color: #fff3cd;
    color: #8a6d3b;
    border: 1px solid #ffe29b;
}


.redirect-count {
    margin-top: 20px;
    margin-bottom: 20px;
}

.toggle-wrapper {
    margin-bottom: 20px;
}

.fr_new, .en_new {
    width: 100%;
}

/* Placeholders — gris très pâle */
::placeholder {
    color: #c7c7c7;      /* gris pâle */
    opacity: 1;          /* nécessaire pour Firefox */
}

/* Pour compatibilité maximale */
input::placeholder,
textarea::placeholder {
    color: #c7c7c7;
}