@media screen and (max-width: 768px) {
    .row {
        flex-direction: column;
    }
    #envoi, #reception {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
    }
}

body {
    font-family: "Public Sans", sans-serif;
    background-color: #fafafb;
    padding-top: 72px;
}

#titre {
    position: fixed;
    top: 0;
    width:100%;
    background-color: white;
    color: grey;
    padding: 3px;
    font-size: 2em;
    font-weight: bold;
    border-bottom: 1px solid #e6ebf1;
    z-index: 1000;
}

#titre p {
    margin: 17px 0 0 0;
}

#titre img {
    width: 67px;
    float: inline-end;
    margin-right: 51px;
}

#titre span {
    font-weight: normal;
    font-size: 0.6em;
}

#footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #e7f3ff;
    color: #1890ff;
    text-align: center;
    margin: 0;
    padding: 2px;
    font-size: 0.8em;
    border-top: 1px solid #e6ebf1;
    font-weight: 550;
    cursor: pointer;
}

#envoi-body, #reception-body {
    flex: 1 1 auto;
    padding: 25px 25px;
}

#envoi-body p {
    text-align: center;
}

#slogan {
    text-align: center;
    margin-top: 39px;
    font-size: 2em;
    color: grey;
    font-style: italic;
}

input, textarea {
    padding: 10px;
    width: 70%;
    margin: 10px;
}

textarea {
    height: 100px;
}

button {
    border: 1px solid #f33052;
    background: #eef9e8;
    color: #f33052;
    border-radius: 4px;
    padding: 10px;
    font-weight: bold;
    font-size: 1.1em;
}

#envoi-body h2, #reception-body h2 {
    margin-top: 0;
    font-weight: normal;
    color: grey;
}

#reception ul {
    list-style: none;
}

.message-data {
    margin-bottom: 15px;
}

.message-data-time {
    color: #a8aab1;
    padding-left: 6px;
}

.my-message {
    background: #86BB71;
}

.message {
    color: white;
    padding: 18px 20px;
    line-height: 26px;
    font-size: 16px;
    border-radius: 7px;
    margin-bottom: 30px;
    width: 90%;
    position: relative;
}

.message:after {
    bottom: 100%;
    left: 7%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-bottom-color: #86BB71;
    border-width: 10px;
    margin-left: -10px;
}

.noTitleStuff .ui-dialog-titlebar {
    display: none;
}

.highlight {
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.2; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

.img-quisommesnous {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.title-quisommesnous {
    font-size: 1.5rem;
    color: #333;
}

.p-quisommesnous {
    font-size: 1rem;
    color: #555;
}

.p2-quisommesnous {
    margin-top: 1rem;
}

.ahref-quisommesnous {
    color: #007BFF;
    text-decoration: none;
}

#CGUMentionsLegales {
    padding: 30px;
    line-height: 1.7;
    color: #333;
}

#CGUMentionsLegales h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #007BFF;
    border-bottom: 2px solid #e6ebf1;
    padding-bottom: 5px;
}

#CGUMentionsLegales h2 {
    font-size: 1.4em;
    color: #444;
    margin-top: 30px;
    border-left: 4px solid #007BFF;
    padding-left: 10px;
}

#CGUMentionsLegales h3 {
    font-size: 1.2em;
    margin-top: 20px;
    color: #555;
}

#CGUMentionsLegales p {
    margin: 12px 0;
}

#CGUMentionsLegales a {
    color: #007BFF;
    text-decoration: none;
}

#CGUMentionsLegales a:hover {
    text-decoration: underline;
}

#compteRebours {
    font-size: 0.5em;
    color: #1890ff;
}

/* Style de base pour la notification Toast */
.toast {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease, top 0.5s ease;
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

.toast.show {
    top: 23%;
    opacity: 1;
    visibility: visible;
}

.toast.fadeOut {
    opacity: 0;
    visibility: hidden;
    top: -50px;
}

/* ===== Bandeau d'alerte service ===== */
#bandeauAlerte {
    position: fixed;              /* 🔥 Fige le bandeau */
    top: 74px;                    /* 👈 Juste sous le #titre (72px de padding) */
    left: 0;
    width: 100%;
    background-color: #fff3cd;
    color: #664d03;
    border-bottom: 1px solid #ffe69c;
    text-align: center;
    padding: 10px 40px 10px 12px;
    font-weight: 550;
    font-size: 0.95rem;
    z-index: 999;                /* Juste sous #titre qui est à 9999 */
}

#chronoSms, #chronoConv {
	text-align: center;
	font-weight:bold;
}

.modal {
  z-index: 2001 !important;
}

.modal-backdrop {
  z-index: 2000 !important;
}




/* Thème bulles façon iMessage */
:root {
  --bubble-radius: 18px;
  --imessage-blue: #007aff;      /* bleu iOS */
  --pending-bg:   #2b3035;       /* gris sombre pour en attente */
  --footer-h: 76px;
}

/* Réserve de l'espace sous la carte conversation pour le footer fixe */
.chat-card {
  margin-bottom: calc(var(--footer-h) + 12px + env(safe-area-inset-bottom));
}

/* Optionnel mais confortable si tu fais des scrollIntoView sur les messages */
#chat-body {
  scroll-padding-bottom: calc(var(--footer-h) + 12px);
}


/* Base */
#chat-body { display:flex; flex-direction:column; gap:.5rem;}
.message  { max-width:75%; display:flex; flex-direction:column; }

/* Reçus (gauche) */
.message-received { align-self:flex-start; }
.message-received .bubble{
  background:#e9ecef; color:#111;
  border-radius: var(--bubble-radius) var(--bubble-radius) var(--bubble-radius) 6px;
  padding:10px 14px;
}

/* Envoyés (droite) */
.message-sent { align-self:flex-end; text-align:right; }
.message-sent .bubble{
  background: var(--imessage-blue); color:#fff;
  border-radius: var(--bubble-radius) var(--bubble-radius) 6px var(--bubble-radius);
  padding:10px 14px;
  transition: background-color .25s ease, color .25s ease;
}

/* En attente d’envoi → look plus sombre */
.message-sent.pending .bubble{
  background: var(--pending-bg);
  color:#fff;
  opacity: .95;
}

/* Ligne de statut sous la bulle */
.message .status{
  font-size: .75rem;
  margin-top: 4px;
}
.message-received .status{ color:#6c757d; }      /* heure simple */
.message-sent .status{ color:#6c757d; }          /* heure/état à droite */
.message-sent.pending .status{ color:#adb5bd; }  /* plus discret en attente */

/* Petite anim d’apparition */
@keyframes fadeInUp { from{opacity:0; transform: translateY(6px)} to{opacity:1; transform:none} }
.bubble { animation: fadeInUp .18s ease-out; }

.message-sent.sent .bubble { animation: pop .16s ease-out; }
@keyframes pop { from{transform:scale(.98)} to{transform:scale(1)} }

.message::before,
.message::after,
.message .bubble::before,
.message .bubble::after,
.my-message::before,
.my-message::after {
  content: none !important;
  border: 0 !important;
}





.maxh-70vh { max-height: 70vh; }
.minh-50vh { min-height: 50vh; }