/* ============================================================
   IATF — Design System
   ============================================================ */
:root {
    --iatf-blue: #003087;
    --iatf-blue-hover: #001F5A;
    --iatf-orange: #F47920;
    --iatf-orange-hover: #D4660A;
    --iatf-white: #FFFFFF;
    --iatf-gray: #F5F5F5;
    --iatf-text: #1A1A1A;
    --iatf-whatsapp: #25D366;
    --iatf-chat-bg: #ECE5DD;
    --iatf-bubble-iatf: #E8F0FE;
    --iatf-bubble-user: #FFF3E8;
}

* { box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--iatf-text);
    background: var(--iatf-white);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Boutons IATF */
.btn-iatf-orange {
    background: var(--iatf-orange);
    color: var(--iatf-white) !important;
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: background 0.2s;
    min-height: 48px;
}
.btn-iatf-orange:hover { background: var(--iatf-orange-hover); color: var(--iatf-white); }

.btn-iatf-blue {
    background: var(--iatf-blue);
    color: var(--iatf-white) !important;
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
}
.btn-iatf-blue:hover { background: var(--iatf-blue-hover); }

/* Hero page d'accueil */
.hero-iatf {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--iatf-blue) 0%, var(--iatf-blue-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.section-hero-brochure {
    background: linear-gradient(135deg, var(--iatf-blue) 0%, var(--iatf-blue-hover) 100%);
}

.logo-circle {
    width: 100px; height: 100px;
    background: var(--iatf-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* Cartes arguments */
.card-argument {
    background: white;
    border: 2px solid var(--iatf-orange);
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-argument:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(244,121,32,0.15); }

/* Filières */
.badge-licence {
    background: var(--iatf-orange);
    color: white;
    font-size: 0.7rem;
    padding: 0.35em 0.7em;
    border-radius: 20px;
    vertical-align: middle;
}
.filiere-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    transition: border-color 0.2s;
}
.filiere-card:hover { border-color: var(--iatf-orange); }
.filiere-sigle {
    background: var(--iatf-blue);
    color: white;
    font-weight: 700;
    padding: 0.5em 0.8em;
    border-radius: 8px;
    font-size: 0.85rem;
    min-width: 60px;
    text-align: center;
}

/* Bourses */
.table-bourses {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.table-bourses thead {
    background: var(--iatf-blue);
    color: white;
}
.table-bourses thead th { padding: 1rem; border: none; }
.table-bourses tbody tr:nth-child(even) { background: var(--iatf-gray); }
.table-bourses tbody td { padding: 1rem; vertical-align: middle; }

/* Documents */
.doc-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.doc-icon { font-size: 2rem; }

/* CTA flottant */
.btn-cta-flottant {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--iatf-whatsapp);
    color: white !important;
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
    text-decoration: none;
    font-weight: 700;
    z-index: 1000;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
}
.btn-cta-flottant:hover { background: #1DA851; color: white; }

/* ============================================================
   Chat WhatsApp-like
   ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 600px;
    margin: 0 auto;
    background: var(--iatf-chat-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath fill='%23d9d0c1' fill-opacity='0.15' d='M20 20l10-10v20zM10 10L0 20V0z'/%3E%3C/svg%3E");
}
.chat-header {
    background: var(--iatf-blue);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.chat-avatar {
    width: 40px; height: 40px;
    background: var(--iatf-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.msg {
    max-width: 80%;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    line-height: 1.4;
    animation: msgIn 0.3s ease-out;
    font-size: 0.95rem;
    word-wrap: break-word;
}
.msg-iatf {
    background: var(--iatf-bubble-iatf);
    align-self: flex-start;
    border-top-left-radius: 4px;
}
.msg-user {
    background: var(--iatf-bubble-user);
    align-self: flex-end;
    border-top-right-radius: 4px;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.typing {
    background: var(--iatf-bubble-iatf);
    align-self: flex-start;
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    border-top-left-radius: 4px;
}
.typing span {
    display: inline-block;
    width: 8px; height: 8px;
    background: #999;
    border-radius: 50%;
    margin: 0 2px;
    animation: dot 1.4s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input {
    display: flex;
    padding: 0.5rem;
    background: #f0f0f0;
    gap: 0.5rem;
    align-items: center;
}
.chat-input .form-control {
    border-radius: 24px;
    border: 1px solid #ddd;
    padding: 0.6rem 1rem;
    min-height: 44px;
}
.btn-send {
    background: var(--iatf-whatsapp);
    color: white;
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-send:hover { background: #1DA851; }

/* Fondu au scroll */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
