/* ============================================================
   SYLTOURS — Feuille de style
   ============================================================ */

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f4f8;
    color: #2d3748;
    font-size: 14px;
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
    background: #2b4c8c;
    color: white;
    padding: 14px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
}

.btn-admin {
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-admin:hover {
    background: rgba(255,255,255,0.25);
}

/* ============================================================
   CONTAINER
   ============================================================ */

.container {
    max-width: 1000px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ============================================================
   BLOCS
   ============================================================ */

.bloc {
    background: white;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.bloc h2 {
    font-size: 15px;
    font-weight: 700;
    color: #2b4c8c;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8effd;
}

.bloc.succes {
    border-left: 5px solid #38a169;
}

/* ============================================================
   GRILLES ET CHAMPS
   ============================================================ */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.champ {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.champ label {
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
}

.champ input[type="text"],
.champ input[type="number"],
.champ input[type="date"],
.champ input[type="password"],
.champ select,
.champ textarea {
    padding: 9px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.champ input:focus,
.champ select:focus {
    outline: none;
    border-color: #2b4c8c;
    box-shadow: 0 0 0 3px rgba(43,76,140,0.1);
}

.champ small,
.info-text {
    font-size: 12px;
    color: #718096;
}

.champ-unite {
    font-size: 13px;
    color: #718096;
    margin-left: 6px;
}

/* ============================================================
   RADIO ET CHECKBOX
   ============================================================ */

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
    color: #2d3748;
}

.radio-label input[type="radio"],
.radio-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2b4c8c;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2b4c8c;
}

/* ============================================================
   PRIX TEMPS RÉEL
   ============================================================ */

.prix-temps-reel {
    background: #ebf4ff;
    border: 1px solid #bee3f8;
    border-radius: 10px;
    padding: 18px 20px;
    margin-top: 16px;
}

.prix-ligne-principale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prix-label {
    font-weight: 700;
    font-size: 15px;
    color: #2b4c8c;
}

.prix-valeur {
    font-size: 28px;
    font-weight: 800;
    color: #2b4c8c;
}

.prix-details {
    border-top: 1px solid #bee3f8;
    padding-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.prix-detail-ligne {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #4a5568;
    padding: 3px 0;
}

.prix-detail-ligne span:last-child {
    font-weight: 600;
}

.detail-calcul {
    margin-top: 10px;
    border-top: 1px solid #bee3f8;
    padding-top: 10px;
}

.btn-detail {
    background: none;
    border: none;
    color: #2b4c8c;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

#detail-contenu {
    margin-top: 8px;
    font-size: 12px;
    color: #718096;
    display: none;
}

/* ============================================================
   ALERTES
   ============================================================ */

.alerte {
    background: #fffbeb;
    border: 1px solid #fbd38d;
    border-left: 4px solid #d69e2e;
    border-radius: 7px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.alerte.erreur {
    background: #fff5f5;
    border-color: #feb2b2;
    border-left-color: #e53e3e;
}

.alerte.info {
    background: #ebf8ff;
    border-color: #bee3f8;
    border-left-color: #3182ce;
}

.alerte-titre {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}

.alerte-texte {
    font-size: 12px;
    color: #744210;
}

.alerte.erreur .alerte-texte { color: #742a2a; }
.alerte.info .alerte-texte { color: #2a4365; }

/* ============================================================
   SURCOÛTS LIBRES
   ============================================================ */

.surcout-ligne {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.surcout-ligne input[type="text"] {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.surcout-ligne input[type="number"] {
    width: 100px;
    padding: 7px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.btn-supprimer {
    background: #fed7d7;
    border: none;
    color: #e53e3e;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.btn-supprimer:hover { background: #feb2b2; }

/* ============================================================
   BOUTONS
   ============================================================ */

.btn-generer {
    background: #2b4c8c;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.1s;
}

.btn-generer:hover {
    background: #1e3a6e;
    transform: translateY(-1px);
}

.btn-generer:active { transform: translateY(0); }

.btn-secondaire {
    background: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}

.btn-secondaire:hover { background: #e2e8f0; }

/* ============================================================
   ZONE RÉSULTAT
   ============================================================ */

.liens-dl {
    display: flex;
    gap: 12px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.btn-telecharger {
    background: #38a169;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-telecharger:hover { background: #2f855a; }

.btn-ouvrir-word {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-ouvrir-word:hover { background: #bee3f8; }

.recap-container {
    margin-top: 20px;
}

.recap-container h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

.recap-textarea {
    width: 100%;
    height: 280px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 7px;
    background: #f7fafc;
    resize: vertical;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.recap-textarea:hover {
    border-color: #003366;
    background: #eef2f8;
}

.recap-hint {
    font-size: 12px;
    color: #718096;
    margin: -4px 0 8px 0;
}

/* ============================================================
   ADMIN LOGIN
   ============================================================ */

.login-container {
    max-width: 380px;
    margin: 80px auto;
    background: white;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-container h2 {
    font-size: 20px;
    color: #2b4c8c;
    margin-bottom: 24px;
    text-align: center;
}

.erreur-login {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #feb2b2;
    border-radius: 7px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-login {
    background: #2b4c8c;
    color: white;
    border: none;
    padding: 11px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
}

.btn-login:hover { background: #1e3a6e; }
