/* Jours Ouvrés - Styles */
/* ===================== */
/* DA ToolBox : fond dégradé violet, conteneur blanc arrondi ombré,
   cartes blanches, accents bleus. */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Intro sous le header : la réponse directe, lisible d'emblée */
.intro-outil {
    max-width: 860px;
    margin: 0 auto 10px;
    color: #454f58;
    font-size: 1.05em;
    line-height: 1.6;
    text-align: center;
}

/* Contenu principal */
.tool-content {
    padding: 20px 0;
}

.modes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 900px) {
    .modes-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Cartes */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.card h3 i,
.card h2 i {
    color: #3498db;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: 600;
}

/* Formulaires */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2c3e50;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: #3498db;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.champs-ligne {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 480px) {
    .champs-ligne {
        grid-template-columns: 1fr;
    }
}

/* Sens du calcul et options */
.fieldset-sens {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.fieldset-sens legend {
    padding: 0 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.choix-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
    padding: 4px 0;
}

.choix-inline input {
    width: 18px;
    height: 18px;
    accent-color: #3498db;
    cursor: pointer;
    flex-shrink: 0;
}

.choix-alsace {
    margin-bottom: 15px;
}

/* Résultats */
.resultat {
    background: #f0f8f4;
    border-left: 4px solid #27ae60;
    border-radius: 8px;
    padding: 18px 20px;
    min-height: 80px;
}

.resultat-intro {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 6px;
}

.resultat-date {
    color: #14532d;
    font-size: 1.6em;
    font-weight: 700;
    margin: 4px 0 10px;
}

.resultat-note {
    color: #7a5c00;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.resultat-details {
    color: #43594c;
    font-size: 13.5px;
    line-height: 1.55;
}

.resultat-details p {
    margin: 6px 0;
}

.liste-feries {
    margin: 6px 0 6px 20px;
}

.liste-feries li {
    margin: 3px 0;
}

.resultat-erreur {
    color: #a4261a;
    font-weight: 500;
}

.resultat-compte {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.resultat-compte > div {
    background: white;
    border: 1px solid #dcebe1;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
}

.resultat-compte dt {
    color: #4a5a52;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.resultat-compte dd {
    color: #14532d;
    font-size: 1.5em;
    font-weight: 700;
}

.convention {
    margin-top: 12px;
    color: #595959;
    font-size: 13px;
    font-style: italic;
}

/* Contenu éditorial */
.contenu-editorial {
    display: grid;
    gap: 20px;
    margin-top: 10px;
}

.contenu-editorial p {
    line-height: 1.6;
    color: #333;
    margin-bottom: 12px;
}

/* Tableau des fériés */
/* min-width: 0 sur les items de grille, sinon un item suit la largeur
   minimale de son tableau interne et fait deborder la page sur mobile
   au lieu de laisser .table-scroll defiler. */
.contenu-editorial > .card,
.modes-grid > .card {
    min-width: 0;
}

.table-scroll {
    overflow-x: auto;
    margin: 10px 0 15px;
}

.table-scroll table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 420px;
}

.table-scroll th,
.table-scroll td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table-scroll th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
}

.table-scroll tbody tr:hover {
    background: #f8f9fa;
}

/* Définitions */
.definitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 15px;
}

.definition {
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    padding: 15px 18px;
}

.definition h3 {
    color: #2c3e50;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 8px;
}

.definition p {
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

/* Cas d'usage */
.liste-usages {
    margin: 0 0 15px 20px;
}

.liste-usages li {
    margin: 10px 0;
    line-height: 1.6;
}

.avertissement {
    background: #fff8e6;
    border-left: 4px solid #e67e22;
    border-radius: 8px;
    padding: 14px 16px;
    color: #5d4300;
    font-size: 14px;
    line-height: 1.55;
}

.avertissement i {
    color: #b35b09;
    margin-right: 6px;
}

/* FAQ */
.faq h3 {
    color: #2c3e50;
    font-size: 1.05em;
    font-weight: 600;
    margin: 18px 0 8px;
}

.faq h3:first-of-type {
    margin-top: 5px;
}

.faq p {
    font-size: 14.5px;
    line-height: 1.6;
}

/* Accessibilité */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #1976d2;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
        border-radius: 10px;
    }

    .card {
        padding: 18px;
    }

    .resultat-date {
        font-size: 1.35em;
    }
}

/* Impression */
@media print {
    body {
        background: white;
    }

    .container {
        box-shadow: none;
        margin: 0;
    }
}
